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: use only 46 bits for priorities of Kong routes #5024

Merged
merged 2 commits into from
Oct 31, 2023

Conversation

randmonkey
Copy link
Contributor

@randmonkey randmonkey commented Oct 31, 2023

What this PR does / why we need it:

Use only 46 bits in calculated priority of generated Kong routes when expression router is enabled. This prevent Kong gateway to decode it to scientific notation that will cause precision loss in dumping and comparing the configurations.

Which issue this PR fixes:

fixes #5009 and also #4990.

Special notes for your reviewer:

Review on changelog: should this change be notated as a Breaking change?

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

@randmonkey randmonkey requested a review from a team as a code owner October 31, 2023 03:18
@randmonkey randmonkey added the ci/run-e2e Trigger e2e test run from PR label Oct 31, 2023
@team-k8s-bot
Copy link
Collaborator

E2E (targeted) tests with KIND-based clusters were started at https://github.com/Kong/kubernetes-ingress-controller/actions/runs/6701692323

@team-k8s-bot team-k8s-bot removed the ci/run-e2e Trigger e2e test run from PR label Oct 31, 2023
@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (0422f3b) 75.3% compared to head (dd2d339) 75.3%.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #5024     +/-   ##
=======================================
- Coverage   75.3%   75.3%   -0.1%     
=======================================
  Files        167     167             
  Lines      18721   18721             
=======================================
- Hits       14104   14100      -4     
- Misses      3790    3792      +2     
- Partials     827     829      +2     
Files Coverage Δ
internal/dataplane/parser/translators/atc_utils.go 100.0% <ø> (ø)
...rnal/dataplane/parser/translators/grpcroute_atc.go 93.6% <93.7%> (ø)
...rnal/dataplane/parser/translators/httproute_atc.go 90.8% <95.4%> (ø)

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@randmonkey randmonkey force-pushed the fix/limit_route_priority_within_1e14 branch from a7406e1 to dd2d339 Compare October 31, 2023 03:35
@randmonkey randmonkey added the ci/run-e2e Trigger e2e test run from PR label Oct 31, 2023
@team-k8s-bot
Copy link
Collaborator

E2E (targeted) tests with KIND-based clusters were started at https://github.com/Kong/kubernetes-ingress-controller/actions/runs/6702831067

@team-k8s-bot team-k8s-bot removed the ci/run-e2e Trigger e2e test run from PR label Oct 31, 2023
@programmer04 programmer04 added this to the KIC v3.0.0 milestone Oct 31, 2023
@pmalek pmalek merged commit b2475f3 into main Oct 31, 2023
164 checks passed
@pmalek pmalek deleted the fix/limit_route_priority_within_1e14 branch October 31, 2023 09:42
@team-k8s-bot
Copy link
Collaborator

The backport to release/2.12.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/2.12.x release/2.12.x
# Navigate to the new working tree
cd .worktrees/backport-release/2.12.x
# Create a new branch
git switch --create backport-5024-to-release/2.12.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b2475f344850bf9b6722d0cac508a8a2866b8fee
# Push it to GitHub
git push --set-upstream origin backport-5024-to-release/2.12.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/2.12.x

Then, create a pull request where the base branch is release/2.12.x and the compare/head branch is backport-5024-to-release/2.12.x.

czeslavo pushed a commit that referenced this pull request Nov 8, 2023
* fix: use only 46 bits for priorities of Kong routes

(cherry picked from commit b2475f3)
czeslavo added a commit that referenced this pull request Nov 8, 2023
* fix: use only 46 bits for priorities of Kong routes

(cherry picked from commit b2475f3)

Co-authored-by: Tao Yi <tao.yi@konghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants