Skip to content

fix: add nil guard for BSL LastValidationTime in BSLsAreUpdated - #2500

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:oadp-1.4from
redhat-chai-bot:fix/bsl-nil-lastvalidationtime
Oct 20, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
openshift:oadp-1.4from
redhat-chai-bot:fix/bsl-nil-lastvalidationtime

Conversation

@redhat-chai-bot

Copy link
Copy Markdown
Contributor

Why the changes were made

The BSLsAreUpdated() function in tests/e2e/lib/dpa_helpers.go dereferences bsl.Status.LastValidationTime without a nil check. When Velero has not yet validated a BackupStorageLocation, LastValidationTime is nil, causing a nil pointer dereference panic.

This has been causing a 3-run failure streak (Oct 18–20) on periodic-ci-openshift-oadp-operator-oadp-1.4-4.18-e2e-test-aws-periodic, where 2 of 28 specs panic with:

runtime error: invalid memory address or nil pointer dereference

at tests/e2e/lib/dpa_helpers.go:304.

How to test the changes made

The fix adds a nil guard so that a BSL whose LastValidationTime is still nil is treated the same as one that has not been updated since updateTime (i.e. the condition returns false and the wait continues).

  1. Run the e2e suite on OCP 4.18:
    periodic-ci-openshift-oadp-operator-oadp-1.4-4.18-e2e-test-aws-periodic
    
  2. Verify no nil pointer panics in BSLsAreUpdated.
  3. All 28 specs should pass (previously 26/28 passed, 2 panicked).

Backport targets: oadp-1.5 oadp-1.6 oadp-dev


AI-generated. Review for accuracy.

@kaovilai requested from Slack

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification

This PR uses the pipeline controller for second-stage tests. Selection and triggering follow the repository configuration.

Use /test ? to list jobs and /pipeline help for commands.

@coderabbitai

coderabbitai Bot commented Oct 20, 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: c6702348-19b3-4ac3-aceb-0d2536e8bde6

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

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

@redhat-chai-bot

Copy link
Copy Markdown
Contributor Author

/cherry-pick oadp-1.5 oadp-1.6 oadp-dev

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@redhat-chai-bot: once the present PR merges, I will cherry-pick it on top of oadp-1.5 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick oadp-1.5 oadp-1.6 oadp-dev

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.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.03%. Comparing base (75dc5ec) to head (655883d).

⚠️ Current head 655883d differs from pull request most recent head e0f1824

Please upload reports for the commit e0f1824 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff            @@
##           oadp-1.4    #2500   +/-   ##
=========================================
  Coverage     40.03%   40.03%           
=========================================
  Files            30       30           
  Lines          5378     5378           
=========================================
  Hits           2153     2153           
  Misses         3014     3014           
  Partials        211      211           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kaovilai kaovilai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm
/approve

@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 Oct 20, 2026

@shubham-pampattiwar shubham-pampattiwar left a comment

Copy link
Copy Markdown
Member

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 commented Oct 20, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kaovilai, redhat-chai-bot, shubham-pampattiwar

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-ci

openshift-ci Bot commented Oct 20, 2026

Copy link
Copy Markdown

@redhat-chai-bot: 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 52c395d into openshift:oadp-1.4 Oct 20, 2026
12 checks passed
@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@redhat-chai-bot: new pull request created: #2502

Details

In response to this:

/cherry-pick oadp-1.5 oadp-1.6 oadp-dev

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.

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