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: properly detect UpstreamPolicy conflict in HTTPRoutes #5417

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

czeslavo
Copy link
Contributor

@czeslavo czeslavo commented Jan 10, 2024

What this PR does / why we need it:

This ensures that the Accepted condition in KongUpstreamPolicy ancestor's status is set to Conflicted for a Service used in an HTTPRoute only if it is used together with a different Service in a single HTTPRoute's rule.

Before this change, we'd set Conflicted even if Services using different KongUpstreamPolicies were used in separate rules in an HTTPRoute, which shouldn't be the case.

Which issue this PR fixes:

It fixes a problem discovered during work on #5293.

Special notes for your reviewer:

Changelog entry was omitted as it is a fix to a net new feature that hasn't been released yet.

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

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

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

Comparison is base (60cecc2) 69.3% compared to head (abc1f5d) 69.3%.
Report is 6 commits behind head on main.

❗ Current head abc1f5d differs from pull request most recent head d8b15ee. Consider uploading reports for the commit d8b15ee to get more accurate results

Files Patch % Lines
...trollers/configuration/kongupstreampolicy_utils.go 91.8% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #5417     +/-   ##
=======================================
- Coverage   69.3%   69.3%   -0.1%     
=======================================
  Files        176     176             
  Lines      22355   22377     +22     
=======================================
+ Hits       15511   15523     +12     
- Misses      5921    5929      +8     
- Partials     923     925      +2     

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

@czeslavo czeslavo force-pushed the fix/upstreampolicy-status-httproute branch from 20911aa to abc1f5d Compare January 10, 2024 18:11
@czeslavo czeslavo added the fix label Jan 10, 2024
@czeslavo czeslavo added this to the KIC v3.1.x milestone Jan 10, 2024
@czeslavo czeslavo marked this pull request as ready for review January 11, 2024 09:20
@czeslavo czeslavo requested a review from a team as a code owner January 11, 2024 09:20
@czeslavo czeslavo enabled auto-merge (squash) January 12, 2024 10:06
@czeslavo czeslavo merged commit 9caec73 into main Jan 12, 2024
35 checks passed
@czeslavo czeslavo deleted the fix/upstreampolicy-status-httproute branch January 12, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants