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

fix(core): initialize route to avoid race (500) #13924

Merged
merged 2 commits into from
Nov 27, 2024
Merged

Conversation

StarlightIbuki
Copy link
Contributor

@StarlightIbuki StarlightIbuki commented Nov 26, 2024

Summary

The init router creation could be interrupted and we assume it will always be a non-nil value after the init_worker phase, which may cause 500 to proxy requests.

Let's create an empty router before creating the initial router.

As the issue occurs at this version I omitted the changelog.

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

Fix KAG-5815

@github-actions github-actions bot added core/proxy cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Nov 26, 2024
@StarlightIbuki StarlightIbuki force-pushed the fix/500-init-route branch 2 times, most recently from 103adf1 to 7eeb746 Compare November 26, 2024 07:40
kong/runloop/handler.lua Outdated Show resolved Hide resolved
@ADD-SP ADD-SP merged commit 67bb527 into master Nov 27, 2024
26 checks passed
@ADD-SP ADD-SP deleted the fix/500-init-route branch November 27, 2024 08:14
@team-gateway-bot
Copy link
Collaborator

Cherry-pick failed for master, because it was unable to cherry-pick the commit(s).

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-13924-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-13924-to-master-to-upstream
git checkout -b cherry-pick-13924-to-master-to-upstream
ancref=$(git merge-base 6fdad2580ef0c76a8920a4eded178339befcdc55 94fdea32cf73a4044cb51d3185aca02a028c1adf)
git cherry-pick -x $ancref..94fdea32cf73a4044cb51d3185aca02a028c1adf

@github-actions github-actions bot added the incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee core/proxy incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention size/S skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants