-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
chore(test): remove prefix directory when stop_kong called #12691
Conversation
@bungle I left a comment on your PR. I tested the busted event, and it seems that it can only delete one prefix directory. However, for tests related to hybrid mode, they generally start multiple Kong instances, and it seems not to clean them all up. Also, I think the test code needs to pay attention to cleaning up the runtime environment. Furthermore, if we rely solely on the busted helper for environment cleanup, it could lead to flakiness in local tests but not in CI tests (especially for developers who are unaware of the helper's existence). |
If the prefix is not cleaned up when stop_kong is called, it could impact subsequent tests, especially when later tests start Kong by a shell command, the Kong instance might be started up with the default `servroot` prefix. KAG-3808
5b22c1f
to
e120a2d
Compare
Yes it does, but that is majority (it helps when other test leaks to some other test even when the other test doesn't even do kong start or anything else prefix related, e.g. just config parsing). What about cleaning directory by default with Edit: ah, cleanup is the default. And these are just left-overs from local testing or something. Let's merge this then. |
Successfully created cherry-pick PR for |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/2.8.x
git worktree add -d .worktree/backport-12691-to-release/2.8.x origin/release/2.8.x
cd .worktree/backport-12691-to-release/2.8.x
git switch --create backport-12691-to-release/2.8.x
git cherry-pick -x 3dd5bdb78ee9aa4b4f602ec241a4b52b1b0ae353 |
2 similar comments
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/2.8.x
git worktree add -d .worktree/backport-12691-to-release/2.8.x origin/release/2.8.x
cd .worktree/backport-12691-to-release/2.8.x
git switch --create backport-12691-to-release/2.8.x
git cherry-pick -x 3dd5bdb78ee9aa4b4f602ec241a4b52b1b0ae353 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/2.8.x
git worktree add -d .worktree/backport-12691-to-release/2.8.x origin/release/2.8.x
cd .worktree/backport-12691-to-release/2.8.x
git switch --create backport-12691-to-release/2.8.x
git cherry-pick -x 3dd5bdb78ee9aa4b4f602ec241a4b52b1b0ae353 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/3.3.x
git worktree add -d .worktree/backport-12691-to-release/3.3.x origin/release/3.3.x
cd .worktree/backport-12691-to-release/3.3.x
git switch --create backport-12691-to-release/3.3.x
git cherry-pick -x 3dd5bdb78ee9aa4b4f602ec241a4b52b1b0ae353 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/2.8.x
git worktree add -d .worktree/backport-12691-to-release/2.8.x origin/release/2.8.x
cd .worktree/backport-12691-to-release/2.8.x
git switch --create backport-12691-to-release/2.8.x
git cherry-pick -x 3dd5bdb78ee9aa4b4f602ec241a4b52b1b0ae353 |
1 similar comment
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/2.8.x
git worktree add -d .worktree/backport-12691-to-release/2.8.x origin/release/2.8.x
cd .worktree/backport-12691-to-release/2.8.x
git switch --create backport-12691-to-release/2.8.x
git cherry-pick -x 3dd5bdb78ee9aa4b4f602ec241a4b52b1b0ae353 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/3.3.x
git worktree add -d .worktree/backport-12691-to-release/3.3.x origin/release/3.3.x
cd .worktree/backport-12691-to-release/3.3.x
git switch --create backport-12691-to-release/3.3.x
git cherry-pick -x 3dd5bdb78ee9aa4b4f602ec241a4b52b1b0ae353 |
Cherry-pick failed for Please cherry-pick the changes locally. git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-12691-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-12691-to-master-to-upstream
git checkout -b cherry-pick-12691-to-master-to-upstream
ancref=$(git merge-base 9566dd94efb80fc3f8d7a7c875603167f528e2e5 e120a2d567052e020cb3084b2bbf9c28b7f01584)
git cherry-pick -x $ancref..e120a2d567052e020cb3084b2bbf9c28b7f01584 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/3.3.x
git worktree add -d .worktree/backport-12691-to-release/3.3.x origin/release/3.3.x
cd .worktree/backport-12691-to-release/3.3.x
git switch --create backport-12691-to-release/3.3.x
git cherry-pick -x 3dd5bdb78ee9aa4b4f602ec241a4b52b1b0ae353 |
Cherry-pick failed for Please cherry-pick the changes locally. git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-12691-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-12691-to-master-to-upstream
git checkout -b cherry-pick-12691-to-master-to-upstream
ancref=$(git merge-base 9566dd94efb80fc3f8d7a7c875603167f528e2e5 e120a2d567052e020cb3084b2bbf9c28b7f01584)
git cherry-pick -x $ancref..e120a2d567052e020cb3084b2bbf9c28b7f01584 |
2 similar comments
Cherry-pick failed for Please cherry-pick the changes locally. git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-12691-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-12691-to-master-to-upstream
git checkout -b cherry-pick-12691-to-master-to-upstream
ancref=$(git merge-base 9566dd94efb80fc3f8d7a7c875603167f528e2e5 e120a2d567052e020cb3084b2bbf9c28b7f01584)
git cherry-pick -x $ancref..e120a2d567052e020cb3084b2bbf9c28b7f01584 |
Cherry-pick failed for Please cherry-pick the changes locally. git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-12691-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-12691-to-master-to-upstream
git checkout -b cherry-pick-12691-to-master-to-upstream
ancref=$(git merge-base 9566dd94efb80fc3f8d7a7c875603167f528e2e5 e120a2d567052e020cb3084b2bbf9c28b7f01584)
git cherry-pick -x $ancref..e120a2d567052e020cb3084b2bbf9c28b7f01584 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/3.4.x
git worktree add -d .worktree/backport-12691-to-release/3.4.x origin/release/3.4.x
cd .worktree/backport-12691-to-release/3.4.x
git switch --create backport-12691-to-release/3.4.x
git cherry-pick -x 3dd5bdb78ee9aa4b4f602ec241a4b52b1b0ae353 |
You have exceeded a secondary rate limit and have been temporarily blocked from content creation. Please retry your request again later. If you reach out to GitHub Support for help, please include the request ID 63C2:B53AE:2675E8E:472FD70:65EAC963. |
Git push to origin failed for release/3.6.x with exitcode 1 |
1 similar comment
Git push to origin failed for release/3.6.x with exitcode 1 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/3.5.x
git worktree add -d .worktree/backport-12691-to-release/3.5.x origin/release/3.5.x
cd .worktree/backport-12691-to-release/3.5.x
git switch --create backport-12691-to-release/3.5.x
git cherry-pick -x 3dd5bdb78ee9aa4b4f602ec241a4b52b1b0ae353 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/3.5.x
git worktree add -d .worktree/backport-12691-to-release/3.5.x origin/release/3.5.x
cd .worktree/backport-12691-to-release/3.5.x
git switch --create backport-12691-to-release/3.5.x
git cherry-pick -x 3dd5bdb78ee9aa4b4f602ec241a4b52b1b0ae353 |
Git push to origin failed for release/3.6.x with exitcode 1 |
1 similar comment
Git push to origin failed for release/3.6.x with exitcode 1 |
* chore(test): remove prefix directory when stop_kong called (#12691) If the prefix is not cleaned up when stop_kong is called, it could impact subsequent tests, especially when later tests start Kong by a shell command, the Kong instance might be started up with the default `servroot` prefix. KAG-3808 (cherry picked from commit 3dd5bdb) * remove prefix directory for 2.8
* chore(test): remove prefix directory when stop_kong called (#12691) If the prefix is not cleaned up when stop_kong is called, it could impact subsequent tests, especially when later tests start Kong by a shell command, the Kong instance might be started up with the default `servroot` prefix. KAG-3808 (cherry picked from commit 3dd5bdb) * remove prefix directory for 3.3
* chore(test): remove prefix directory when stop_kong called (#12691) If the prefix is not cleaned up when stop_kong is called, it could impact subsequent tests, especially when later tests start Kong by a shell command, the Kong instance might be started up with the default `servroot` prefix. KAG-3808 (cherry picked from commit 3dd5bdb) * remove prefix directory for 3.4
* chore(test): remove prefix directory when stop_kong called (#12691) If the prefix is not cleaned up when stop_kong is called, it could impact subsequent tests, especially when later tests start Kong by a shell command, the Kong instance might be started up with the default `servroot` prefix. KAG-3808 (cherry picked from commit 3dd5bdb) * remove prefix directory for 3.5
* chore(test): remove prefix directory when stop_kong called (#12691) If the prefix is not cleaned up when stop_kong is called, it could impact subsequent tests, especially when later tests start Kong by a shell command, the Kong instance might be started up with the default `servroot` prefix. KAG-3808 (cherry picked from commit 3dd5bdb) * remove prefix directory for 2.8
Co-authored-by: Zachary Hu <[email protected]> Co-authored-by: Niklaus Schen <[email protected]> Co-authored-by: Zhongwei Yao <[email protected]> Co-authored-by: samugi <[email protected]> Co-authored-by: Water-Melon <[email protected]> Co-authored-by: Michael Martin <[email protected]> Co-authored-by: Kong Team Gateway Bot <[email protected]> Co-authored-by: Zachary Hu <[email protected]> Co-authored-by: Qi <[email protected]> Co-authored-by: Mayo <[email protected]> Co-authored-by: Wangchong Zhou <[email protected]> Co-authored-by: Harry <[email protected]> Co-authored-by: Datong Sun <[email protected]> Co-authored-by: Vinicius Mignot <[email protected]> fix directory when stop_kong called (#12713) fix directory when stop_kong called (#12691) fix the workflow that comments the docker image on the commit (#12693) (#12711) fix(ci): replace "cpio" rpm extraction (#13233) (#13263) fix label-check test (#9717)
Summary
This PR cleans up the prefix in the tests.
If the prefix is not cleaned up when
stop_kong
is called, it could impact subsequent tests, especially when later tests start Kong by a shell command, the Kong instance might be started up with the defaultservroot
prefix.Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
KAG-3808