Fix: Applications.Core/gateways can hang deploying contour httpproxy route child before root 12259#12282
Conversation
Signed-off-by: Gergo Hortobagyi <gergo@afterhours.hu>
Signed-off-by: Gergo Hortobagyi <gergo@afterhours.hu>
Signed-off-by: Gergo Hortobagyi <gergo@afterhours.hu>
…ing-contour-httpproxy-route-child-before-root--12259
There was a problem hiding this comment.
Pull request overview
Fixes a deployment hang when applying Applications.Core/gateways resources backed by Contour by ensuring route-child HTTPProxy resources do not block deployment readiness while still validating readiness for the root HTTPProxy.
Changes:
- Skip readiness waiting for Contour route-child
HTTPProxyresources; continue waiting for root ContourHTTPProxyreadiness. - Add a Contour-aware guard so non-Contour resources with
kind: HTTPProxybypass the Contour waiter entirely. - Add regression tests covering output-resource ordering, route-child detection, and waiter behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/corerp/renderers/gateway/render_test.go | Adds a regression test asserting route-child HTTPProxy output resources are ordered before the root gateway HTTPProxy. |
| pkg/corerp/handlers/kubernetes.go | Updates the Kubernetes handler to only invoke the Contour HTTPProxy waiter for Contour resources, and to skip waits for route-child HTTPProxy resources. |
| pkg/corerp/handlers/kubernetes_test.go | Adds tests verifying route-child HTTPProxy skips waiting, root HTTPProxy still waits, and non-Contour HTTPProxy bypasses the waiter. |
| pkg/corerp/handlers/kubernetes_http_proxy_waiter.go | Introduces Contour HTTPProxy/route-child identification helpers and uses them to avoid validating route-child readiness. |
| pkg/corerp/handlers/kubernetes_http_proxy_waiter_test.go | Adds unit tests for route-child detection and for ensuring root invalid status is still surfaced as an error. |
|
Any updates on this @willdavsmith we encountered this issue a few times now? |
willdavsmith
left a comment
There was a problem hiding this comment.
looks great. thanks!
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12282 +/- ##
==========================================
+ Coverage 52.98% 53.04% +0.05%
==========================================
Files 754 754
Lines 48686 48705 +19
==========================================
+ Hits 25796 25834 +38
+ Misses 20466 20438 -28
- Partials 2424 2433 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@gergo-hortobagyi GitHub is reporting that one (or more) of the commits are unsigned, can you address? |
Signed-off-by: Gergo Hortobagyi <gergo@afterhours.hu>
Head branch was pushed to by a user without write access
32d54ab to
41cf02a
Compare
…ing-contour-httpproxy-route-child-before-root--12259
@willdavsmith |
Description
This pull request fixes a deployment hang for
Applications.Core/gatewaysthat render ContourHTTPProxyroute-child resources before the root gatewayHTTPProxy.Contour route-child
HTTPProxyresources do not become independently valid until the rootHTTPProxyincludes them, so Radius should not wait for each route child to report readiness immediately after applying it. This change skips readiness waits for Contour route-childHTTPProxyresources while preserving readiness validation for root ContourHTTPProxyresources.The change also adds regression coverage for:
HTTPProxyresources are applied before the rootHTTPProxyHTTPProxyresourcesHTTPProxyresources bypass the readiness waiterHTTPProxyresources still wait for readinessHTTPProxyare not sent through the Contour waiterValidation performed:
applications-rpimage; the deployment completed and all generated ContourHTTPProxyresources becamevalid.go test -count=1 ./pkg/corerp/renderers/gateway ./pkg/corerp/handlers ./pkg/rp/v1make build./pkg/...test sweep with arm64 envtest assetsmake lintType of change
NOTE: This issue was not approved yet, but it is a production level blocker. The related issue: Applications.Core/gateways can hang deploying Contour HTTPProxy route child before root #12259
Fixes: #12259
Contributor checklist
Please verify that the PR meets the following requirements, where applicable:
eng/design-notes/in this repository, if new APIs are being introduced.