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(ci): fix migration test failed to run when updating migration files for an unreleased version #13134

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

raoxiaoyan
Copy link
Contributor

@raoxiaoyan raoxiaoyan commented Jun 1, 2024

Summary

This PR fixes an issue that migration tests will fail when the migration files for the next unreleased version get updated.

It has created a PR base branch next/3.4.x.x. Add migration scripts to the existing script file, such as kong/enterprise_edition/db/migrations/enterprise/021_3435_to_3436.lua. It will be ignored when executing kong migrations up.

case 1: upgrade next/2.8.x.x to the current PR of the next/3.4.x.x. the migration 021_3435_to_3436.lua is always new.
The upgrade_tests are work well.

case 2: Upgrade next/3.4.x.x to the current PR of next/3.4.x.x. When starting the next/3.4.x.x container, the migration script 021_3435_to_3436.lua will be bootstrapped for the first time. Then, upgrade to this PR. The second time using kong migrations up to bootstrap the script will not execute the migration script 021_3435_to_3436.lua.

There is an example. https://github.com/Kong/kong-ee/actions/runs/9310936847/job/25629308613

Checklist

  • The Pull Request has tests
  • A changelog file has been added to CHANGELOG/unreleased/kong or adding skip-changelog label on PR if unnecessary. README.md
  • The Pull Request has backports to all the versions it needs to cover
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

@github-actions github-actions bot added the cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee label Jun 1, 2024
@raoxiaoyan raoxiaoyan requested a review from samugi June 1, 2024 00:19
@raoxiaoyan raoxiaoyan requested a review from ADD-SP June 2, 2024 13:22
@windmgc windmgc changed the title test(ci):kong migrations can't up in sometimes test(ci): fix an issue caused migration test failed to run when updating migration files for an unreleased version Jun 3, 2024
@windmgc windmgc changed the title test(ci): fix an issue caused migration test failed to run when updating migration files for an unreleased version tests(ci): fix an issue caused migration test failed to run when updating migration files for an unreleased version Jun 3, 2024
@windmgc windmgc changed the title tests(ci): fix an issue caused migration test failed to run when updating migration files for an unreleased version tests(ci): fix migration test failed to run when updating migration files for an unreleased version Jun 3, 2024
@windmgc windmgc merged commit 09523a4 into master Jun 3, 2024
56 checks passed
@windmgc windmgc deleted the fix/test_upgrade branch June 3, 2024 02:28
github-actions bot pushed a commit that referenced this pull request Jun 3, 2024
…iles for an unreleased version (#13134)

(cherry picked from commit 09523a4)
@team-gateway-bot
Copy link
Collaborator

Successfully created cherry-pick PR for master:

@team-gateway-bot
Copy link
Collaborator

@team-gateway-bot
Copy link
Collaborator

@team-gateway-bot
Copy link
Collaborator

@team-gateway-bot
Copy link
Collaborator

windmgc pushed a commit that referenced this pull request Jun 3, 2024
…iles for an unreleased version (#13134)

(cherry picked from commit 09523a4)
windmgc pushed a commit that referenced this pull request Jun 3, 2024
…iles for an unreleased version (#13134)

(cherry picked from commit 09523a4)
windmgc pushed a commit that referenced this pull request Jun 3, 2024
…iles for an unreleased version (#13134)

(cherry picked from commit 09523a4)
windmgc pushed a commit that referenced this pull request Jun 3, 2024
…iles for an unreleased version (#13134)

(cherry picked from commit 09523a4)
locao pushed a commit that referenced this pull request Jun 21, 2024
…iles for an unreleased version (#13134)

(cherry picked from commit 09523a4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release/3.7.x cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants