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

refactor: refactor Gateway API's route parent status update code #6877

Merged
merged 4 commits into from
Dec 25, 2024

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented Dec 19, 2024

What this PR does / why we need it:

Refactor route parent status handling for Gateway API routes. This extract code from ensureGatewayReferenceStatusAdded from all the route controllers and adds common functions based on implementation ensureGatewayReferenceStatusAdded into internal/controllers/gateway/route_parent_status.go.

Which issue this PR fixes:

Special notes for your reviewer:

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

@pmalek pmalek self-assigned this Dec 19, 2024
@pmalek pmalek force-pushed the refactor-gateway-api-routes-parentref-status branch 3 times, most recently from 7d65d00 to a4da1d7 Compare December 19, 2024 12:22
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 94.69027% with 12 lines in your changes missing coverage. Please review.

Project coverage is 76.8%. Comparing base (6ca4eee) to head (3a7b01e).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ternal/controllers/gateway/grpcroute_controller.go 0.0% 6 Missing ⚠️
...nternal/controllers/gateway/udproute_controller.go 0.0% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #6877     +/-   ##
=======================================
+ Coverage   76.5%   76.8%   +0.2%     
=======================================
  Files        212     214      +2     
  Lines      25246   25139    -107     
=======================================
- Hits       19321   19308     -13     
+ Misses      4912    4814     -98     
- Partials    1013    1017      +4     

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

@pmalek pmalek force-pushed the refactor-gateway-api-routes-parentref-status branch from a4da1d7 to 74daebb Compare December 19, 2024 13:04
@pmalek pmalek marked this pull request as ready for review December 19, 2024 13:36
@pmalek pmalek requested a review from a team as a code owner December 19, 2024 13:36
@pmalek pmalek enabled auto-merge (squash) December 19, 2024 13:36
@pmalek pmalek added this to the KIC v3.5.x milestone Dec 19, 2024
@pmalek pmalek force-pushed the refactor-gateway-api-routes-parentref-status branch from 74daebb to c9a2c4c Compare December 20, 2024 16:00
Copy link
Contributor

@randmonkey randmonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost LGTM, some minor comments.

internal/controllers/gateway/conditions.go Outdated Show resolved Hide resolved
internal/controllers/gateway/conditions.go Outdated Show resolved Hide resolved
internal/controllers/gateway/route_parent_status.go Outdated Show resolved Hide resolved
@pmalek pmalek requested a review from randmonkey December 24, 2024 10:41
@pmalek pmalek force-pushed the refactor-gateway-api-routes-parentref-status branch from 03d3322 to d09588c Compare December 24, 2024 10:41
@pmalek pmalek force-pushed the refactor-gateway-api-routes-parentref-status branch from d09588c to fea7a4c Compare December 24, 2024 11:19
@pmalek pmalek merged commit 3dce2d3 into main Dec 25, 2024
42 checks passed
@pmalek pmalek deleted the refactor-gateway-api-routes-parentref-status branch December 25, 2024 02:21
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.

2 participants