Skip to content

Commit

Permalink
fix(operator): fix post upgrade when version is a commit (#843)
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-nicolas authored Nov 10, 2023
1 parent 25dac85 commit c87ad3e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/operator/internal/modules/payments/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,13 @@ func PostUpgradePreV1(ctx context.Context, upgrader modules.JobRunner, config mo
return true, nil
}

// That mean the version is a commit, and we assume that a commit is always
// the highest version.
// cf https://github.com/formancehq/stack/blob/main/components/operator/apis/stack/v1beta3/versions_types.go#L89
if !semver.IsValid(config.Version) {
return true, nil
}

switch semver.Compare(config.Version, "v1.0.0-alpha.6") {
case 0, 1:
// Services are splitted, nothing to do
Expand Down

1 comment on commit c87ad3e

@vercel
Copy link

@vercel vercel bot commented on c87ad3e Nov 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.