← Back to Pull requests

decoder: honor context cancellation in DecodeURL #598

Merged
git-jxj merged 2 files (101 lines) on Oct 06, 2026 08:26 UTC
View on GitHub
git-jxj git-jxj commented on Oct 06, 2026 02:38 UTC
Author

What type of PR is this?

/kind bug

What this PR does / why we need it:

DecodeURL accepts a context, but its HTTP request uses a background context. Cancelling the supplied context therefore cannot interrupt waiting for response headers or an unfinished response body.

Pass the supplied context to the HTTP request and cover both cancellation phases with HTTP regression tests. The body test first confirms that a YAML object has been decoded before cancelling the remaining download.

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

Verified both regressions before the fix and passed 20 runs with the race detector afterward. Decoder package test compilation, go vet, boilerplate verification, module verification, and repository-pinned golangci-lint checks pass. The regression tests were run as standalone HTTP unit tests; the full decoder Kind integration suite was not run.

OpenAI Codex generated the implementation, tests, commit message, and PR description, and ran the local verification.

Does this PR introduce a user-facing change?

``release-note
DecodeURL now cancels HTTP downloads when the supplied context is cancelled or its deadline expires.


#### Additional documentation e.g., Usage docs, etc.:

docs
NONE
``

Diff: 101 lines (+100 / -1) across 2 files Reviewer: cpanato Review duration: 348m
All Vouch review confidence checks passed
Residual risk 0.04 = Change Risk (0.37) × (1 − Review Confidence (0.91)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 101 lines diff across 2 files
0.37
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.93 · 3 substantive comment(s)
0.93
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
90%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.277
Ai Authored ai_authored
0.050
Real PR Conversation Timeline
5 items
kubernetes-prow[bot] kubernetes-prow[bot] commented on Oct 06, 2026 02:38 UTC
Bot

Hi @git-jxj. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

>[!TIP]
>We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

<details>

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
</details>

cpanato cpanato commented on Oct 06, 2026 06:10 UTC
Contributor

/ok-to-test

cpanato cpanato approved these changes on Oct 06, 2026 08:24 UTC
Approved Reviewer

thanks
/approve
/lgtm

kubernetes-prow[bot] kubernetes-prow[bot] commented on Oct 06, 2026 08:24 UTC
Bot

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: <a href="https://github.com/kubernetes-sigs/e2e-framework/pull/598#pullrequestreview-5425695264" title="Approved">cpanato</a>, <a href="https://github.com/kubernetes-sigs/e2e-framework/pull/598#" title="Author self-approved">git-jxj</a>

The full list of commands accepted by this bot can be found here.

The pull request process is described here

<details >
Needs approval from an approver in each of these files:

  • ~~OWNERS~~ [cpanato]
  • Approvers can indicate their approval by writing /approve in a comment
    Approvers can cancel approval by writing /approve cancel in a comment
    </details>
    <!-- META={"approvers":[]} -->

    Reviewers
    Assignees
    git-jxj git-jxj
    Labels
    risk: low confidence: 90.6% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 37.1% (MEDIUM) · Higher = larger blast radius
    37.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 90.6% · Lower = rushed or shallow review
    90.6%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 3.5% · Safe to merge
    3.5%