fix(ci): pass --format-version 1 to cargo metadata validation steps - #2577
Open
1688mengdie wants to merge 2 commits into
Open
fix(ci): pass --format-version 1 to cargo metadata validation steps#25771688mengdie wants to merge 2 commits into
1688mengdie wants to merge 2 commits into
Conversation
Newer cargo releases print a warning on every invocation that omits an explicit metadata format version, which pollutes the three "Verify ... metadata" steps in the upstream CI logs (Verify committed Cargo metadata, Verify committed release metadata, Verify projected release metadata). Pass --format-version 1 explicitly to all three `cargo metadata --locked --no-deps` invocations so the output stays clean and the invocation keeps its current machine-readable contract. Adopted-from: upstream-consistent repair (the taiji workspace shows the same unpatched invocations, so there is no local fix commit to adopt). Test: python yaml.safe_load parses .github/workflows/ci.yml with all eight jobs intact; the three run lines match `cargo metadata --locked --no-deps --format-version 1`. AI: implemented with AI assistance, lightly tested (yaml syntax check only; no compile surface).
…on 1 The workflow change in fa858d0 updated the three cargo metadata validation steps to pass --format-version 1, but the strictEqual assertions in check-github-config.test.mjs (rust-build-check 'Verify committed Cargo metadata' + frontend-build committed/projected release metadata) still expected the old command, so CI Frontend Build 'Validate GitHub config' failed (node --test: 2 failing subtests at lines 206/361).
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.
Summary
Fixes #2571
Add
--format-version 1to the threecargo metadata --locked --no-depsinvocations in.github/workflows/ci.yml(the "Verify committed Cargo metadata", "Verify committed release metadata", and "Verify projected release metadata" steps).Newer cargo releases print
warning: please specify '--format-version' flag explicitly to avoid compatibility problemson every invocation that omits the flag, which pollutes the CI logs ofmain(see issue #2571 for the run evidence).Type and Areas
Type: CI change (workflow maintenance)
Areas: GitHub Actions / CI
Motivation / Impact
No direct user-facing change. The metadata validation steps keep validating exactly the same lockfile-bound metadata; the only changes are (a) the cargo compatibility warning disappears from every CI run, and (b) the machine-readable output contract is pinned explicitly instead of relying on cargo's implicit default.
Verification
python -c "import yaml; yaml.safe_load(open('.github/workflows/ci.yml'))"parses the workflow successfully with all eight jobs intact.run:lines now readcargo metadata --locked --no-deps --format-version 1.mainwill show the clean output (n/a locally — the warning only materializes inside GitHub Actions runners; the workflow run triggered by this PR is exactly the verification).Reviewer Notes
Checklist