Skip to content

fix(syncer): retry status patches on latest object#2

Closed
weicao wants to merge 2 commits into
derek/mysql-backup-cr-syncer-pvc-bridgefrom
derek/es2835-status-conflict-retry
Closed

fix(syncer): retry status patches on latest object#2
weicao wants to merge 2 commits into
derek/mysql-backup-cr-syncer-pvc-bridgefrom
derek/es2835-status-conflict-retry

Conversation

@weicao

@weicao weicao commented Jul 2, 2026

Copy link
Copy Markdown

Problem

ES PR loft-sh#2835 restore-runtime hit repeated PVC syncer status update conflicts while restore PVCs had DataProtection Backup dataSourceRef and virtual PVC status stayed Pending even though the restore PV path had materialized.

Observed syncer error shape:

patch virtual object: update object status: Operation cannot be fulfilled ... object has been modified

Change

For status subresource updates, apply the calculated status patch to the latest live object and retry on Kubernetes conflicts.

Full-object updates keep the existing event-object semantics so syncers that intentionally overwrite fields do not become live-state merges.

Tests

  • go test ./pkg/patcher
  • go test ./pkg/controllers/resources/persistentvolumeclaims
  • go test ./pkg/controllers/resources/backups
  • go test ./pkg/controllers/resources/persistentvolumes
  • go test ./pkg/controllers/resources/...

Runtime Boundary

Local linux/amd64 sideload candidate built from commit c1202e4e2 as docker.io/local/vcluster-es2835-status-retry:c1202e4e2.

Image ID/digest:

sha256:b121439e353e1472fa1b72fb84c41ceb5d0daec6c9d493d6f96f2c2de56599d4

Tarball on Derek's machine:

/Users/apecloud/.slock/agents/f7ed29eb-62e8-4845-b381-7b6021a2fa08/artifacts/es2835-status-retry/vcluster-es2835-status-retry-c1202e4e2-linux-amd64.tar
sha256 1a6a963922f1c9a9af6a417bc0c7c5da80aee8956081453609a1e18ae217d0c6

Local image smoke passed:

docker run --platform linux/amd64 --rm --entrypoint /vcluster docker.io/local/vcluster-es2835-status-retry:c1202e4e2 --help

Not yet deployed to idc4 / es-idc4-vc: this machine has no idc4 or ES vcluster kubeconfig context. Runtime closure still requires sideload + live syncer imageID + same-pin restore-runtime readback.

@weicao

weicao commented Jul 9, 2026

Copy link
Copy Markdown
Author

Closed in favor of #4. The status patch retry is folded into the complete restore handoff PR where needed for the same state machine.

@weicao weicao closed this Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant