Skip to content

fix(ci): pass --format-version 1 to cargo metadata validation steps - #2577

Open
1688mengdie wants to merge 2 commits into
GCWing:mainfrom
BitFun-SIG:fix/ci-warning-metadata-format
Open

fix(ci): pass --format-version 1 to cargo metadata validation steps#2577
1688mengdie wants to merge 2 commits into
GCWing:mainfrom
BitFun-SIG:fix/ci-warning-metadata-format

Conversation

@1688mengdie

Copy link
Copy Markdown

Summary

Fixes #2571

Add --format-version 1 to the three cargo metadata --locked --no-deps invocations 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 problems on every invocation that omits the flag, which pollutes the CI logs of main (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.
  • All three metadata run: lines now read cargo metadata --locked --no-deps --format-version 1.
  • No compile surface is touched; the runtime effect (warning-free metadata steps) depends on the CI runners themselves — the next Rust Build Check / frontend jobs on main will 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

  • Single workflow file, 3 lines changed (+3/−3), no job/step semantics change.
  • AI-assisted change, lightly tested (yaml syntax check only; no compile surface — the workflow run itself is the verification).

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable. (n/a — no user-facing change)

user and others added 2 commits August 28, 2026 02:39
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: cargo metadata compatibility warning repeated in every CI metadata validation step

1 participant