Pin oxygenflow with the escape hint and oxygen's state index a4f01d51c2a7
A private subrepo on the same hub as the parent's remote is now added with that remote's token; the Flow test says so. closes #63
- Author
- Andy McCall @andymccall <[email protected]>
- When
- · 2026-09-30 14:14 UTC
- Signature
- ✔ signed by Andy McCall
- Hash
a4f01d51c2a72a83a98cb1ebefe3fa062f3203aba3fb25b71358bd9c0c230a83- Depends on
- 370035a46397 380996db84e5 42fa95540468 7c36794d3630 d23464c0ac60 fd3db644df22
- Depended on by
- 2bbe88a85860 046bd71a180f
- 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
- 6 atoms, 0 tree operations, 3 files
Browse the tree at this change
modified Cargo.lock +1 −0
| … | 459 unchanged lines |
||
| 460 | 460 | "cfg-if", |
|
| 461 | 461 | "constant_time_eq", |
|
| 462 | 462 | "cpufeatures 0.3.1", |
|
| 463 | + | "rayon-core", |
|
| 463 | 464 | ] |
|
| 464 | 465 | ||
| 465 | 466 | [[package]] |
|
| … | 4166 unchanged lines |
modified crates/hub/tests/flow.rs +10 −4
| … | 446 unchanged lines |
||
| 447 | 447 | let work = tempfile::tempdir().unwrap(); |
|
| 448 | 448 | let app = client(&format!("{}/andy/app", h.base), work.path()); |
|
| 449 | 449 | app.submodule_add(&format!("{}/andy/lib", h.base), "deps/lib", Some("main")).unwrap(); |
|
| 450 | - | // Vault is private: adding it takes the environment's token, as a clone does. |
|
| 450 | + | // Vault is private: a checkout with no token for this hub cannot add |
|
| 451 | + | // it, but the app's remote on the same hub lends its token (oxygen#32), |
|
| 452 | + | // which the subrepo then records for its own fetches. |
|
| 451 | 453 | sqlx::query("UPDATE repositories SET visibility = 'private' WHERE name = 'vault'").execute(&h.app.db).await.unwrap(); |
|
| 452 | - | assert!(app.submodule_add(&format!("{}/andy/vault", h.base), "deps/vault2", Some("main")).is_err(), "not without a token"); |
|
| 453 | - | std::env::set_var("OXY_TOKEN", "site"); |
|
| 454 | + | let bare_work = tempfile::tempdir().unwrap(); |
|
| 455 | + | let mut bare = Repo::init(bare_work.path()).unwrap(); |
|
| 456 | + | bare.config.set("remote.origin.url", &format!("{}/andy/bare", h.base)).unwrap(); |
|
| 457 | + | bare.save_config().unwrap(); |
|
| 458 | + | assert!(bare.submodule_add(&format!("{}/andy/vault", h.base), "deps/vault", Some("main")).is_err(), "not without a token"); |
|
| 454 | 459 | app.submodule_add(&format!("{}/andy/vault", h.base), "deps/vault", Some("main")).unwrap(); |
|
| 455 | - | std::env::remove_var("OXY_TOKEN"); |
|
| 460 | + | let nested = Repo::open(&work.path().join("deps/vault")).unwrap(); |
|
| 461 | + | assert_eq!(nested.config.remote_tokens.get("origin").map(String::as_str), Some("site")); |
|
| 456 | 462 | // The pusher below is the site token, which has no account: it cannot read vault. |
|
| 457 | 463 | write(work.path(), ".flow/pipeline.kdl", &pipeline("")); |
|
| 458 | 464 | write(work.path(), "Makefile", "all:\n"); |
|
| … | 679 unchanged lines |
replaced deps/oxygenflow +0 −0
No line changes.