-
Notifications
You must be signed in to change notification settings - Fork 531
fix: broken upgrade path from previous versions #1346
fix: broken upgrade path from previous versions #1346
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hectorj2f The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
charts/kubefed/charts/controllermanager/templates/deployments.yaml
Outdated
Show resolved
Hide resolved
charts/kubefed/charts/controllermanager/templates/deployments.yaml
Outdated
Show resolved
Hide resolved
Signed-off-by: Hector Fernandez <[email protected]>
3eb2704
to
c1ee4df
Compare
Signed-off-by: Hector Fernandez <[email protected]>
ff02379
to
ce0b03e
Compare
Ping @jimmidyson |
@hectorj2f I'm really not confident with this approach. We need an upgrade test to confirm - can you add one please? |
Signed-off-by: Hector Fernandez <[email protected]>
194f711
to
8a435bc
Compare
@jimmidyson I add an initial test to validate the upgrade. Is that enough for you or you are looking for a specific piece of code ? |
scripts/pre-commit.sh
Outdated
@@ -38,6 +38,9 @@ E2E_TEST_CMD="${TEMP_DIR}/e2e-${PLATFORM} ${COMMON_TEST_ARGS}" | |||
# given control plane scope. | |||
IN_MEMORY_E2E_TEST_CMD="go test -v -timeout 900s -race ./test/e2e -args ${COMMON_TEST_ARGS} -in-memory-controllers=true -limited-scope-in-memory-controllers=false" | |||
|
|||
KUBEFED_UPGRADE_TEST_NS="upgrade-test" | |||
KUBEFED_UPGRADE_TEST_VERSION="v0.5.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will have to be bumped for every release, right? Can we update documentation for this or better still automate this, either in the test (retrieve latest release here) or as part of release script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I automated to get the previous version to the latest stable in the remote chart.
Signed-off-by: Hector Fernandez <[email protected]> Signed-off-by: Hector Fernandez <[email protected]>
2868eff
to
14c62f2
Compare
The build failed due to a long job that was stopped during the cleanup step. I simplified the upgrade test to take less time. |
Signed-off-by: Hector Fernandez <[email protected]>
1d53eb9
to
7fb0814
Compare
@makkes @jimmidyson please, take a look. I think I addressed all your comments. |
helm repo update | ||
|
||
# Get the previous version prior to our latest stable version | ||
KUBEFED_UPGRADE_TEST_VERSION=$(helm search repo kubefed-charts/kubefed --versions | awk '{print $2}' | head -3 | tail -1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For PRs this would currently test an upgrade from 0.5.1 to what's in the PR. However, I believe that for PRs we would like to test upgrades from the latest version (i.e. 0.6.0 atm). wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was testing from the old version 0.5.1 that showed the issue that this PR fixes. Generally, we should run upgrades from the most recent release, but the upgrade from 0.5.1 -> 0.6.0 is broken right now, hence this test.
I guess we should actually remove 0.6.0 once 0.6.1 is released as it's a broken release (at least for upgrades)? Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should delete v0.6.0 once v0.6.1 is released.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
/lgtm |
closes #1313 |
Signed-off-by: Hector Fernandez [email protected]
What this PR does / why we need it:
The upgrade path from v0.5.0 to v0.6.0 was failing due to the following error:
The running admissionWebhook was not upgraded by the time the new kubefedconfig was updated. Therefore we needed to add certain hooks to the created resources. Once I added those, I managed to upgrade from v0.3.0 --> v0.4.0 --> v0.5.0 --> v0.6.0 without any issue.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #1333
Special notes for your reviewer: