Skip to content

feat: gate new Cargo publication metadata - #340

Draft
JulianRuiseco wants to merge 1 commit into
mainfrom
jrr/add-crate-publish-gate
Draft

feat: gate new Cargo publication metadata#340
JulianRuiseco wants to merge 1 commit into
mainfrom
jrr/add-crate-publish-gate

Conversation

@JulianRuiseco

@JulianRuiseco JulianRuiseco commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Objective

Require explicit approval before a crate becomes metadata-marked for Cargo publication, and detect approved crates that are still absent from the target registry.

Solution

Add check-cargo-publish-policy with separate approval and registry modes. It reads committed Cargo manifests from Git objects, fails closed on invalid metadata or registry responses, and treats a crate name as present regardless of version or yank state.

The command never publishes. Tagged releases continue to check exact dependency versions, publish missing dependencies before dependants, and skip a dependant if its dependency fails.

Testing

  • RUSTC_WRAPPER= cargo test: 307 passed
  • RUSTC_WRAPPER= cargo clippy --all-targets -- -D warnings
  • RUSTC_WRAPPER= cargo check
  • cargo +nightly fmt --all -- --check
  • Compared the current fsl_libs base and head with --check approval: no newly marked packages

Rollout

Release this as v2.48.2 before enabling the dependent fsl_libs workflow or Prow registry policy job.

@fslabs-bot fslabs-bot Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 26, 2026
@fslabs-bot

fslabs-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@fslabs-bot

fslabs-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from julianruiseco. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fslabs-bot fslabs-bot Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant