Skip to content

Propagate download errors instead of falling back to a misleading file-not-found#97

Merged
josevalim merged 1 commit into
elixir-lang:masterfrom
gmile:propagate-download-error
Jun 10, 2026
Merged

Propagate download errors instead of falling back to a misleading file-not-found#97
josevalim merged 1 commit into
elixir-lang:masterfrom
gmile:propagate-download-error

Conversation

@gmile

@gmile gmile commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Recently we were puzzled by an attempt to compile lazy_html library during an otherwise boring CI run, which never happened before. Upon closer look, it seems like it might have been a network hiccup.

This change improves the error message.

  • before: when a precompiled NIF download fails, the error from Artefact.download/2 was discarded and verify_and_decompress/2 then ran on the missing file, reporting a misleading :enoent instead of the real reason.
  • after: capture the download result and report it before proceeding to compilation.

@gmile gmile force-pushed the propagate-download-error branch from 6c3d0c3 to c403d67 Compare June 10, 2026 09:53
@josevalim

Copy link
Copy Markdown
Member

Looks good to me!

When a precompiled NIF download failed, the error from Artefact.download/2 was
discarded and verify_and_decompress/2 then ran on the missing file, reporting a
misleading :enoent. Capture the download result and only verify on success.
@gmile gmile force-pushed the propagate-download-error branch from c403d67 to c7cc804 Compare June 10, 2026 10:21
@gmile gmile marked this pull request as ready for review June 10, 2026 10:24
@gmile

gmile commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

I force-pushed (by just changing the commit SHA), in an attempt to perform a re-run to fix what looks like flaky test failures. But looks like a GH actions run is pending approval.

@josevalim I went ahead and marked this PR as "ready for review"

@josevalim josevalim merged commit 5904df0 into elixir-lang:master Jun 10, 2026
1 of 2 checks passed
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

I will fix the heisenbug locally.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants