test(k8s): seed apply_operations in the stored-apply fixture#433
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the K8s E2E “stored apply” fixture to more closely match the production apply-create write pattern by inserting an apply_operations row alongside the parent applies row and its initial tasks, so operator drivers that claim at the operation level have something to claim.
Changes:
- Extend
createStoredK8sApplyWithTaskto create a singlestorage.ApplyOperationfor the apply. - Switch the fixture write path from
CreateWithTaskstoCreateWithTasksAndOperationsso tasks are linked to the inserted operation viaapply_operation_id.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The remote-failure E2E fixture created an apply with tasks but no apply_operations row, so the operation-claim operator could not claim it once operation-level claiming becomes the default. Dual-write one operation per apply, mirroring the production apply-create path.
Operation-level claiming reclaims a running apply via FindNextApplyOperation's stale-heartbeat clause, which keys off apply_operations.updated_at. The helper only aged applies.updated_at, so the operator had nothing claimable for ~1m and the stale-recovery E2E polls could stall.
e8c283d to
715a179
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
aparajon
approved these changes
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Update the K8s stored-apply fixture (
createStoredK8sApplyWithTask) todual-write a single
apply_operationsrow alongside the parent apply andtask, via
CreateWithTasksAndOperations.Why
When operation-level claiming is the default, the operator claims work through
FindNextApplyOperation(theapply_operationsrow), not the bare apply. Thefixture previously seeded an apply + task but no operation row, so the
operator had nothing to claim, the control-plane apply was never driven, and
the remote failure was never propagated — the remote-failure E2E stalled.
Mirroring the production apply-create dual-write keeps the fixture
representative.
Before
After
This is a test-only enablement slice for the parked draft #431.
Testing / validation
gofmt -w e2e/k8s/k8s_test.gogo vet -tags e2e ./e2e/k8s/go build ./...Full K8s E2E not run locally (no minikube); validated by compile/vet plus the
#431 CI failure signature.
References
Enablement slice for #431.