binaryen icon indicating copy to clipboard operation
binaryen copied to clipboard

Failed to install binaryen through Github API during a release

Open skyf0l opened this issue 1 year ago • 2 comments

Version 118 seems to have just been released on Github, but not all the artifacts are uploaded yet (the Create Release action is still running and I can only see 6 artifacts compared with more than 10 for other releases), so it's impossible to install the latest version of wasm-opt given by the Github API.

I admit I had this error because I was there at the wrong time and I'm always using the latest version by default, but this could block a larger pipeline. A good practice would potentially be to build everything, then make the github release? I don't know, but I wanted to share this finding with you.


My pipeline is currently failing because sigoden/wasm-pkg-build is trying to download the latest version of wasm-opt from the github API, which is not yet built.

Here my logs:

> Fetching https://api.github.com/repos/WebAssembly/binaryen/releases/latest to get latest version of wasm-opt
Failed to install wasm-opt to /home/runner/.cache/wasm-pkg-build/binaryen-version_118/bin/wasm-opt, Request failed with status code 404

skyf0l avatar Jul 08 '24 21:07 skyf0l

Thanks, yeah, that does seem odd. I didn't actually realize that github releases are not atomic... so it incrementally adds files as they go, it seems?

Looks like it's all built now (all 12 assets), at least.

For the future we should do what you suggested, and mark the release as "latest" manually after all assets arrive.

kripken avatar Jul 08 '24 23:07 kripken

For the future we should do what you suggested, and mark the release as "latest" manually after all assets arrive.

Yes, that sounds like the best idea, tagging the new release as latest only once all assets are built. (Or creating a draft release an publishing it later).

skyf0l avatar Jul 09 '24 11:07 skyf0l

We've been doing the draft-then-release workflow without problems for a while now.

tlively avatar Jan 11 '25 05:01 tlively