Skip to content

Only treat typed HTTP 404 as successful deletion - #4984

Merged
kubernetes-prow[bot] merged 3 commits into
masterfrom
copilot/fix-waitutils-arbitrary-supplier-failures
Nov 5, 2026
Merged

kubernetes-prow[bot] merged 3 commits into
masterfrom
copilot/fix-waitutils-arbitrary-supplier-failures

Conversation

Copilot AI commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

waitUntilDeleted previously treated every supplier exception as proof that a resource was gone. This could let cleanup continue after API or runtime failures, including checked ApiExceptions wrapped for use with Supplier.

  • WaitUtils: Completes on a null result or an ApiException with HTTP status 404, including when wrapped. Other supplier exceptions surface immediately; status is determined by exception type and code, not message.
  • ResourceClient: Propagates non-404 API failures instead of converting them to null, while preserving its checked ApiException contract.
WaitUtils.waitUntilDeleted(
    () -> {
      throw new RuntimeException(new ApiException(404, "Resource is gone"));
    },
    timeout);

@kubernetes-prow kubernetes-prow Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 3, 2026
@kubernetes-prow kubernetes-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 3, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

@kubernetes-prow kubernetes-prow Bot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 3, 2026
@kubernetes-prow kubernetes-prow Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 3, 2026
Copilot AI changed the title [WIP] Fix WaitUtils to not treat arbitrary supplier failures as successful deletion Only treat typed HTTP 404 as successful deletion Nov 3, 2026
Copilot AI requested a review from brendandburns November 3, 2026 19:56
@brendandburns
brendandburns force-pushed the copilot/fix-waitutils-arbitrary-supplier-failures branch from 789f9c0 to 2ba8d0a Compare November 4, 2026 18:52
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Nov 4, 2026
@brendandburns
brendandburns marked this pull request as ready for review November 5, 2026 17:54
@kubernetes-prow kubernetes-prow Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 5, 2026
@kubernetes-prow
kubernetes-prow Bot requested a review from yue9944882 November 5, 2026 17:54
@brendandburns

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 5, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, Copilot

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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 5, 2026
@kubernetes-prow
kubernetes-prow Bot merged commit 9a62447 into master Nov 5, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not treat arbitrary supplier failures as successful deletion in WaitUtils

2 participants