Skip to content

[oadp-dev] Fix IncludedClusterScopedResources test panic - #368

Merged
openshift-merge-bot[bot] merged 3 commits into
migtools:oadp-devfrom
Joeavaikath:fix-vgs-label-key-test-oadp-dev
Jul 28, 2026
Merged

[oadp-dev] Fix IncludedClusterScopedResources test panic#368
openshift-merge-bot[bot] merged 3 commits into
migtools:oadp-devfrom
Joeavaikath:fix-vgs-label-key-test-oadp-dev

Conversation

@Joeavaikath

@Joeavaikath Joeavaikath commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes multiple CI failures on the oadp-dev scheduled run (#854):

  • golang-check: Remove IncludedClusterScopedResources from the wildcard exclusion test scenario — this field is rejected by ValidateBackupSpec as restricted, causing the reconciler to fail before creating a VeleroBackup and the test to panic on nil Status.VeleroBackup
  • container-check: Update Dockerfile from golang:1.25 to golang:1.26 to match go.mod requirement
  • project-check: Regenerate CRD manifests (make manifests)

The oadp-compatibility-check failure (make update-velero-manifests) cannot be fixed here — oadp-operator's oadp-dev branch pins an older velero version than oadp-non-admin's. Once oadp-operator bumps its velero to match, that check should pass.

Test plan

  • golang-check passes (panicking test no longer sets a restricted field)
  • container-check passes (Dockerfile Go version matches go.mod)
  • project-check passes (CRD manifests up to date)

Posted via Claude Code

Summary by CodeRabbit

  • New Features
    • Added support for referencing Secret-based CA certificate bundles for non-admin backup storage locations.
    • Added restore resource policy references through ConfigMaps.
  • Improvements
    • Marked the existing inline CA certificate setting as deprecated in favor of Secret references.
    • Updated the build environment to use Go 1.26.
  • Bug Fixes
    • Corrected backup configuration expectations when excluding all namespace-scoped resources.

…ion test

The excludedNamespaceScopedResources wildcard test set IncludedClusterScopedResources
which is rejected by ValidateBackupSpec as a restricted field, causing the reconciler
to fail before creating a VeleroBackup and the test to panic on nil Status.VeleroBackup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

CRD schemas add Secret-based CA certificate references and restore resource policy references. A wildcard backup reconciliation test expectation is adjusted, and the Docker builder image is upgraded from Go 1.25 to Go 1.26.

Changes

Non-admin API schema and reconciliation

Layer / File(s) Summary
Secret-based CA references
config/crd/bases/oadp.openshift.io_nonadminbackupstoragelocationrequests.yaml, config/crd/bases/oadp.openshift.io_nonadminbackupstoragelocations.yaml
Both backup storage schemas deprecate inline caCert and add atomic Secret references with required keys.
Restore resource policy reference
config/crd/bases/oadp.openshift.io_nonadminrestores.yaml
The restore schema adds a nullable ConfigMap reference for Velero resource filter policies.
Wildcard backup expectation
internal/controller/nonadminbackup_controller_test.go
The wildcard exclusion test no longer expects persistent volumes in included cluster-scoped resources.

Builder image refresh

Layer / File(s) Summary
Go builder image upgrade
Dockerfile
The builder stage base image changes from Go 1.25 to Go 1.26 while retaining $BUILDPLATFORM.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title matches the main change by describing the test panic fix caused by IncludedClusterScopedResources.
Description check ✅ Passed The description covers the motivation and testing steps, with only a minor heading mismatch from the template.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@oadp-snyk

oadp-snyk commented Jul 23, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Joeavaikath and others added 2 commits July 23, 2026 15:15
go.mod requires go 1.26.0 but the Dockerfile used golang:1.25,
causing container-check CI to fail with GOTOOLCHAIN=local.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Run 'make manifests' to update CRD bases that were out of date,
fixing the project-check CI failure.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Joeavaikath
Joeavaikath marked this pull request as ready for review July 23, 2026 19:20
@sseago

sseago commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

/lgtm

@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Joeavaikath, kaovilai, 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:

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
openshift-merge-bot Bot merged commit a041235 into migtools:oadp-dev Jul 28, 2026
4 checks passed
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.

4 participants