Commit Graph

6397 Commits

Author SHA1 Message Date
Xun Jiang d82c552aaa Add BackupType in backup.spec.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-07-15 08:35:06 +00:00
Daniel Jiang 30d05a3e40 Add maintainers as code owners (#9998)
Run the E2E test on kind / get-go-version (push) Failing after 1m0s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Successful in 13s
Main CI / Build (push) Failing after 23s
Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
2026-07-15 07:56:26 +08:00
Shubham Pampattiwar 0033d5c0dd Merge pull request #10001 from shubham-pampattiwar/fix/skip-workflows-on-forks
Skip upstream-only workflows on forks
2026-07-14 14:00:40 -07:00
Shubham Pampattiwar 2edf8f8260 Remove guards from e2e-test-kind, pr-linter-check, nightly-trivy-scan
Per review feedback, these workflows are useful on forks:
- e2e-test-kind: tests pass on downstream forks
- pr-linter-check: keeps lint up to date for upstream-bound features
- nightly-trivy-scan: wanted in downstream forks

Also remove changelog file per reviewer request.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-07-14 12:36:01 -07:00
Shubham Pampattiwar 97858c3273 Add changelog for PR #10001
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-07-14 11:08:04 -07:00
Shubham Pampattiwar 6104324436 Skip upstream-only workflows on forks
Add repository guard (github.repository == 'velero-io/velero') to
workflows that should only run on the upstream repo. This prevents
unnecessary CI runs on forks like openshift/velero where these
workflows either fail due to missing secrets/config or duplicate
fork-specific CI.

Guarded workflows: auto_assign_prs, auto_label_prs,
auto_request_review, e2e-test-kind, nightly-trivy-scan,
pr-changelog-check, pr-codespell, pr-filepath-check,
pr-linter-check, prow-action, rebase, stale-issues.

Intentionally left unguarded: pr-ci-check (useful for contributors
on forks), get-go-version (reusable workflow_call only).

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-07-14 11:06:16 -07:00
Shubham Pampattiwar e593ba73f9 Fix PodVolumeBackup metadata loss on fs-backup timeout (#9995)
Run the E2E test on kind / get-go-version (push) Failing after 1m6s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Successful in 15s
Main CI / Build (push) Failing after 24s
* Fix PodVolumeBackup metadata loss on fs-backup timeout

When a backup hits the fs-backup timeout, WaitAllPodVolumesProcessed
returned nil because PVBs were only collected from the indexer in the
done branch of the select. This discarded all PVB metadata including
already-completed PVBs, making their data unrestorable.

Move the PVB collection loop to run after the select so tracked PVBs
are always persisted regardless of timeout.

Fixes #9986

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Add changelog for PR #9995

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Filter non-completed PVBs in hasPodVolumeBackup

After preserving tracked PVBs on timeout, non-completed PVBs (in-progress
or with no snapshot ID) would cause hasPodVolumeBackup to return true,
leading the restore to skip the original PV and dynamically re-provision
it without any data to restore from.

Only match PVBs that are Completed with a valid SnapshotID.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Add unit tests for hasPodVolumeBackup phase filtering

Verify that hasPodVolumeBackup only matches PVBs that are Completed
with a valid SnapshotID, and rejects in-progress, failed, or
empty-snapshot PVBs.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

---------

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-07-14 12:22:52 -04:00
Chlins Zhang c825e3c136 fix(delete): surface DeleteItemAction plugin errors from InvokeDeleteActions (#9993)
Run the E2E test on kind / get-go-version (push) Failing after 56s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Successful in 11s
Main CI / Build (push) Failing after 21s
Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-07-13 14:51:54 -07:00
dependabot[bot] fa2b37c36b Merge pull request #9992 from velero-io/dependabot/github_actions/docker/setup-qemu-action-4
Run the E2E test on kind / get-go-version (push) Failing after 1m4s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Successful in 14s
Main CI / Build (push) Failing after 41s
Bump docker/setup-qemu-action from 3 to 4
2026-07-13 15:58:03 +08:00
Daniel Jiang 5a98c71fa6 Merge pull request #9984 from Jamstah/file-system-restore-happens-in-parallel
File system restore happens in parallel
2026-07-13 15:21:33 +08:00
Xun Jiang/Bruce Jiang a8ed6d27b4 Merge pull request #9990 from adam-jian-zhang/fix-flanky-e2e
Run the E2E test on kind / get-go-version (push) Failing after 53s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Successful in 12s
Main CI / Build (push) Failing after 32s
fix rate limit issue for e2e-test-kind job
2026-07-13 10:58:58 +08:00
Xun Jiang/Bruce Jiang 5d770d6777 Merge pull request #9989 from adam-jian-zhang/fix-globalExcludes-lookup
fix globalExcludes lookup
2026-07-13 10:57:09 +08:00
Adam Zhang cc41347ddf fix rate limit issue for e2e-test-kind job
curl api.github.com is subject to rate limit(60 requests per hour),
provide GitHub token increase the rate limits.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-11 10:31:38 +08:00
Adam Zhang 8c79adde74 fix globalExcludes lookup
The kind is normalized to lower case, so should the lookup.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-11 10:09:39 +08:00
Adam Zhang 9a690cc815 Merge pull request #9946 from adam-jian-zhang/restore_filters_via_resource_policy
Run the E2E test on kind / get-go-version (push) Failing after 1m0s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Successful in 12s
Main CI / Build (push) Failing after 25s
restore filters via resource policy
2026-07-11 09:03:43 +08:00
Shubham Pampattiwar ae06d40c69 Validate user-provided labels and annotations in maintenance job (#9982)
Run the E2E test on kind / get-go-version (push) Failing after 58s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Successful in 13s
Main CI / Build (push) Failing after 26s
* Validate user-provided labels and annotations in maintenance job

User-provided labels and annotations from maintenance JobConfigs
are now validated before being applied to the maintenance Job pod
template. Invalid label keys, label values, and annotation keys
are skipped with a warning log. This prevents the Kubernetes API
from rejecting the entire Job when a user provides labels or
annotations that violate naming rules.

Additionally, user-provided labels can no longer overwrite the
internal RepositoryNameLabel used for job tracking.

Fixes velero-io/velero#9981

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Add tests for label and annotation validation in maintenance job

Add test cases to TestBuildJob covering:
- Invalid label key is skipped
- Invalid label value is skipped
- Label value exceeding 63 characters is skipped
- User-provided label cannot overwrite RepositoryNameLabel
- Invalid annotation key is skipped

Also fix a latent test issue where param.BackupRepo was not reset
between test cases, and add the missing assertion for
expectedPodAnnotation which was defined but never checked.

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Fix gofmt formatting in maintenance test file

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

* Add changelog for PR #9982

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>

---------

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-07-10 13:00:43 -04:00
James Hewitt 0f50e9eeac File system restore happens in parallel
Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
2026-07-10 10:29:30 +01:00
Xun Jiang/Bruce Jiang 05aba1e870 Merge pull request #9944 from lubronzhan/fix/flaky-wait-exec-hook-handler-test
Run the E2E test on kind / get-go-version (push) Failing after 1m13s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Successful in 12s
Main CI / Build (push) Failing after 40s
fix: make TestWaitExecHandleHooks deterministic for 2-container hook ordering
2026-07-10 16:34:57 +08:00
lyndon-li 528e9fa970 Merge pull request #9979 from Lyndon-Li/block-uploader-backup-implementation
Block uploader backup implementation
2026-07-10 13:11:13 +08:00
Adam Zhang c1cd00ff07 add cli for create/view restore resource policies (#9966)
Added CLI for creating restore resource policies, and view
the resource policies associated with resource if present.
Only list the name of the configmap for now.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-09 22:56:56 -04:00
Wenkai Yin(尹文开) d2342532f4 Use forward slash as the path separator to make sure it works on both Linux and Windows nodes (#9968)
Run the E2E test on kind / get-go-version (push) Failing after 1m9s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Successful in 14s
Main CI / Build (push) Failing after 25s
Use forward slash as the path separator to make sure it works on both Linux and Windows nodes

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2026-07-09 17:41:55 +08:00
Lyndon-Li 84bee82575 block uploader backup implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-07-09 13:15:59 +08:00
Shubham Pampattiwar 4605c8b3aa Merge pull request #9978 from shubham-pampattiwar/fix/image-volume-type-policy
Run the E2E test on kind / get-go-version (push) Failing after 1m6s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Successful in 10s
Main CI / Build (push) Failing after 40s
Add image volume type support to volume policies
2026-07-08 21:31:50 -07:00
Adam Zhang f3beea83da address review comments
- normalized the input to lower case for consistency
- added validations for kind collision
- add flag for unresolved kinds, and defer skip decision base on that
- move peek-and-map test cases to restore_policies_test.go

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-09 11:50:20 +08:00
Lyndon-Li ce1c1803b2 Merge branch 'main' into block-uploader-backup-implementation 2026-07-09 11:39:30 +08:00
Chlins Zhang 4934a92ee2 Merge pull request #9971 from velero-io/dependabot/github_actions/actions/upload-artifact-7
Bump actions/upload-artifact from 5 to 7
2026-07-09 11:06:56 +08:00
Shubham Pampattiwar e3a3c8902c Add changelog for PR #9978
Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-07-08 11:39:06 -07:00
Shubham Pampattiwar 56b6ba6b10 Add image volume type support to volume policies
The Kubernetes image volume type (GA in k8s 1.31) was not recognized by
Velero's volume type detection logic, causing volume policies with
volumeTypes condition set to "image" to be silently ignored. This led
to failed fs-backups when defaultVolumesToFsBackup was enabled, since
image volumes have no host path for the node agent to back up.

Add the "image" SupportedVolume constant and detection in
getVolumeTypeFromVolume() so that volume policies can properly match
and skip image volumes.

Fixes velero-io/velero#9977

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-07-08 11:36:17 -07:00
Adam Zhang 02b6e16088 add notes about potential data race
Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-08 11:48:30 +08:00
Adam Zhang 0d6b5a4f9b add fallback for unresolved kinds via peek-and-map
When a user specifies a Custom Resource Kind in a restore filter
policy (e.g., kinds: [MyCustomKind]), the discovery helper fails
to resolve it if the CRD hasn't been restored yet.

This adds a peek-and-map fallback: if a resource type in the
backup tarball doesn't match the resolved filters, Velero peeks
at the actual Kind of the first item in the tarball and matches
it against the user's original policy strings.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-07-08 11:18:10 +08:00
dependabot[bot] 4cf1dd9df6 Bump actions/upload-artifact from 5 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-08 03:12:11 +00:00
Xun Jiang/Bruce Jiang b047914fd2 Merge pull request #9960 from velero-io/copilot/ensure-dependabot-prs-label
Run the E2E test on kind / get-go-version (push) Failing after 1m14s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 2s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Successful in 11s
Main CI / Build (push) Failing after 27s
Ensure Dependabot PRs get changelog-not-required label
2026-07-08 11:11:05 +08:00
Xun Jiang/Bruce Jiang b9a96eec7d Merge pull request #9958 from velero-io/dependabot/go_modules/pkg/apis/golang.org/x/net-0.55.0
Run the E2E test on kind / get-go-version (push) Failing after 1m9s
Run the E2E test on kind / build (push) Has been skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 2s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / get-go-version (push) Successful in 10s
Main CI / Build (push) Failing after 2m5s
Bump golang.org/x/net from 0.49.0 to 0.55.0 in /pkg/apis
2026-07-06 11:54:48 +08:00
lyndon-li cfbd1b6ae4 Merge pull request #9955 from sseago/vss-main
Early frequent polling for CSI snapshots to handle Windows VSS timeout
2026-07-06 11:11:52 +08:00
copilot-swe-agent[bot] 24550ddadd Ensure Dependabot PRs get changelog-not-required label 2026-07-03 19:56:16 +00:00
copilot-swe-agent[bot] fbafece999 Initial plan 2026-07-03 19:55:15 +00:00
dependabot[bot] daef5f5cf7 Bump golang.org/x/net from 0.49.0 to 0.55.0 in /pkg/apis
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.49.0 to 0.55.0.
- [Commits](https://github.com/golang/net/compare/v0.49.0...v0.55.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.55.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-03 17:50:39 +00:00
Xun Jiang/Bruce Jiang 96ae6586d0 Merge pull request #9863 from blackpiglet/jxun/change-id
Support change-id and volume-id in backup workflow.
2026-07-02 11:32:15 +08:00
Scott Seago c60a5bcc7c feat: Implement early frequent polling for CSI snapshots
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
Signed-off-by: Scott Seago <sseago@redhat.com>
2026-07-01 11:56:48 -04:00
Scott Seago fa20e46016 refactor: Optimize VSC handle readiness polling for VSS backups
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
Signed-off-by: Scott Seago <sseago@redhat.com>
2026-07-01 11:00:18 -04:00
Xun Jiang 0bc06323bf Support change-id and volume-id in backup workflow.
* Add change-id and volume-id retrieve logic for both vks and vanilla k8s environment.
* Add change-id and volume-id support code in exposer.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
2026-07-01 15:19:52 +08:00
Lyndon-Li 8d23c7e813 block uploader backup implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-30 17:03:39 +08:00
Lyndon-Li 502ec5f086 remove leading and trailing separator
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-30 16:22:55 +08:00
Lyndon-Li 39c745ef61 set totalSize from uploader
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-30 16:22:21 +08:00
Lyndon-Li df21463629 block uploader backup implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-30 16:21:59 +08:00
lyndon-li 08385354db Merge pull request #9945 from Lyndon-Li/block-uploader-snapshot-operations
Block uploader snapshot operations
2026-06-30 15:46:31 +08:00
Lyndon-Li 8df8709a8a block uploader snapshot implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-30 14:14:23 +08:00
lyndon-li 7fc75b910c Merge branch 'main' into block-uploader-snapshot-operations 2026-06-30 14:12:31 +08:00
lyndon-li b09a42147f Merge pull request #9943 from lubronzhan/topic/lubronzhan/make_api_own_module
Make pkg/apis its own Go module
2026-06-30 13:28:39 +08:00
Lyndon-Li 82dbef2cd9 block uploader snapshot implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-30 11:18:44 +08:00