mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-07 15:07:40 +00:00
fix: read correct defaults (#8090)
# Which Problems Are Solved Corrects reading of default configuration, despite reading all default configs only required defaults are read. # How the Problems Are Solved Reading the defualt config of the `mirror`-command was moved to a pre-run step of the command instead of doing it during initialization of the executable. # Additional Context - Closes https://github.com/zitadel/zitadel/issues/8059 - https://discord.com/channels/927474939156643850/1248594307267559535
This commit is contained in:
parent
26c7d95c88
commit
7d852ad0df
@ -34,6 +34,10 @@ Order of execution:
|
|||||||
3. mirror event store tables
|
3. mirror event store tables
|
||||||
4. recompute projections
|
4. recompute projections
|
||||||
5. verify`,
|
5. verify`,
|
||||||
|
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
||||||
|
err := viper.MergeConfig(bytes.NewBuffer(defaultConfig))
|
||||||
|
logging.OnError(err).Fatal("unable to read default config")
|
||||||
|
},
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
config := mustNewMigrationConfig(viper.GetViper())
|
config := mustNewMigrationConfig(viper.GetViper())
|
||||||
projectionConfig := mustNewProjectionsConfig(viper.GetViper())
|
projectionConfig := mustNewProjectionsConfig(viper.GetViper())
|
||||||
@ -59,9 +63,6 @@ Order of execution:
|
|||||||
The flag should be provided if you want to execute the mirror command multiple times so that the static data are also mirrored to prevent inconsistent states.`)
|
The flag should be provided if you want to execute the mirror command multiple times so that the static data are also mirrored to prevent inconsistent states.`)
|
||||||
migrateProjectionsFlags(cmd)
|
migrateProjectionsFlags(cmd)
|
||||||
|
|
||||||
err := viper.MergeConfig(bytes.NewBuffer(defaultConfig))
|
|
||||||
logging.OnError(err).Fatal("unable to read default config")
|
|
||||||
|
|
||||||
cmd.AddCommand(
|
cmd.AddCommand(
|
||||||
eventstoreCmd(),
|
eventstoreCmd(),
|
||||||
systemCmd(),
|
systemCmd(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user