Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade: do not apply 2.7 migration for patch-upgrades #1649

Merged
merged 5 commits into from
Apr 28, 2023

Conversation

derpsteb
Copy link
Member

@derpsteb derpsteb commented Apr 13, 2023

Proposed change(s)

  • We added migration for 2.6.X -> 2.7.0 upgrades. That migration is not necessary for 2.7.0 -> 2.7.X upgrades. This patch adds a check so the migration is not applied. Without this patch users might see the error ID key digest policy MAAFallback is not supported for upgrades on clusters that are created with CLI version v2.7.
  • Extend the CI pipeline to simulate specific version numbers so the application of migrations can be tested.
  • Fix a bug in the build tooling where the CLI's version was wrongly prefixed with a "v".
  • See below for successful test runs.

Checklist

  • Add labels (e.g., for changelog category)

@derpsteb derpsteb added bug fix Fixing a bug needs backport This PR needs to be backported to a previous release labels Apr 13, 2023
@derpsteb derpsteb added this to the v2.8.0 milestone Apr 13, 2023
@netlify
Copy link

netlify bot commented Apr 13, 2023

Deploy Preview for constellation-docs canceled.

Name Link
🔨 Latest commit f41281a
🔍 Latest deploy log https://app.netlify.com/sites/constellation-docs/deploys/644bc7be15a2330008316e17

@katexochen katexochen added the no changelog Change won't be listed in release changelog label Apr 13, 2023
Copy link
Contributor

@malt3 malt3 left a comment

Choose a reason for hiding this comment

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

Check looks correct.

@derpsteb derpsteb force-pushed the fix/cli/upgrade-270-271 branch 2 times, most recently from 25a860c to 5d31252 Compare April 24, 2023 11:20
@katexochen katexochen removed their request for review April 24, 2023 13:09
@derpsteb
Copy link
Member Author

derpsteb commented Apr 26, 2023

Azure, 1+1, 2.7 -> 2.7.1, k8s-only 🟢
Azure, 1+1, 2.7 -> 2.8-pre, k8s-only 🟢

Testing 2.6.0 -> 2.7.1 upgrade manually by running:
bazel run //e2e/internal/upgrade:upgrade_test -- --want-worker 1 --want-control 1 --target-image v2.6.0 --target-kubernetes=v1.26.3 --target-microservices=v2.6.0 🟢

Separate invocation for microservice upgrade:
bazel run //e2e/internal/upgrade:upgrade_test -- --want-worker 1 --want-control 1 --target-image v2.6.0 --target-kubernetes=v1.26.3 --target-microservices=v2.7.1 🟢

Reason for testing this manually:
constellation iam create seems broken in the CI. Most likely due to fixes included in this version update that is not included in 2.6.0. We only enabed OIDC based auth after 2.6.0.

@derpsteb derpsteb force-pushed the fix/cli/upgrade-270-271 branch 6 times, most recently from 3909975 to aec6a49 Compare April 27, 2023 14:40
cli/internal/helm/client.go Show resolved Hide resolved
cli/internal/helm/client.go Outdated Show resolved Hide resolved
cli/internal/helm/client.go Outdated Show resolved Hide resolved
Copy link
Member

@3u13r 3u13r left a comment

Choose a reason for hiding this comment

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

LGTM

@derpsteb
Copy link
Member Author

derpsteb commented Apr 28, 2023

Azure, 1+1, 2.7.0 -> 2.7.1, microservice only 🟢
Azure, 1+1, 2.7.0 -> HEAD, microservice only 🟢

Manual test based on 2.6.0 worked:
bazel run //e2e/internal/upgrade:upgrade_test -- --want-worker 1 --want-control 1 --target-image v2.6.0 --target-kubernetes=v1.25.7 --target-microservices=v2.7.1

Also correctly set microservice version from config.
Previously the key was ignored and microservices were always
tried for an upgrade.
This allows us to build a CLI that reports the given version during
an upgrade test. With this we can test patch upgrades.
pre-release versions and release versions behaved differently.
This lead to a duplicate v prefix in the cli's version.
@derpsteb derpsteb merged commit 5deccc3 into main Apr 28, 2023
@derpsteb derpsteb deleted the fix/cli/upgrade-270-271 branch April 28, 2023 13:48
@derpsteb derpsteb changed the title upgrade: fix 2.6 -> 2.7 migration for 2.7.1 patch upgrade: do not apply 2.7 migration for patch-upgrades May 2, 2023
katexochen added a commit that referenced this pull request May 2, 2023
* upgrade: fix 2.6 -> 2.7 migration for 2.7.1 patch

Also correctly set microservice version from config.
Previously the key was ignored and microservices were always
tried for an upgrade.

* ci: add simulatedTargetVersion to e2e-upgrade

This allows us to build a CLI that reports the given version during
an upgrade test. With this we can test patch upgrades.

Signed-off-by: Otto Bittner <[email protected]>

* ci: e2e-upgrade, case-insensitive string compare

* hack: fix v-prefixing in pseudo-version tool

pre-release versions and release versions behaved differently.
This lead to a duplicate v prefix in the cli's version.

Signed-off-by: Otto Bittner <[email protected]>

---------

Signed-off-by: Otto Bittner <[email protected]>
Co-authored-by: Otto Bittner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix Fixing a bug needs backport This PR needs to be backported to a previous release no changelog Change won't be listed in release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants