mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-10 09:06:38 +00:00
fix(setup): make step 41 repeatable (#9084)
# Which Problems Are Solved setup step 41 cannot handle downgrades at the moment. This step writes the instance domain to the fields table. If there are new instances created during the downgraded version is running there would be domain missing in the fields afterwards. # How the Problems Are Solved Make step 41 repeatable for each version
This commit is contained in:
parent
efaa3ab6a1
commit
b89e8a6037
@ -36,5 +36,9 @@ func (mig *FillFieldsForInstanceDomains) Execute(ctx context.Context, _ eventsto
|
||||
}
|
||||
|
||||
func (mig *FillFieldsForInstanceDomains) String() string {
|
||||
return "41_fill_fields_for_instance_domains"
|
||||
return "repeatable_fill_fields_for_instance_domains"
|
||||
}
|
||||
|
||||
func (f *FillFieldsForInstanceDomains) Check(lastRun map[string]interface{}) bool {
|
||||
return true
|
||||
}
|
||||
|
@ -128,7 +128,6 @@ type Steps struct {
|
||||
s38BackChannelLogoutNotificationStart *BackChannelLogoutNotificationStart
|
||||
s40InitPushFunc *InitPushFunc
|
||||
s39DeleteStaleOrgFields *DeleteStaleOrgFields
|
||||
s41FillFieldsForInstanceDomains *FillFieldsForInstanceDomains
|
||||
}
|
||||
|
||||
func MustNewSteps(v *viper.Viper) *Steps {
|
||||
|
@ -171,7 +171,6 @@ func Setup(ctx context.Context, config *Config, steps *Steps, masterKey string)
|
||||
steps.s38BackChannelLogoutNotificationStart = &BackChannelLogoutNotificationStart{dbClient: esPusherDBClient, esClient: eventstoreClient}
|
||||
steps.s39DeleteStaleOrgFields = &DeleteStaleOrgFields{dbClient: esPusherDBClient}
|
||||
steps.s40InitPushFunc = &InitPushFunc{dbClient: esPusherDBClient}
|
||||
steps.s41FillFieldsForInstanceDomains = &FillFieldsForInstanceDomains{eventstore: eventstoreClient}
|
||||
|
||||
err = projection.Create(ctx, projectionDBClient, eventstoreClient, config.Projections, nil, nil, nil)
|
||||
logging.OnError(err).Fatal("unable to start projections")
|
||||
@ -188,6 +187,9 @@ func Setup(ctx context.Context, config *Config, steps *Steps, masterKey string)
|
||||
es: eventstoreClient,
|
||||
Version: build.Version(),
|
||||
},
|
||||
&FillFieldsForInstanceDomains{
|
||||
eventstore: eventstoreClient,
|
||||
},
|
||||
}
|
||||
|
||||
for _, step := range []migration.Migration{
|
||||
@ -219,7 +221,6 @@ func Setup(ctx context.Context, config *Config, steps *Steps, masterKey string)
|
||||
steps.s35AddPositionToIndexEsWm,
|
||||
steps.s36FillV2Milestones,
|
||||
steps.s38BackChannelLogoutNotificationStart,
|
||||
steps.s41FillFieldsForInstanceDomains,
|
||||
} {
|
||||
mustExecuteMigration(ctx, eventstoreClient, step, "migration failed")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user