Skip to content

e2e: add asynchronous suspend upload and detach checks - #3264

Merged
Zoe Zhao (zoez7) merged 1 commit into
agent-substrate:mainfrom
msau42:async-suspend-e2e
Oct 29, 2026
Merged

Zoe Zhao (zoez7) merged 1 commit into
agent-substrate:mainfrom
msau42:async-suspend-e2e

Conversation

@msau42

Copy link
Copy Markdown
Collaborator

Expand the demo e2e suite to cover asynchronous suspend background upload, background detach, and CreateTag promotion.

Lower atelet's snapshot detach delay in kind so the suite can wait for background detach. Checks that wait for a background upload or detach skip on installs with longer delays, and fail in CI.

AI use: AI-assisted, I reviewed and tested it.

  • Tests pass
  • Docs updated

@bowei Bowei Du (bowei) added area/node area/storage area/tests Enhancing / fixing test coverage. kind/feature An enhancement / feature request or implementation labels Oct 27, 2026

// waitForSnapshotUploaded polls GetActor until wantUUID is reported as the
// actor's COMPLETED durable snapshot.
func waitForSnapshotUploaded(ctx context.Context, t *testing.T, clients *e2e.Clients, actorName, wantUUID string) *ateapi.Snapshot {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 nit 🟢 – This loop and waitForActorDetached drop GetActor errors. If every call fails, the timeout message shows last status: <nil> with no cause. Keep the last error and include it in the t.Fatalf.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Done. Both helpers now record the last GetActor error and include it in the timeout failure.

if diff := cmp.Diff(assignedRuntime, assignedRuntime2, protocmp.Transform()); diff != "" {
t.Errorf("resume-from-paused assignment stamp mismatch (-first +second):\n%s", diff)
}
t.Run("BackgroundUpload", func(t *testing.T) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 should-fix 🟡 – runActorLifecycleTestCase (lines 672 and 798) and revertActor (lines 1345 and 1467) still call DeleteActor without e2e.RetryAborted. If BackgroundUpload is skipped, an assertion fails early after the pause, or atelet's 30s background detach for syncLocal reports while DeleteActor runs, ApplyReportedSnapshotState holds the actor lease and DeleteActor fails with Aborted. Wrap those DeleteActor calls in e2e.RetryAborted like the ones in pauseActor and deletePausedActor.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Done. Wrapped the DeleteActor calls in runActorLifecycleTestCase and revertActor with e2e.RetryAborted.

Comment thread internal/e2e/suites/demo/demo_test.go Outdated
return snap
}
}
time.Sleep(500 * time.Millisecond)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 nit 🟢 – Select on ctx.Done() alongside time.After(500 * time.Millisecond) here and in waitForActorDetached (as ResumeActorAwaitCapacity and WaitForSubstrateTemplateReady do), so a canceled context returns immediately instead of spinning until the 2-minute wall-clock deadline.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Done. Both helpers now select on ctx.Done() alongside time.After(500 * time.Millisecond).

@zoez7
Zoe Zhao (zoez7) added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 29, 2026
Expand the demo e2e suite to cover asynchronous suspend background upload, background detach, and CreateTag promotion.

Lower atelet's snapshot detach delay under --e2e-tuning so the suite can wait for background detach. Checks that wait for a background upload or detach skip on installs with longer delays, and fail in CI.

Signed-off-by: msau42 <[email protected]>
@zoez7
Zoe Zhao (zoez7) added this pull request to the merge queue Oct 29, 2026
Merged via the queue into agent-substrate:main with commit 910671c Oct 29, 2026
5 checks passed
Dmitry Berkovich (dberkov) pushed a commit that referenced this pull request Nov 2, 2026
Expand the demo e2e suite to cover asynchronous suspend background
upload, background detach, and CreateTag promotion.

Lower atelet's snapshot detach delay in kind so the suite can wait for
background detach. Checks that wait for a background upload or detach
skip on installs with longer delays, and fail in CI.

AI use: AI-assisted, I reviewed and tested it.

- [ ] Tests pass
- [ ] Docs updated

Signed-off-by: msau42 <[email protected]>
(cherry picked from commit 910671c)
Signed-off-by: Eitan Yarmush <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/node area/storage area/tests Enhancing / fixing test coverage. kind/feature An enhancement / feature request or implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants