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

feat: all-in-one manifests migrations job improvement #4116

Merged
merged 1 commit into from
May 31, 2023

Conversation

czeslavo
Copy link
Contributor

@czeslavo czeslavo commented May 31, 2023

What this PR does / why we need it:

kong migrations bootstrap alone works fine when installing a fresh instance of KIC with DB-backed Kong. It doesn't work though when we'd like to upgrade and keep the DB state between the upgrades, because it only bootstraps a fresh database - when there is one already in existence, it just returns.

This PR aims to solve this issue by adding additional commands to the migrations job: kong migrations up && kong migrations finish which will make the job detect new migrations that need to be run after the upgrade and finish them.

Which issue this PR fixes:

It was discovered when writing E2E tests for #4025.

Special notes for your reviewer:

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@czeslavo czeslavo added ci/run-e2e Trigger e2e test run from PR and removed size/XS labels May 31, 2023
@team-k8s-bot
Copy link
Collaborator

E2E (targeted) tests were started at https://github.com/Kong/kubernetes-ingress-controller/actions/runs/5135226233

@team-k8s-bot team-k8s-bot removed the ci/run-e2e Trigger e2e test run from PR label May 31, 2023
@czeslavo czeslavo changed the title chore: all-in-one manifests migrations job improvement feat: all-in-one manifests migrations job improvement May 31, 2023
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 31, 2023 16:20 — with GitHub Actions Inactive
@czeslavo czeslavo self-assigned this May 31, 2023
@czeslavo czeslavo added the area/feature New feature or request label May 31, 2023
@czeslavo czeslavo marked this pull request as ready for review May 31, 2023 16:33
@czeslavo czeslavo requested a review from a team as a code owner May 31, 2023 16:33
@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Patch coverage has no change and project coverage change: -4.9 ⚠️

Comparison is base (6b3951d) 60.4% compared to head (96a5c25) 55.5%.

❗ Current head 96a5c25 differs from pull request most recent head b20ddd3. Consider uploading reports for the commit b20ddd3 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #4116     +/-   ##
=======================================
- Coverage   60.4%   55.5%   -4.9%     
=======================================
  Files        150     146      -4     
  Lines      16745   16603    -142     
=======================================
- Hits       10114    9224    -890     
- Misses      6000    6861    +861     
+ Partials     631     518    -113     

see 42 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 enabled auto-merge (squash) May 31, 2023 16:55
@czeslavo czeslavo merged commit 8f34e26 into main May 31, 2023
40 checks passed
@czeslavo czeslavo deleted the all-in-one-migrations branch May 31, 2023 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/feature New feature or request size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants