Skip to content

fix: e2e test case for multiple fs-backup ns mapping#9660

Open
priyansh17 wants to merge 1 commit intovelero-io:release-1.16from
priyansh17:release-1.16
Open

fix: e2e test case for multiple fs-backup ns mapping#9660
priyansh17 wants to merge 1 commit intovelero-io:release-1.16from
priyansh17:release-1.16

Conversation

@priyansh17
Copy link
Copy Markdown
Collaborator

@priyansh17 priyansh17 commented Mar 30, 2026

In Init(), on kind, kibishiiData is intentionally zeroed out (Levels: 0, DirsPerLevel: 0, ...) because kind doesn't support volume snapshots or fs-backup ; volumes aren't backed up (--snapshot-volumes=false without --default-volumes-to-fs-backup). However, CreateResources() and Verify() unconditionally override kibishiiData.Levels to len(*n.NSIncluded) + index, which for the Multiple test sets Levels to 2 and 3. This causes generate.sh to write data into PVCs that never gets backed up, and then verify.sh fails post-restore because the data isn't there.

Fix: Guard the Levels override so it's only applied on non-kind environments where volume data is actually backed up and restored.

Failure logs: https://github.com/vmware-tanzu/velero/actions/runs/23600057117/job/68728032211#logs

Fixes #(issue)
none, e2e test case.

Please indicate you've done the following:

Signed-off-by: Priyansh Choudhary <im1706@gmail.com>
@priyansh17 priyansh17 added the kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes label Mar 30, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.83%. Comparing base (d8ab30c) to head (bc2e6df).

Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.16    #9660      +/-   ##
================================================
- Coverage         59.84%   59.83%   -0.02%     
================================================
  Files               370      370              
  Lines             32034    32034              
================================================
- Hits              19172    19166       -6     
- Misses            11362    11367       +5     
- Partials           1500     1501       +1     

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@priyansh17 priyansh17 requested a review from kaovilai April 1, 2026 07:15
@kaovilai
Copy link
Copy Markdown
Collaborator

kaovilai commented Apr 2, 2026

what about other branches?

@blackpiglet
Copy link
Copy Markdown
Contributor

There was no difference for this case between the release-1.16 and the main branch.
I didn't understand why this case could pass on the main branch.

I suggest to skip this case in release-1.16 instead of modifying the case logic.

kaovilai

This comment was marked as low quality.

@kaovilai
Copy link
Copy Markdown
Collaborator

kaovilai commented Apr 3, 2026

whoops

@blackpiglet blackpiglet changed the title fix: e2e test case for multiple restic ns mapping fix: e2e test case for multiple fs-backup ns mapping Apr 10, 2026
@blackpiglet
Copy link
Copy Markdown
Contributor

@priyansh17
Another thing worth noticing is that don't use Restic in the code change anymore.
Although there are still some codes that use Restic, that's the legacy code without refactoring.
We are officially deprecated Restic from Velero in release-1.19.
As a result, it's better to use fs-backup to replace Restic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has-e2e-2tests kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants