Skip to content

testserver: roll task outcomes up into the run state - #6082

Merged
radakam merged 2 commits into
job-runs-idempotency-wait-for-completionfrom
job-runs-testserver-run-state-rollup
Jul 28, 2026
Merged

testserver: roll task outcomes up into the run state#6082
radakam merged 2 commits into
job-runs-idempotency-wait-for-completionfrom
job-runs-testserver-run-state-rollup

Conversation

@radakam

@radakam radakam commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Changes

The fake workspace reported every run as TERMINATED SUCCESS, overwriting the FAILED state it had just recorded for a task it executed locally. A run now reports the terminal state its tasks add up to.

Tasks whose code the fake workspace does not have are left successful. An immutable deployment, for example, uploads the bundle as a snapshot zip that the fake workspace never unpacks, so there is nothing to execute; that gap is in the fake workspace, not in the job under test.

With that, job_runs/failed_run drops the runs/get and runs/get-output stubs from its test.toml and fails for real, on a task that exits non-zero.

Why

Follow-up to #5882, where a stub stood in for a failing run because the fake workspace could not produce one. Splitting it out keeps the behaviour change for existing tests out of that PR.

The stub could not know the test server's address, so it could not report a run page URL; the golden now covers the run URL and the progress lines too.

Tests

libs/testserver unit tests for the rollup, for completing the tasks that jobs/runs/submit leaves running, and for a task whose code is missing not failing its run. job_runs/failed_run covers the end-to-end path. The rest of the acceptance suite passes unchanged.

radakam added 2 commits July 28, 2026 08:09
The fake workspace reported every run as TERMINATED SUCCESS, overwriting
the FAILED state it had just recorded for a task it executed locally. Runs
now report the outcome their tasks add up to, so job_runs/failed_run can
exercise a real failing run instead of stubbing runs/get through test.toml.

Tasks whose code the fake workspace does not have (an immutable deployment
uploads a snapshot zip it never unpacks) are left successful: that gap is
in the fake workspace, not in the job under test.
@radakam
radakam marked this pull request as ready for review July 28, 2026 08:40
@radakam
radakam merged commit ef276f9 into job-runs-idempotency-wait-for-completion Jul 28, 2026
23 checks passed
@radakam
radakam deleted the job-runs-testserver-run-state-rollup branch July 28, 2026 08:40
@github-actions

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

4 files changed
Suggested: @denik
Also eligible: @pietern, @anton-107, @andrewnester, @janniklasrose, @lennartkats-db, @shreyas-goenka

General files (require maintainer)

Files: libs/testserver/jobs.go, libs/testserver/jobs_test.go
Based on git history:

  • @denik -- recent work in libs/testserver/

Any maintainer (@andrewnester, @anton-107, @denik, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db, @janniklasrose, @lennartkats-db) can approve all areas.
See OWNERS for ownership rules.

radakam added a commit that referenced this pull request Jul 28, 2026
The fake workspace reported every run as TERMINATED SUCCESS, overwriting the
FAILED state it had just recorded for a task it executed locally. A run now
reports the terminal state its tasks add up to, so a failing run can be
exercised end to end locally.

Tasks whose code the fake workspace does not have are left successful. An
immutable deployment, for example, uploads the bundle as a snapshot zip that the
fake workspace never unpacks, so there is nothing to execute; that gap is in the
fake workspace, not in the job under test.

Originally reviewed as #6082.
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