Skip to content

chore: revive and improve release automation#2266

Open
galargh wants to merge 12 commits intomasterfrom
galargh/release
Open

chore: revive and improve release automation#2266
galargh wants to merge 12 commits intomasterfrom
galargh/release

Conversation

@galargh
Copy link
Copy Markdown
Contributor

@galargh galargh commented Mar 18, 2026

This PR revives the release automation effort from #2027 with several key improvements:

  • Workspace-Aware Dry-Run: Updated release-check.yml to use cargo publish --workspace --dry-run. This leverages Cargo 1.90+'s native multi-package publishing to correctly verify the entire dependency graph, solving the previous failure with interdependent crates.
  • Automated Publishing: Updated releaser.yml to include a cargo publish --workspace step. This automates the final push to crates.io upon merge, ensuring crates are published in the correct order.
  • Updated Documentation: Refreshed RELEASE.md to reflect the new automated process and cleaned up CONTRIBUTING.md to match the current project structure.
  • Merge Master: Incorporated the latest changes from master, including the transition of release documentation to its own file.

Test Plan

To verify these changes, we will perform a live test by simulating a multi-crate release:

  1. Create a Test PR: Open a new PR targeting the galargh/release branch.
  2. Version Bumps: In the test PR, bump the versions of fvm_shared, fvm, and fvm_sdk simultaneously in Cargo.toml.
  3. Verify Release Checker:
    • Ensure the release-check workflow triggers correctly.
    • Verify that the Dry-run publish step (cargo publish --workspace --dry-run) passes.
    • Crucial Check: This should succeed even though the new versions of the dependencies are not yet on crates.io, confirming that Cargo's native workspace-aware publishing is correctly resolving internal dependencies.
  4. Validation: Check that the draft GitHub Releases are correctly created for each crate.

Checklist:

@github-project-automation github-project-automation bot moved this to 📌 Triage in FilOz Mar 18, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.02%. Comparing base (a29674a) to head (ef9e20f).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2266   +/-   ##
=======================================
  Coverage   77.02%   77.02%           
=======================================
  Files         143      143           
  Lines       14187    14187           
=======================================
  Hits        10927    10927           
  Misses       3260     3260           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Enable OIDC trusted publishing for crates.io (id-token: write)
- Use --no-default-features for cargo publish to avoid OpenCL dependency
- Update release documentation to reflect these changes

permissions:
contents: write
id-token: write
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should verify that this workflow is listed as a trusted publisher in crates.io.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd look but I can't find the crate settings even though I should be in the team that has publish access, crates.io teams is janky, maybe @hanabi1224 || @LesnyRumcajs has a clue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Settings should be next to Security on crates.io ,however, I don't have the setting permission of fvm* crates either

image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@galargh galargh marked this pull request as ready for review March 18, 2026 21:54
@galargh galargh requested review from BigLep and rvagg March 18, 2026 21:54
@BigLep BigLep requested a review from LesnyRumcajs March 19, 2026 07:21
@BigLep
Copy link
Copy Markdown
Member

BigLep commented Mar 19, 2026

Added @LesnyRumcajs as another maintainer who may be able to get to looking at this sooner.

@BigLep BigLep moved this from 📌 Triage to 🔎 Awaiting Review in FilOz Mar 19, 2026
@LesnyRumcajs
Copy link
Copy Markdown
Contributor

I'm OOO until Tuesday, best bet is @hanabi1224 now, I guess!

@rvagg
Copy link
Copy Markdown
Member

rvagg commented Mar 20, 2026

worth a try! wouldn't harm to push through a release or three

this has to also work for v3 and v4 so I guess we'd backport it to there as well?

@galargh
Copy link
Copy Markdown
Contributor Author

galargh commented Mar 24, 2026

this has to also work for v3 and v4 so I guess we'd backport it to there as well?

Yes, I don't see why not. I would test it in the default branch first and then do the backport if everything works as expected.

@BigLep
Copy link
Copy Markdown
Member

BigLep commented Mar 24, 2026

What are the next steps? Do we just need to try it out?

@galargh
Copy link
Copy Markdown
Contributor Author

galargh commented Mar 26, 2026

Yes, I did the testing we can do without doing a proper release in #2267

@BigLep
Copy link
Copy Markdown
Member

BigLep commented Mar 30, 2026

@LesnyRumcajs or @hanabi1224 : is there an upcoming proper release we can try this out with to validate it?

@hanabi1224
Copy link
Copy Markdown
Contributor

is there an upcoming proper release we can try this out with to validate it?

@BigLep I think #2268 needs a release. cc @rvagg

@BigLep
Copy link
Copy Markdown
Member

BigLep commented Mar 31, 2026

Ok, so it seems like:

  1. To test this out, we can do a release after chore(deps): bump wasmtime #2268 lands (but that PR requires some more careful investigation)
  2. We need someone to look at the change and give review (independent of doing a relase with it). @LesnyRumcajs or @hanabi1224 : can you please take that?

@LesnyRumcajs
Copy link
Copy Markdown
Contributor

@galargh Can you please help me understand why do we need two very similar workflows? I understand one is for checking the release and another for an actual release, but ideally there'd be just one with a dry_run param. Obviously, it's not a huge deal given the files are not that big and I wouldn't expect much development there to cause potential divergence.

Comment on lines +47 to +48
sudo apt-get update
sudo apt-get install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it might make sense to wrap it with retry. At least in Forest we had some issues with 500s from canonical servers from time to time

        uses: nick-fields/retry@v3
        with:
          timeout_minutes: 5
          max_attempts: 3
          command: |
            sudo apt-get install -y <deps>

name: Release Checker

on:
pull_request_target:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have to use this one? I understand this works on forks but, to my understanding, there are some security considerations around it

Running untrusted code on the pull_request_target trigger may lead to security vulnerabilities. These vulnerabilities include cache poisoning and granting unintended access to write privileges or secrets. For more information, see Secure use reference in the GitHub Enterprise Cloud documentation, and Preventing pwn requests on the GitHub Security Lab website.

https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request_target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔎 Awaiting Review

Development

Successfully merging this pull request may close these issues.

6 participants