release: keep Cargo.lock in step with the pinned busbar ref, and never publish an assetless release - #4
Merged
Conversation
…r publish an assetless release The v1.0.4 release run failed on every target with: error: cannot update the lock file .../Cargo.lock because --locked was passed Cargo.toml's busbar-* dependencies are path deps into a sibling ../busbarAI checkout. release-on-upstream re-pins that checkout to a new commit in .busbar-ref but never regenerated Cargo.lock, so when busbar 1.5.3 pulled `valuable` in behind `tracing`, the committed lock described a graph that no longer resolved and release.yml's `--locked` build correctly refused to proceed. `--locked` is kept deliberately: it is what makes a release build exactly the graph that was resolved at pin time. Instead the lock is now refreshed in the same step that re-pins, against the exact commit being pinned, and committed alongside .busbar-ref so the two can never drift apart. Plain cargo (no --locked) is used for that refresh so the resolution is minimal, and the result is proven to satisfy --locked before anything is committed or tagged. Cargo.lock here is that refresh for the busbar 1.5.3 ref already recorded on main, which is otherwise unbuildable. Separately, create-release published the Release before the build matrix ran, so a total build failure left a tag whose releases/latest carried zero assets. verify-assets already detected that, but only after the empty release was public. The Release is now created as a draft, which releases/latest and releases/tags/<tag> do not resolve, and verify-assets promotes it to published only once assets are provably attached. A release is now either complete or absent. Also brings two test fixtures up to busbar 1.5.3: RoutingRequest/Candidate gained request_id and signals, and inline module entries under auth.admin_auth were retired in favour of a named identity-providers definition.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
v1.0.4release run failed on all five targets witherror: cannot update the lock file ... because --locked was passed, leaving a published Release with zero assets (since deleted by hand).Root cause: two independent bugs in one log
1. Stale
Cargo.lockvs--locked(the fatal one).Cargo.tomldepends on the busbar crates as path deps into a sibling../busbarAIcheckout.release-on-upstream.ymlre-pins that checkout by rewriting.busbar-ref, but never regeneratedCargo.lock. busbar 1.5.3 pulledvaluablein behindtracing, so the committed lock described a graph that no longer resolved, andrelease.ymls--lockedbuild refused to update it.Reproduced exactly, then fixed and re-verified:
--lockedis deliberately kept. It is what guarantees a release builds exactly the graph resolved at pin time; dropping it would trade this loud failure for silent drift. Instead the lock is refreshed in the same step that re-pins, against the exact commit being pinned, and committed alongside.busbar-ref. Plain cargo (no--locked) is used so the resolution is minimal: 22 lines, only thevaluable/tracinggraph change. The refreshed lock is then proven to satisfy--lockedbefore anything is committed or tagged, so a lock problem can no longer produce a tag at all.Cargo.lockin this PR is that refresh for the busbar 1.5.3 ref already onmain, which is otherwise unbuildable.2. The doubled path segment is not a bug.
webrequest-hook/webrequest-hookis just$GITHUB_WORKSPACEpluspath: webrequest-hook. The separatecould not find Cargo.toml in the parentline comes fromSwatinem/rust-cache, which runs at the workspace root with noworkspaces:input and so finds no manifest. It is non-fatal but means this repo has been getting no Rust caching at all. Left alone here to keep this PR to the release path; worth a follow-up (workspaces: webrequest-hook).Structural fix: a release is now either complete or absent
create-releasepublished the Release before the build matrix ran.verify-assetsalready detected the assetless result, but only after it was public, soreleases/latestpointed at nothing in the meantime.The Release is now created as a draft. Verified against a throwaway repo: a draft is invisible to
releases/latestandreleases/tags/<tag>(404), yetgh release uploadandgh release viewstill resolve it by tag, andgh release edit --draft=false --latestpromotes it.verify-assetspromotes only once assets are provably attached.Also: two fixtures brought up to busbar 1.5.3
Independent of the release path, and currently latent because CI pins busbar at
main, which only became 1.5.3 around the time of the cascade:RoutingRequest/Candidategainedrequest_idandsignals. The fixtures pin a fixed id and an emptySignalBag; an empty bag serialises to nothing, so the forwarded envelope is unchanged.auth.admin_auth:were retired in 1.5.3; busbar now refuses to boot such a config. Migrated to a namedidentity-providers:definition referenced by bare name, matching busbars ownconfig.yaml.Known-red, deliberately not addressed here
Two pre-existing failures on
mainthat this PR does not claim to fix:tests/full_stack_e2e.rsasserts one webhook call, now gets two. busbar 1.5.3 emits an additionalnotifycarryingstage: {at: "candidate", remaining_candidates: 1}. Whether the webrequest hook should receive that candidate-stage notification is a question about the hook contract, not something to guess at. Flagged for a decision. With this PR the test at least boots and fails on that one assertion with a clear diagnostic, instead of dying at startup on the config gate.PUBLIC-HYGIENE GATEfails onmain(.github/scripts/next-version.shandrelease-selftest.ymleach cite an internal guard id). Fleet-wide, unrelated to this change.Gate
cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo build --all-targets,cargo test --lib --test e2e(36 passed), andcargo build --release --locked --liball green against a sibling busbar checkout at the pinnedc8780349(1.5.3).