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

[Backport release/3.1.x] deduplicate nil-weight targets (#5946) #6025

Merged
merged 2 commits into from
May 15, 2024

Conversation

randmonkey
Copy link
Contributor

@randmonkey randmonkey commented May 15, 2024

What this PR does / why we need it:

Backport #5946 to release/3.1.x. This fixes a potential segfault.

Which issue this PR fixes:

Special notes for your reviewer:

Since the targetWeightOrDefault is moved to traslator_upstreams.go in main, the backporting requires to move the changes to the original file translator.go.

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

rainest and others added 2 commits May 15, 2024 16:22
Assume the Kong default 100 weight for targets that have nil weight when
being deduplicated.

(cherry picked from commit b8f7eb5)
@randmonkey randmonkey requested a review from a team as a code owner May 15, 2024 08:39
@randmonkey randmonkey added this to the KIC v3.1.x milestone May 15, 2024
@randmonkey randmonkey mentioned this pull request May 15, 2024
29 tasks
Copy link

codecov bot commented May 15, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 1 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (release/3.1.x@bff96c9). Click here to learn what that means.

Files Patch % Lines
internal/dataplane/translator/translator.go 80.0% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##             release/3.1.x   #6025   +/-   ##
===============================================
  Coverage                 ?   72.0%           
===============================================
  Files                    ?     177           
  Lines                    ?   18317           
  Branches                 ?       0           
===============================================
  Hits                     ?   13203           
  Misses                   ?    4153           
  Partials                 ?     961           

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

@randmonkey randmonkey changed the title Backport 5946 to release/3.1.x Backport(3.1.x): deduplicate nil-weight targets (#5946) May 15, 2024
@randmonkey randmonkey changed the title Backport(3.1.x): deduplicate nil-weight targets (#5946) [Backport release/3.1.x] deduplicate nil-weight targets (#5946) May 15, 2024
@randmonkey randmonkey added the ci/run-e2e Trigger e2e test run from PR label May 15, 2024
@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/9098997307

@team-k8s-bot team-k8s-bot removed the ci/run-e2e Trigger e2e test run from PR label May 15, 2024
@randmonkey randmonkey merged commit 779cad2 into release/3.1.x May 15, 2024
181 checks passed
@randmonkey randmonkey deleted the backport-5946-to-release/3.1.x branch May 15, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants