Skip to content

Add idempotency_token to job_runs resource#5882

Draft
radakam wants to merge 3 commits into
mainfrom
job-runs-idempotency-wait-for-completion
Draft

Add idempotency_token to job_runs resource#5882
radakam wants to merge 3 commits into
mainfrom
job-runs-idempotency-wait-for-completion

Conversation

@radakam

@radakam radakam commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@radakam radakam temporarily deployed to test-trigger-is July 9, 2026 14:20 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is July 9, 2026 14:20 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 3a5ea16

Run: 29238294227

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 230 1082 5:11
💚​ aws windows 4 4 232 1080 6:50
💚​ aws-ucws linux 4 4 316 999 6:38
💚​ aws-ucws windows 4 4 318 997 7:05
💚​ azure linux 4 4 230 1081 5:14
💚​ azure windows 4 4 232 1079 7:25
💚​ azure-ucws linux 4 4 318 996 7:24
🔄​ azure-ucws windows 2 2 4 320 994 9:34
🟨​ gcp linux 1 2 1 4 229 1083 8:18
🟨​ gcp windows 2 1 1 4 231 1081 10:47
8 interesting tests: 4 SKIP, 3 KNOWN, 1 RECOVERED
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 🔄​f 🟨​K
🟨​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 🔄​f 🔄​f 🟨​K
🟨​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 🔄​f 🟨​K 🔄​f
Top 10 slowest tests (at least 2 minutes):
duration env testname
6:31 gcp windows TestAccept
6:05 azure windows TestAccept
6:02 azure-ucws windows TestAccept
6:00 aws-ucws windows TestAccept
5:52 aws windows TestAccept
2:57 azure linux TestAccept
2:53 aws linux TestAccept
2:51 gcp linux TestAccept
2:51 azure-ucws linux TestAccept
2:50 aws-ucws linux TestAccept

@radakam radakam temporarily deployed to test-trigger-is July 10, 2026 09:31 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is July 10, 2026 09:31 — with GitHub Actions Inactive
radakam added 3 commits July 13, 2026 09:09
Job runs now send an automatic idempotency_token on run-now so a retried
deployment reuses the existing run instead of triggering a duplicate. The
token is the hex SHA-256 of the RunNow request (job_id cleared of the token
itself), computed in DoCreate on a copy so it is never persisted to state.

A user-set idempotency_token is rejected at validation time, and the local
testserver now deduplicates run-now by token so the behavior is covered by
tests.
Covers the idempotency token end-to-end: deploy triggers a run, the run is
dropped from local state (keeping the job so job_id and the derived token stay
stable), and a redeploy re-issues run-now. The backend dedupes on the token and
returns the existing run, so no duplicate is created.

Drop the DoCreate-level TestJobRunIdempotentCreate since the acceptance test now
covers that path end-to-end; the token helper's unit tests remain.
Pick up GOOSOnPR fields added by the acceptance harness on main (#5876,
#5879), which restrict OS-independent bundle tests to Linux on PRs.
@radakam radakam force-pushed the job-runs-idempotency-wait-for-completion branch from acf313b to 3a5ea16 Compare July 13, 2026 09:13
@radakam radakam temporarily deployed to test-trigger-is July 13, 2026 09:13 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is July 13, 2026 09:13 — with GitHub Actions Inactive
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