Skip to content

Commit

Permalink
Fix reconcile logic
Browse files Browse the repository at this point in the history
  • Loading branch information
drichelson committed May 26, 2024
1 parent 42cd85f commit 00100b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/dorkly/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,12 @@ func reconcile(old, new RelayArchive) (RelayArchive, error) {
oldEnv := old.envs[envKey]
newEnv := new.envs[envKey]

// compare env metadata ignoring versions
// These fields are not tracked in the local project yaml, so we need to copy them over
newEnv.metadata.EnvMetadata.Version = oldEnv.metadata.EnvMetadata.Version
newEnv.metadata.DataId = oldEnv.metadata.DataId
newEnv.metadata.dataId = oldEnv.metadata.dataId

// compare env metadata ignoring versions
if !reflect.DeepEqual(oldEnv.metadata, newEnv.metadata) {
logger.With("env", envKey).Info("Environment metadata changed.")
newEnv.metadata.EnvMetadata.Version++
Expand Down

0 comments on commit 00100b4

Please sign in to comment.