Skip to content

WIP merge wait methods in#5391

Draft
denik wants to merge 2 commits into
mainfrom
denik/wait-method-removal
Draft

WIP merge wait methods in#5391
denik wants to merge 2 commits into
mainfrom
denik/wait-method-removal

Conversation

@denik
Copy link
Copy Markdown
Contributor

@denik denik commented Jun 1, 2026

Changes

Why

Tests

denik added 2 commits May 28, 2026 20:59
…for intermediate state saves

Resources with multi-step deployments (apps, clusters, model serving endpoints, etc.)
previously split their logic between DoCreate/DoUpdate and WaitAfterCreate/WaitAfterUpdate
at an arbitrary point, making it hard to persist state incrementally.

Replace the WaitAfterXxx methods with an *Engine parameter on DoCreate and DoUpdate.
Engine.SetID + Engine.SaveState can be called immediately after the initial API call
succeeds, before any long-running wait, so the resource is tracked in state even if
deployment is interrupted mid-wait (preventing orphaned resources).

Simple resources pass _ *Engine and are unaffected. Complex resources (apps, clusters,
database instances, model serving endpoints, vector search endpoints and indexes) now
inline their wait logic and call engine.SetID/SaveState at the appropriate point.

Co-authored-by: Denis Bilenko
Make testserver app DELETE asynchronous (sets DELETING state) to match
real API behaviour. AppsGet auto-removes the app after returning it in
DELETING state, so the next request sees it as gone.

app_test.go: use real SDK calls (Create + DeleteByName) to put the app
in DELETING state before testing DoCreate retry logic, instead of
injecting state directly. RetriesWhenGetReturnsNotFound uses a one-shot
POST override so GET returns 404 naturally without a custom GET handler.

all_test.go: retry DoRead once after DoDelete to let async deletions
(DELETING → gone) clear before asserting the resource is absent.

Add Server.GetWorkspace to testserver for pre-seeding state in tests.

Co-authored-by: Denis Bilenko
@denik denik temporarily deployed to test-trigger-is June 1, 2026 08:13 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 1, 2026 08:13 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot
Copy link
Copy Markdown
Collaborator

Commit: b00a6f3

Run: 26743193021

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.

2 participants