Repository navigation
npm: require Node 18 for the downloader - #40
vados-cosmonic wants to merge 2 commits into
Conversation
|
Thanks for working on this! Question: this seems to imply to me that we have a bit of a chicken-and-egg problem: if the release commit itself contains a checked-in hash of the build of that commit, how do we actually do a release? Right now, the process is: bump the versions and tags; commit and tag as v0.5.1; wait for the GitHub build to publish the artifacts; then push the npm package. Everything that is published comes from the tree at the same git hash. The "cyclic knot is tied" because we refer to "self" by name ( I guess we could make this work by having two commits -- tag and push v0.5.1 and let GitHub do the builds, then gather the artifact hashes, then push another commit with those, then publish the npm package -- but it's a bit more involved and we'd have to be careful not to merge anything in the meantime to keep the correspondence. One way around that could be to split out the npm package as a separate GitHub repo; so we publish weval in the weval repo, and the only output of that is a tagged release with binary artifacts, then we separately version-bump the artifact dependency in My high-level question is: what problem are we solving here? Removing trust in the TLS-verified connection to GitHub + its trustworthy serving of artifacts? I guess that's a worthy goal, but we have the same issue with e.g. the Wasmtime installer too, and undoubtedly other BA artifacts. |
|
Another thought: for a while I've wanted to see weval move to an automated release process (like Wasmtime has) instead of the tricky five-step process we have now. Would you be willing to work on that? That also constrains the above, but potentially also lessens the pain of having two separate repos (i.e., automated version bump and release in |
|
We could definitely move to an automated release process -- would something like what jco and componentize-js work for you? Single "create-release-pr" action that makes a release PR, then you "just" merge that and the version in question gets released? Happy to work on this separately from this PR and get weval releasing a bit easier.
Yeah I think we might be able to do this all in the same release process -- mostly because the sha of the artifact won't change after we generate it (then, in the same workflow generate the dependent artifact and upload that as well). This should be possible.
Yeah this is a good question, I think what we protect against here is successful supply chain attack (post-release the sha changes, because someone modifies the GH release artifact), but also GH has an immutable release setting now, so actually this may not be necessary at all! We could as well turn that on and remove the verification entirely. |
|
Cool, let's plan on immutable releases instead of checked-in hashes -- just much easier to deal with because of the above cyclic issue. Happy to review a PR to switch the release process whenever you're able -- thanks! |
Add a release-PR flow, building on the existing release workflow: - create-release-pr.yml bumps the version (Cargo.toml, Cargo.lock, npm/weval and the downloader TAG), updates CHANGELOG.md with git-cliff, and opens a release PR. - tag-release.yml tags the merged release PR and starts release.yml on the tag. - release.yml publishes tagged releases to crates.io and npm with trusted publishing (a dry run outside bytecodealliance/weval), pins its actions and scopes its permissions. The github-release action marks `-rc`-style tags as prereleases. Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
ce4321d to
634cdc3
Compare
|
NOTE: we should merge #41 before this PR actually -- I've basically rebased this onto that one, and the only change that matters here is probably the engines.node update |
Note
Merge #41 first. This branch is based on it, so until then the diff includes #41's commit; only the last commit belongs to this PR.
Bumps
engines.nodefor the npm downloader from>=16to>=18, since it uses the globalfetch, which needs Node 18.The rest of the original PR has been dropped:
update.jsand theTAGinrelease.jsonare replaced by the version bump in ci: automate releases with release PRs #41's release PRs.