Skip to content

chore: revive and improve release automation - #2266

Merged
LesnyRumcajs merged 13 commits into
masterfrom
galargh/release
Apr 16, 2026
Merged

chore: revive and improve release automation#2266
LesnyRumcajs merged 13 commits into
masterfrom
galargh/release

Conversation

@galargh

@galargh galargh commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

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

codecov-commenter commented Mar 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.02%. Comparing base (a29674a) to head (f8f80dd).
⚠️ Report is 2 commits behind head on master.

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
Comment thread .github/workflows/release-check.yml Outdated

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

BigLep commented Mar 19, 2026

Copy link
Copy Markdown
Member

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

rvagg commented Mar 20, 2026

Copy link
Copy Markdown
Member

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

galargh commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

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

BigLep commented Mar 24, 2026

Copy link
Copy Markdown
Member

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

@galargh

galargh commented Mar 26, 2026

Copy link
Copy Markdown
Contributor Author

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

@BigLep

BigLep commented Mar 30, 2026

Copy link
Copy Markdown
Member

@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

BigLep commented Mar 31, 2026

Copy link
Copy Markdown
Member

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 thread .github/workflows/releaser.yml Outdated
Comment thread .github/workflows/release-check.yml Outdated
@github-project-automation github-project-automation Bot moved this from 🔎 Awaiting Review to ✔️ Approved by reviewer in FilOz Apr 13, 2026
@LesnyRumcajs

Copy link
Copy Markdown
Contributor

@galargh Are we good to merge it?

@rjan90

rjan90 commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

I think #2268 needs a release. cc @rvagg

Just clarifying here that we will hold off on this until after the next schedule network upgrade, so I do not see any blockers merging this PR and trying out the new release flow to see if it works as expected.

@LesnyRumcajs
LesnyRumcajs merged commit 2af1f30 into master Apr 16, 2026
16 of 18 checks passed
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FilOz Apr 16, 2026
@LesnyRumcajs
LesnyRumcajs deleted the galargh/release branch April 16, 2026 14:57
LesnyRumcajs added a commit that referenced this pull request Apr 16, 2026
@LesnyRumcajs

Copy link
Copy Markdown
Contributor

It doesn't seem to be working fine https://github.com/filecoin-project/ref-fvm/actions/runs/24517447981

I reverted it in #2266

LesnyRumcajs added a commit that referenced this pull request Apr 16, 2026
galargh added a commit that referenced this pull request Apr 17, 2026
@galargh

galargh commented Apr 17, 2026

Copy link
Copy Markdown
Contributor Author

https://github.com/filecoin-project/ref-fvm/actions/runs/24517447981 was manually triggered on master, and it correctly failed due to not being able to find a PR for the commit it was running for.

https://github.com/filecoin-project/ref-fvm/blob/0bdeb782766d2fa4fc1384c911a1fb646a08f84f/RELEASE.md#preparing-primary-crates describes a full release cycle that uses the automation.

TLDR

  1. Update primary crates
  2. Create a PR
  3. release-checker creates a draft GitHub release, comments on the PR and runs a dry cargo release
  4. Check if everything's as expected
  5. Merge the PR
  6. releaser publishes draft GitHub releases and runs cargo release

@LesnyRumcajs

Copy link
Copy Markdown
Contributor

https://github.com/filecoin-project/ref-fvm/actions/runs/24517447981 was manually triggered on master, and it correctly failed due to not being able to find a PR for the commit it was running for.

@galargh My bad! I guess I'm not great at RTFM 😓 That said, would it be possible to have more helpful error messages? The invalid template and JSON Reader errors kind of discouraged me from looking deeper into it.

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

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

7 participants