Skip to content

[oadp-1.6] OADP-5777: Require region in BSL validation when s3Url is set, fix nil config skipping region auto-detection#2182

Merged
openshift-merge-bot[bot] merged 7 commits intoopenshift:oadp-1.6from
openshift-cherrypick-robot:cherry-pick-2109-to-oadp-1.6
May 1, 2026
Merged

[oadp-1.6] OADP-5777: Require region in BSL validation when s3Url is set, fix nil config skipping region auto-detection#2182
openshift-merge-bot[bot] merged 7 commits intoopenshift:oadp-1.6from
openshift-cherrypick-robot:cherry-pick-2109-to-oadp-1.6

Conversation

@openshift-cherrypick-robot
Copy link
Copy Markdown
Contributor

This is an automated cherry-pick of #2109

/assign kaovilai

kaovilai and others added 7 commits April 30, 2026 15:40
When a custom s3Url is configured, the BSL points to a non-AWS
S3-compatible service (e.g. IBM Cloud Object Storage, MinIO) where
region auto-discovery via AWS HeadBucket API is not valid. Previously,
region was only enforced when s3ForcePathStyle was true or AWS
discovery failed. This allowed validation to pass with a missing
region if a same-named bucket happened to exist on AWS, causing
Velero to fail at runtime.

Fixes: openshift#2108

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…configuration

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Split the generic "region is required" error into three distinct
messages based on the trigger condition: s3Url configured,
s3ForcePathStyle enabled, or region auto-discovery failure.
This gives users actionable feedback about why region is needed.

Update E2E test expectation to match the s3ForcePathStyle path.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
When DPA backupLocations has no config section, bslSpec.Config is nil,
causing UpdateBackupStorageLocation to skip all AWS-specific logic
including region auto-detection and checksumAlgorithm defaults. This
is the root cause of OADP-5777 still reproducing after PR openshift#1740.

Initialize config map when nil so AWS logic runs regardless of whether
user specifies a config section. Add test coverage for nil config with
both discoverable and undiscoverable buckets.

Fixes: https://issues.redhat.com/browse/OADP-5777

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Update TestDPAReconciler_updateBSLFromSpec to expect checksumAlgorithm
in config when bslSpec.Config starts nil, matching the new behavior.
Add mock for GetBucketRegionFunc to prevent real AWS calls in test.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Reuse previously auto-detected region from existing BSL instead of
calling AWS GetBucketRegion on every reconcile. Without this, each
reconcile reads DPA spec (no region) → auto-detects → updates BSL →
triggers new reconcile in a loop.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 30, 2026

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

Details

In response to this:

This is an automated cherry-pick of #2109

/assign kaovilai

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
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

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: f3fdf9c8-1c57-4c6e-b9ef-9c73bb9748ec

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 and usage tips.

Copy link
Copy Markdown
Member

@kaovilai kaovilai left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 30, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 30, 2026

[APPROVALNOTIFIER] This PR is APPROVED

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

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

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

@kaovilai
Copy link
Copy Markdown
Member

/retest

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 226a5c9 and 2 for PR HEAD b739e83 in total

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 1, 2026

@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 openshift-merge-bot Bot merged commit 3fa3730 into openshift:oadp-1.6 May 1, 2026
18 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. 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