paritytech / paritytech/revive
Nightly `resolc_web.js` broken, all nightly binaries auth-gated
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 102
- Forks
- 26
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 6
Description
Description
Issues
-
The nightly
resolc_web.jsbundle cannot fetchresolc.wasmjs/emscripten/build.jsbakes the wasm URL into the bundle at build time via envRELEASE_RESOLC_WASM_URI:
https://github.com/paritytech/revive/blob/3a20436ddb9efb30b91af73178a2e8143e4f9491/js/emscripten/build.js#L7-L8- The build workflow sets that to
…/releases/download/${{ github.ref_name }}/resolc.wasm - For tagged releases this resolves correctly. For nightly cron on
mainit becomes…/releases/download/main/resolc.wasm, which 404s test-wasm.ymldoesn't catch this because its bundle uses the localhost-fallback URL baked in instead
-
All nightly binary URLs require GitHub auth
- They're GitHub Actions artifact URLs (
…/actions/runs/<id>/artifacts/<artifact-id>) - Anonymous consumers are redirected to a URL that 404s
- They're GitHub Actions artifact URLs (
[!NOTE]
The issues are related:For the nightly wasm release, the baked URL needs to be a deterministic (issue 1) and publicly-reachable (issue 2) URL.
Current Publish Chain
flowchart TD
A[reusable-build.yml] -->|"bakes RELEASE_RESOLC_WASM_URI<br/>into resolc_web.js"| B[upload-artifact]
B -->|"per-run URL<br/>(auth-gated)"| C[release-nightly.yml<br/>generate-nightly-json]
C -->|"writes URL into<br/>resolc-bin/nightly/<platform>/list.json"| D[Consumer follows URL]
D -->|Anonymous| E[Download 404s]
D -->|Authenticated| F[Wasm fetch 404s]
Solution Options
- Upload to anonymously-readable object storage
- Fixes both bugs: stable, public URLs, predictable at build time
- We could upload nightly binaries to an anonymously-readable object storage under deterministic paths, e.g.:
<bucket-url>/nightly/wasm/<longVersion>/{resolc.wasm, resolc.js, resolc_web.js}<bucket-url>/nightly/linux/<longVersion>/resolc-x86_64-unknown-linux-musl<bucket-url>/nightly/macos/<longVersion>/resolc-universal-apple-darwin<bucket-url>/nightly/windows/<longVersion>/resolc-x86_64-pc-windows-msvc.exe
- Bake that corresponding URL into
resolc_web.jsand have resolc-bin'slist.jsonreference the same URLs - The bucket's lifecycle policy can automatically handle deleting old binaries
- E.g. we could choose to always keep only the 7, 14, or 30 etc. most recent nightly builds
- The nightly JSON generator script would also need to be updated to remove old entries to stay in sync with what is actually in the bucket
Likely Less Ideal
- Rolling
nightlyGitHub Release tag- Would solve both bugs, but would clutter the Releases page
- Host binaries on
paritytech/resolc-binvia GitHub Pages- Would solve both bugs, but GH Pages has site limits, and committing binaries indefinitely inflates the repo's git history
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with js/emscripten/build.js and the reusable-build.yml, test-wasm.yml, and release-nightly.yml workflows to trace how nightly URLs are baked and published. Decide on a public, deterministic storage path, then verify that resolc_web.js can fetch resolc.wasm anonymously and that resolc-bin nightly list.json points to downloadable binaries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, javascript
- Domain
- ci-cd, cloud, release
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100