Commit Graph
6823 Commits
Author SHA1 Message Date
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]andGitHub 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 JiangandGitHub 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 JiangandGitHub 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-liandGitHub 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]andGitHub 24550ddadd Ensure Dependabot PRs get changelog-not-required label 2026-07-03 19:56:16 +00:00
copilot-swe-agent[bot]andGitHub fbafece999 Initial plan 2026-07-03 19:55:15 +00:00
dependabot[bot]andGitHub 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 JiangandGitHub 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 Seagoandaider 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 Seagoandaider 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-liandGitHub 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-liandGitHub 7fc75b910c Merge branch 'main' into block-uploader-snapshot-operations 2026-06-30 14:12:31 +08:00
lyndon-liandGitHub 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 d5089e621f fix contest of nodeAgentCheck when restorer is called concurrently
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-30 11:47:01 +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
lyndon-liandGitHub d284eeb6bb Merge branch 'main' into block-uploader-snapshot-operations 2026-06-29 15:39:45 +08:00
Lyndon-Li f38bc20a0a block uploader snapshot implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-29 15:02:10 +08:00
Shubham Pampattiwar 3deb7d1404 Address review comments on design doc
- Use *bool for SkipDefaultResourceModifier to match RestoreSpec conventions
- Use boolptr.IsSetToTrue for nil-safe bool check in controller logic
- Fix warning message to say "failed to retrieve" instead of "not found"
- Add Restore Describe Output subsection covering all resolved states
- Only set SkipDefaultResourceModifier from CLI when flag is true

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2026-06-25 15:24:44 -07:00
Adam Zhang b41e5df294 restore filters via resource policy
restore filters via resource policy, support ClusterScopedFilterPolicy
and NamespaceFilterPolicies.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-06-25 17:09:57 +08:00
Lyndon-Li 5bef38dc95 block uploader snapshot implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-25 08:31:32 +00:00
Adam ZhangandGitHub 148f3273f2 Merge pull request #9939 from adam-jian-zhang/resource_policy_for_restore
add resourcePolicy on restore CRD
2026-06-25 16:14:51 +08:00
Lyndon-Li f4f897f669 load object from snapshot
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-25 15:36:33 +08:00
Adam Zhang 7529b3df6d enhance validation for restore resource policy
For resource policy in restore, it will reject invalid sections
such as volumePolicies or includeExcludePolicy, to prevent user
from misuse backup side resource policy configmap.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-06-25 15:29:18 +08:00
Adam Zhang f8ebd8fa4b add more test cases
Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-06-25 15:29:18 +08:00
Adam Zhang ffbaceeb6d add resourcePolicy on restore CRD
Add resourcePolicy field for restore CRD which is backed by
a configmap that holds ClusterScopedFilterPolicy and
NamespacedFilterPolicies for restore side filtering.

Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
2026-06-25 15:29:18 +08:00
Lyndon-Li 845bd2dc4f block uploader snapshot implementation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-25 15:27:18 +08:00
Chlins ZhangandGitHub f0ef255c25 Merge pull request #9928 from chlins/feat/global-policy
feat(backup): add global backup volume policies
2026-06-25 15:14:34 +08:00
lyndon-liandGitHub 518b55da25 Merge pull request #9942 from Lyndon-Li/clone-pv-after-deletion
Clone PV after deleting retained PV
2026-06-25 15:10:49 +08:00
Chlins ZhangandGitHub bf08827426 Merge branch 'main' into feat/global-policy 2026-06-25 15:04:28 +08:00
chlins 21d67a8622 feat(backup): add global backup volume policies
Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-06-25 11:31:08 +08:00
lyndon-liandGitHub cfd4914123 decide restorePVC volumeMode by data mover type (#9941)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-25 11:06:53 +08:00
Lubron ZhanandClaude Sonnet 4.6 f6243627fc fix: make TestWaitExecHandleHooks deterministic for 2-container hook ordering
Fixes a flaky test in TestWaitExecHandleHooks:
  "should return no error with 2 spec hooks in 2 different containers,
   1st container starts running after 10ms, 2nd container after 20ms,
   both succeed"

Observed failure (CI run https://github.com/velero-io/velero/actions/runs/28119573625/job/83267758421):

  mock: Unexpected Method Call
  ExecutePodCommand called with resourceVersion:"3" (both containers running),
  but mock was registered expecting resourceVersion:"2" (container1 running,
  container2 still waiting).

Root cause: the two source.Modify calls were 10ms apart. The informer's
DeltaFIFO queue can coalesce rapid updates, delivering only the latest pod
state (resourceVersion:3) to the handler before the hook for container1 fires.
The comment "each of these states will be seen by the UpdateFunc handler" was
incorrect — intermediate states can be silently skipped under load.

Fix: add waitForSignal chan struct{} to the change struct and onCalled func()
to the expectedExecution struct. The goroutine now blocks after sending the
first change until the mock signals that the hook has fired (via close), then
sends the second change. This guarantees the handler observes the intermediate
pod state (resourceVersion:2) when executing container1's hook.

Signed-off-by: Lubron Zhan <lubronzhan@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 17:37:36 -07:00
Lubron Zhan 2e5ef987d5 ci: retrigger CI for flaky test
Signed-off-by: Lubron Zhan <lubronzhan@gmail.com>
2026-06-24 11:29:36 -07:00
Lubron ZhanandClaude Sonnet 4.6 eda35227bb Make pkg/apis its own Go module
Extract pkg/apis into a standalone Go module with its own go.mod/go.sum,
and wire it back into the main module via a local replace directive.

Signed-off-by: Lubron Zhan <lubronzhan@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 11:09:23 -07:00
Lyndon-Li 2c5dcb8474 clone PV after deleting retained PV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-24 18:27:57 +08:00
lyndon-liandGitHub 5844ce873d Merge pull request #9933 from Lyndon-Li/recall-rebind-volume-with-restore-pv-2
Recall rebind volume with restore pv
2026-06-24 17:41:56 +08:00
Lyndon-Li 6d87680ea0 Merge branch 'main' into recall-rebind-volume-with-restore-pv-2 2026-06-24 11:48:09 +08:00
Lyndon-Li 6af6e4e85f recall the way to rebind volume with restorePV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-24 11:47:42 +08:00
Lyndon-Li 8c3a638d88 use restorePV to cover retained and non-retained case
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-24 11:47:42 +08:00
Lyndon-Li 0f9874bf06 add wait restorePV detach to same mode route
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-24 11:47:42 +08:00
Lyndon-Li 9a615430ed recall the way to rebind volume with restorePV
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
2026-06-24 11:47:42 +08:00
lyndon-liandGitHub 960a20f12c Merge pull request #9932 from Lyndon-Li/pv-rebind-test-2
Wait restorePV detached before binding the cloned PV
2026-06-24 11:42:52 +08:00