Claims tell the runner the run's state, bookmark and number 9a065bc0ce33
So a job's FLOW_STATE, FLOW_BOOKMARK and FLOW_RUN are set (oxygenflow#7). Pinned to the oxygenflow that reads them.
- Author
- Andy McCall @andymccall <[email protected]>
- When
- · 2026-09-28 23:47 UTC
- Signature
- ✔ signed by Andy McCall
- Hash
9a065bc0ce33ba0736a61e81ebd1cdfbb0153bf6364dfbffac4160594842aeec- Depends on
- 380996db84e5 42fa95540468 e271a37b629a fd3db644df22
- Depended on by
- 2a83f5303458 ea839b44cfb6
- In bookmarks
- api-unknown-fields cancel-landed-runs clear-waiting close-proposal-140 diffusion-pin-bookmark draft-ready image-check job-waits main oh-comment-body-file proposal-list-fast run-one-job wiki-says-so
- In tags
- v0.1.0 v0.2.0 v0.3.0 v0.3.1 v0.4.0 v0.4.1 v0.4.2 v0.5.0 v0.5.1 v0.5.2 v0.6.0 v0.6.1 v0.7.0 v0.8.0 v0.9.0 v0.9.1 v0.9.11 v0.9.15 v0.9.16 v0.9.19 v0.9.2 v0.9.20 v0.9.21 v0.9.22 v0.9.23 v0.9.24 v0.9.3 v0.9.4 v0.9.5 v0.9.6 v0.9.7 v0.9.8 v0.9.9
- Edits
- 3 atoms, 0 tree operations, 3 files
Browse the tree at this change
modified crates/hub/src/flow.rs +3 −0
| … | 159 unchanged lines |
||
| 160 | 160 | sandbox: serde_json::from_str(&job.sandbox).map_err(bad)?, |
|
| 161 | 161 | timeout_s: app.config.flow.job_timeout_minutes.max(1) * 60, |
|
| 162 | 162 | subrepos: vec![], |
|
| 163 | + | state: run.state.clone(), |
|
| 164 | + | bookmark: run.bookmark.clone(), |
|
| 165 | + | run_number: run.number, |
|
| 163 | 166 | }; |
|
| 164 | 167 | let mut claim = claim; |
|
| 165 | 168 | let (inputs, ids) = subrepo_inputs(&app, &row, &run).await; |
|
| … | 187 unchanged lines |
modified crates/hub/tests/flow.rs +5 −0
| … | 175 unchanged lines |
||
| 176 | 176 | assert_eq!(a["sandbox"]["rootfs"], ROOTFS); |
|
| 177 | 177 | assert_eq!(a["job"]["exec"], serde_json::json!(["make"])); |
|
| 178 | 178 | assert_eq!(a["timeout_s"], 3600); |
|
| 179 | + | // The job is told what it builds (FLOW_STATE, FLOW_BOOKMARK, FLOW_RUN). |
|
| 180 | + | assert_eq!( |
|
| 181 | + | (a["state"].as_str(), a["bookmark"].as_str(), a["run_number"].as_i64()), |
|
| 182 | + | (Some(run.state.as_str()), Some("main"), Some(run.number)) |
|
| 183 | + | ); |
|
| 179 | 184 | let heads: Vec<String> = a["heads"].as_array().unwrap().iter().map(|v| v.as_str().unwrap().to_string()).collect(); |
|
| 180 | 185 | assert_eq!(heads.join("+"), run.heads); |
|
| 181 | 186 | let checks = db::hooks::checks_for_state(&h.app.db, run.repo_id, &run.state).await.unwrap(); |
|
| … | 286 unchanged lines |
replaced deps/oxygenflow +0 −0
No line changes.