MM-53228: Adding schema version to cluster info (#24209)
With the schema version available, a job can query for the cluster info to confirm whether or not all nodes in a cluster are upgraded to the same version or not. This will help it in determining whether to start the job or not. https://mattermost.atlassian.net/browse/MM-53228 ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ace88288f0
Коммит
45a14e23a9
@@ -346,6 +346,30 @@ func (_m *Store) GetInternalReplicaDB() *sql.DB {
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetLocalSchemaVersion provides a mock function with given fields:
|
||||
func (_m *Store) GetLocalSchemaVersion() (int, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 int
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (int, error)); ok {
|
||||
return rf()
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func() int); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(int)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func() error); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Group provides a mock function with given fields:
|
||||
func (_m *Store) Group() store.GroupStore {
|
||||
ret := _m.Called()
|
||||
|
||||
@@ -114,17 +114,18 @@ func (s *Store) PostAcknowledgement() store.PostAcknowledgementStore {
|
||||
func (s *Store) PostPersistentNotification() store.PostPersistentNotificationStore {
|
||||
return &s.PostPersistentNotificationStore
|
||||
}
|
||||
func (s *Store) MarkSystemRanUnitTests() { /* do nothing */ }
|
||||
func (s *Store) Close() { /* do nothing */ }
|
||||
func (s *Store) LockToMaster() { /* do nothing */ }
|
||||
func (s *Store) UnlockFromMaster() { /* do nothing */ }
|
||||
func (s *Store) DropAllTables() { /* do nothing */ }
|
||||
func (s *Store) GetDbVersion(bool) (string, error) { return "", nil }
|
||||
func (s *Store) GetInternalMasterDB() *sql.DB { return nil }
|
||||
func (s *Store) GetInternalReplicaDB() *sql.DB { return nil }
|
||||
func (s *Store) GetInternalReplicaDBs() []*sql.DB { return nil }
|
||||
func (s *Store) RecycleDBConnections(time.Duration) {}
|
||||
func (s *Store) GetDBSchemaVersion() (int, error) { return 1, nil }
|
||||
func (s *Store) MarkSystemRanUnitTests() { /* do nothing */ }
|
||||
func (s *Store) Close() { /* do nothing */ }
|
||||
func (s *Store) LockToMaster() { /* do nothing */ }
|
||||
func (s *Store) UnlockFromMaster() { /* do nothing */ }
|
||||
func (s *Store) DropAllTables() { /* do nothing */ }
|
||||
func (s *Store) GetDbVersion(bool) (string, error) { return "", nil }
|
||||
func (s *Store) GetInternalMasterDB() *sql.DB { return nil }
|
||||
func (s *Store) GetInternalReplicaDB() *sql.DB { return nil }
|
||||
func (s *Store) GetInternalReplicaDBs() []*sql.DB { return nil }
|
||||
func (s *Store) RecycleDBConnections(time.Duration) {}
|
||||
func (s *Store) GetDBSchemaVersion() (int, error) { return 1, nil }
|
||||
func (s *Store) GetLocalSchemaVersion() (int, error) { return 1, nil }
|
||||
func (s *Store) GetAppliedMigrations() ([]model.AppliedMigration, error) {
|
||||
return []model.AppliedMigration{}, nil
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user