Skip to content

Fix: Applications.Core/gateways can hang deploying contour httpproxy route child before root 12259#12282

Open
gergo-hortobagyi wants to merge 6 commits into
radius-project:mainfrom
gergo-hortobagyi:fix/applicationscoregateways-can-hang-deploying-contour-httpproxy-route-child-before-root--12259
Open

Fix: Applications.Core/gateways can hang deploying contour httpproxy route child before root 12259#12282
gergo-hortobagyi wants to merge 6 commits into
radius-project:mainfrom
gergo-hortobagyi:fix/applicationscoregateways-can-hang-deploying-contour-httpproxy-route-child-before-root--12259

Conversation

@gergo-hortobagyi

Copy link
Copy Markdown

Description

This pull request fixes a deployment hang for Applications.Core/gateways that render Contour HTTPProxy route-child resources before the root gateway HTTPProxy.

Contour route-child HTTPProxy resources do not become independently valid until the root HTTPProxy includes 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-child HTTPProxy resources while preserving readiness validation for root Contour HTTPProxy resources.

The change also adds regression coverage for:

  • ordering gateway output resources so route-child HTTPProxy resources are applied before the root HTTPProxy
  • identifying Contour route-child HTTPProxy resources
  • ensuring route-child HTTPProxy resources bypass the readiness waiter
  • ensuring root Contour HTTPProxy resources still wait for readiness
  • ensuring non-Contour resources named HTTPProxy are not sent through the Contour waiter

Validation performed:

  • Deployed the issue repro in a real kind cluster with the branch applications-rp image; the deployment completed and all generated Contour HTTPProxy resources became valid.
  • go test -count=1 ./pkg/corerp/renderers/gateway ./pkg/corerp/handlers ./pkg/rp/v1
  • make build
  • Helm unit tests
  • Full ./pkg/... test sweep with arm64 envtest assets
  • make lint

Type of change

Fixes: #12259

Contributor checklist

Please verify that the PR meets the following requirements, where applicable:

  • An overview of proposed schema changes is included in a linked GitHub issue.
    • Yes
    • Not applicable
  • A design document is added or updated under eng/design-notes/ in this repository, if new APIs are being introduced.
    • Yes
    • Not applicable
  • The design document has been reviewed and approved by Radius maintainers/approvers.
    • Yes
    • Not applicable
  • A PR for resource-types-contrib is created, if resource types or recipes are affected by the changes in this PR.
    • Yes
    • Not applicable
  • A PR for dashboard is created, if the Radius Dashboard is affected by the changes in this PR.
    • Yes
    • Not applicable
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
    • Yes
    • Not applicable

Signed-off-by: Gergo Hortobagyi <gergo@afterhours.hu>
Signed-off-by: Gergo Hortobagyi <gergo@afterhours.hu>
Signed-off-by: Gergo Hortobagyi <gergo@afterhours.hu>
Copilot AI review requested due to automatic review settings June 27, 2026 20:02
@gergo-hortobagyi
gergo-hortobagyi requested review from a team as code owners June 27, 2026 20:02
@gergo-hortobagyi
gergo-hortobagyi requested a deployment to external-contributor-approval June 27, 2026 20:02 — with GitHub Actions Waiting
…ing-contour-httpproxy-route-child-before-root--12259

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 HTTPProxy resources; continue waiting for root Contour HTTPProxy readiness.
  • Add a Contour-aware guard so non-Contour resources with kind: HTTPProxy bypass 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.

@gergo-hortobagyi
gergo-hortobagyi requested a deployment to external-contributor-approval June 30, 2026 20:11 — with GitHub Actions Waiting
@gergo-hortobagyi
gergo-hortobagyi deployed to external-contributor-approval July 2, 2026 21:24 — with GitHub Actions Active
@itpropro

itpropro commented Jul 10, 2026

Copy link
Copy Markdown

Any updates on this @willdavsmith we encountered this issue a few times now?

willdavsmith
willdavsmith previously approved these changes Jul 14, 2026

@willdavsmith willdavsmith left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks great. thanks!

@willdavsmith
willdavsmith enabled auto-merge July 14, 2026 16:29
@radius-functional-tests

radius-functional-tests Bot commented Jul 14, 2026

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Click here to see the test run details
Name Value
Repository gergo-hortobagyi/radius
Commit ref e7d6cf2
Unique ID func364ded1f9b
Image tag pr-func364ded1f9b
  • Dapr: 1.14.4
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func364ded1f9b
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func364ded1f9b
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func364ded1f9b
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func364ded1f9b
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func364ded1f9b
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
❌ Test tool installation for ucp-cloud failed. Please check the logs for more details
❌ Failed to install Radius for ucp-cloud functional test. Please check the logs for more details
❌ ucp-cloud functional test failed. Please check the logs for more details
❌ Test tool installation for corerp-cloud failed. Please check the logs for more details
❌ Failed to install Radius for corerp-cloud functional test. Please check the logs for more details
❌ corerp-cloud functional test failed. Please check the logs for more details
⌛ Starting ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.04%. Comparing base (8272398) to head (e7d6cf2).
⚠️ Report is 42 commits behind head on main.

Files with missing lines Patch % Lines
...kg/corerp/handlers/kubernetes_http_proxy_waiter.go 81.63% 6 Missing and 3 partials ⚠️
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.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@willdavsmith

Copy link
Copy Markdown
Contributor

@gergo-hortobagyi GitHub is reporting that one (or more) of the commits are unsigned, can you address?

@gergo-hortobagyi
gergo-hortobagyi requested a deployment to external-contributor-approval July 15, 2026 09:19 — with GitHub Actions Waiting
Signed-off-by: Gergo Hortobagyi <gergo@afterhours.hu>
auto-merge was automatically disabled July 15, 2026 09:46

Head branch was pushed to by a user without write access

@gergo-hortobagyi
gergo-hortobagyi force-pushed the fix/applicationscoregateways-can-hang-deploying-contour-httpproxy-route-child-before-root--12259 branch from 32d54ab to 41cf02a Compare July 15, 2026 09:46
@gergo-hortobagyi
gergo-hortobagyi requested a deployment to external-contributor-approval July 15, 2026 09:47 — with GitHub Actions Waiting
@gergo-hortobagyi
gergo-hortobagyi requested a deployment to external-contributor-approval July 15, 2026 09:47 — with GitHub Actions Waiting
…ing-contour-httpproxy-route-child-before-root--12259
@gergo-hortobagyi
gergo-hortobagyi requested a deployment to external-contributor-approval July 15, 2026 09:48 — with GitHub Actions Waiting
@gergo-hortobagyi

gergo-hortobagyi commented Jul 15, 2026

Copy link
Copy Markdown
Author

GitHub is reporting that one (or more) of the commits are unsigned, can you address?

@willdavsmith
Thanks for pointing out.
To avoid signing all 120 commits again by a rebase or mangling the history with a filter, I reverted the main base merges that followed the commit in question, ammend-signed it, then force pushed and re-merged base. Due to the force push, you will need to re-approve to merge this back.

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.

Applications.Core/gateways can hang deploying Contour HTTPProxy route child before root

4 participants