fix(ci): pin --format-version 1 in metadata checks - #2617
Open
1688mengdie wants to merge 1 commit into
Open
Conversation
PR GCWing#2577 added `--format-version 1` to the `cargo metadata` validation steps in ci.yml so the pipeline consumes explicit JSON v1 output instead of relying on the default format. The same bare invocations were still present in linux-binaries.yml (Verify committed/projected Cargo metadata) and nightly-artifacts.yml (Verify committed/projected Cargo metadata), leaving those four checks on the implicit default format. Append `--format-version 1` to those four steps and sync the expected command strings in scripts/check-github-config.test.mjs (the nightly expectation and the two linux-binaries assertions) so the config tests keep pinning the exact validation commands. Assisted-by: AI agent (Claude)
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.
Pass --format-version 1 to remaining cargo metadata validation steps
Summary
The release and nightly build pipelines still invoke
cargo metadatawithout an explicit format version in four validation steps:
.github/workflows/linux-binaries.ymllines 129/146 and.github/workflows/nightly-artifacts.ymllines 161/207. PR #2577 pinned--format-version 1for the threeci.ymlcalls; this change extendsthe same pin to the remaining surface so every metadata validation step
uses the same machine-readable output contract.
Root cause
linux-binaries.ymlandnightly-artifacts.ymlpredate the formatpinning change and were not covered by #2577, leaving four bare
cargo metadata --locked --no-depscalls that would emit acompatibility warning if cargo changes its default output format.
Changes
--format-version 1to the four remaining validation steps(Verify committed / projected Cargo metadata in both workflows).
check-github-config.test.mjs(lines 705, 801, 802) that pin these steps.
Testing
pnpm run check:github-config鈥?both stages pass (12 workflow filesparsed; tests 19 pass / 0 fail / 1 environment-dependent skip on
pwsh-less hosts, equivalent assertion 705 passes).
Fixes #2616
Assisted-by: AI agent (Claude)