Skip to content

[oadp-1.6] OADP-8085: fix(gcp): use errors.Is/As for GCS bucket not-found checks#2256

Open
openshift-cherrypick-robot wants to merge 1 commit into
openshift:oadp-1.6from
openshift-cherrypick-robot:cherry-pick-2233-to-oadp-1.6
Open

[oadp-1.6] OADP-8085: fix(gcp): use errors.Is/As for GCS bucket not-found checks#2256
openshift-cherrypick-robot wants to merge 1 commit into
openshift:oadp-1.6from
openshift-cherrypick-robot:cherry-pick-2233-to-oadp-1.6

Conversation

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

This is an automated cherry-pick of #2233

/assign PrasadJoshi12

cloud.google.com/go/storage PR#11519 changed bucket.Attrs() to wrap
ErrBucketNotExist around the underlying *googleapi.Error using
fmt.Errorf("%w: %w", ...), breaking direct == comparisons and type
assertions.

- Add isBucketNotFoundError helper using errors.Is/errors.As to cover
  the sentinel, any wrapped form, and bare *googleapi.Error 404
- Use isBucketNotFoundError in Exists() and Delete()
- Replace type assertions with errors.As in isGCSRetryableError and
  handleGCSError; replace == with errors.Is for ErrBucketNotExist
- Rename local 'errors' channel to 'errs' in deleteObjectsConcurrently
  to fix revive import-shadowing lint failure
- Add TestIsBucketNotFoundError covering all wrapped-error scenarios

Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-ci-robot

openshift-ci-robot commented Jun 29, 2026

Copy link
Copy Markdown

@openshift-cherrypick-robot: Ignoring requests to cherry-pick non-bug issues: OADP-8085

Details

In response to this:

This is an automated cherry-pick of #2233

/assign PrasadJoshi12

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 openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 006f524f-4dd8-4832-8a0f-d77bf0e06b4e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci openshift-ci Bot requested review from kaovilai and sseago June 29, 2026 05:48
@PrasadJoshi12

Copy link
Copy Markdown
Contributor

/retest

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 29, 2026
@sseago

sseago commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 29, 2026
@openshift-ci

openshift-ci Bot commented Jun 29, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: openshift-cherrypick-robot, shubham-pampattiwar, sseago

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 [shubham-pampattiwar,sseago]

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

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD e24d049 and 2 for PR HEAD 7f8b0d7 in total

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 02b3ef4 and 1 for PR HEAD 7f8b0d7 in total

@openshift-ci

openshift-ci Bot commented Jul 1, 2026

Copy link
Copy Markdown

@openshift-cherrypick-robot: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD a92f1dd and 0 for PR HEAD 7f8b0d7 in total

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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants