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

tests: delete migrations job before upgrade in e2e test #4100

Merged
merged 1 commit into from
May 29, 2023
Merged

Conversation

czeslavo
Copy link
Contributor

What this PR does / why we need it:

To prevent failures caused by not being allowed to update jobs' spec when upgrading with kubectl apply -f to a newer version of all-in-one manifests, delete the job just before the upgrade.

Which issue this PR fixes:

Fixes #4097.

Special notes for your reviewer:

We agreed to use generateName, but unfortunately it's not supported by Kustomize (see the issue: kubernetes-sigs/kustomize#641). I also tried going with using Kustomize's replacements to use the deployment's image tag to append a version-dependent suffix to the migration job's name, but it didn't work either due to deployment not being rendered at that stage yet. I decided to not spend more time on it and just go with a simple delete in the test.

@czeslavo czeslavo requested a review from a team as a code owner May 29, 2023 13:10
@czeslavo czeslavo self-assigned this May 29, 2023
Copy link
Member

@pmalek pmalek left a comment

Choose a reason for hiding this comment

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

😿

@codecov
Copy link

codecov bot commented May 29, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.1 🎉

Comparison is base (d8c1396) 60.1% compared to head (40082c4) 60.3%.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #4100     +/-   ##
=======================================
+ Coverage   60.1%   60.3%   +0.1%     
=======================================
  Files        150     150             
  Lines      16727   16736      +9     
=======================================
+ Hits       10066   10100     +34     
+ Misses      6024    6001     -23     
+ Partials     637     635      -2     

see 9 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@czeslavo czeslavo merged commit 43e797f into main May 29, 2023
@czeslavo czeslavo deleted the remove-job branch May 29, 2023 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestDeployAndUpgradeAllInOnePostgres fails due to immutable migration job spec
2 participants