Skip to content

fix: gateway router should wait for accepted condition#1791

Merged
stefanprodan merged 1 commit intofluxcd:mainfrom
steved:main
Oct 16, 2025
Merged

fix: gateway router should wait for accepted condition#1791
stefanprodan merged 1 commit intofluxcd:mainfrom
steved:main

Conversation

@steved
Copy link
Copy Markdown
Contributor

@steved steved commented Apr 8, 2025

It can take some time for changes to propagate for cloud load balancers, so flagger should ensure the route changes are current before proceeding with any more.

I'm not considering observedGeneration optional due to the upstream language, but I'm not sure if it's truly guaranteed so if it's easier to make this behavior opt-in then I'm happy to add it.

Additionally, the upstream Conditions struct contains an optional
observedGeneration field - implementations MUST use this field and set it to
the metadata.generation field of the object at the time the status is generated.
This allows users of the API to determine if the status is relevant to the current
version of the object.

https://github.com/kubernetes-sigs/gateway-api/blob/v1.2.1/site-src/guides/implementers.md?plain=1#L156C1-L160C23

It can take some time for changes to propagate for cloud load balancers,
so flagger should ensure the route changes are current before proceeding
with any more.

Signed-off-by: Steven Davidovitz <sdavidovitz@groq.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 30.43%. Comparing base (12ee6cb) to head (bb7ad65).
⚠️ Report is 57 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1791      +/-   ##
==========================================
- Coverage   39.44%   30.43%   -9.01%     
==========================================
  Files         287      287              
  Lines       22706    22074     -632     
==========================================
- Hits         8956     6719    -2237     
- Misses      12777    14626    +1849     
+ Partials      973      729     -244     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stefanprodan
Copy link
Copy Markdown
Member

I think is Ok to check the Accepted condition. If the Gateway API implementation does set this condition, then it should properly reflect the observed generation.

@stefanprodan stefanprodan merged commit fce1781 into fluxcd:main Oct 16, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants