Skip to content

Conversation

@kaovilai
Copy link
Collaborator

Make ResticIdentifier optional for kopia repositories

Signed-off-by: Tiger Kaovilai [email protected]

Thank you for contributing to Velero!

Please add a summary of your change

The ResticIdentifier field in BackupRepository is only relevant for restic repositories. For kopia repositories, this field is unused and should be omitted.

This change:

  • Adds omitempty tag to ResticIdentifier field in BackupRepository CRD
  • Updates controller to only populate ResticIdentifier for restic repos
  • Adds tests to verify behavior for both restic and kopia repository types

This ensures backward compatibility while properly handling kopia repositories that don't require a restic-compatible identifier.

Does your change fix a particular issue?

Fixes #8830

Please indicate you've done the following:

@codecov
Copy link

codecov bot commented May 29, 2025

Codecov Report

Attention: Patch coverage is 53.33333% with 14 lines in your changes missing coverage. Please review.

Project coverage is 59.07%. Comparing base (ddb3e3d) to head (9f3e859).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/controller/backup_repository_controller.go 53.33% 11 Missing and 3 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8987   +/-   ##
=======================================
  Coverage   59.07%   59.07%           
=======================================
  Files         379      379           
  Lines       43511    43518    +7     
=======================================
+ Hits        25702    25709    +7     
  Misses      16281    16281           
  Partials     1528     1528           

☔ 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.

sseago
sseago previously approved these changes Jul 9, 2025
sseago
sseago previously approved these changes Jul 22, 2025
@kaovilai kaovilai force-pushed the velero-8830 branch 2 times, most recently from f456421 to c1211f1 Compare July 23, 2025 13:25
The ResticIdentifier field in BackupRepository is only relevant for restic
repositories. For kopia repositories, this field is unused and should be
omitted. This change:

- Adds omitempty tag to ResticIdentifier field in BackupRepository CRD
- Updates controller to only populate ResticIdentifier for restic repos
- Adds tests to verify behavior for both restic and kopia repository types

This ensures backward compatibility while properly handling kopia repositories
that don't require a restic-compatible identifier.

Signed-off-by: Tiger Kaovilai <[email protected]>
@kaovilai kaovilai merged commit 1daa685 into vmware-tanzu:main Jul 25, 2025
45 of 46 checks passed
@MaloLelandais MaloLelandais mentioned this pull request Jul 28, 2025
3 tasks
MaloLelandais pushed a commit to MaloLelandais/velero that referenced this pull request Jul 28, 2025
)

The ResticIdentifier field in BackupRepository is only relevant for restic
repositories. For kopia repositories, this field is unused and should be
omitted. This change:

- Adds omitempty tag to ResticIdentifier field in BackupRepository CRD
- Updates controller to only populate ResticIdentifier for restic repos
- Adds tests to verify behavior for both restic and kopia repository types

This ensures backward compatibility while properly handling kopia repositories
that don't require a restic-compatible identifier.

Signed-off-by: Tiger Kaovilai <[email protected]>
@weshayutin weshayutin added this to OADP Aug 25, 2025
@weshayutin weshayutin moved this to In Progress in OADP Aug 26, 2025
@weshayutin weshayutin moved this from In Progress to Merged / Ready for build in OADP Aug 26, 2025
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.

Invalid path in BackupRepository

4 participants