WebAssembly / binaryen

Optimizer and compiler/toolchain library for WebAssembly
Apache License 2.0
7.52k stars 745 forks source link

Failed to install binaryen through Github API during a release #6722

Open skyf0l opened 4 months ago

skyf0l commented 4 months ago

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
kripken commented 4 months ago

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.

skyf0l commented 4 months ago

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).