fix(env-setup): connectivity smoke tolerates 4xx from anti-bot gates#30
Merged
AndriiTsok merged 1 commit intomainfrom Apr 19, 2026
Merged
Conversation
The Rust diagnostics probe was running `curl -fsS -o /dev/null --max-time 5` against three hosts. The `-f` flag makes curl exit non-zero on HTTP 4xx, so when github.com's / (or crates.io's /) returns 403 to anonymous curl under anti-bot rules, the step exits 22 and flags a yellow X in the job summary — noise, because the point of a connectivity probe is to prove DNS + TCP + TLS, not that the endpoint serves anonymous GETs. Changes: - Drop `-f` and tolerate non-transport curl errors via `|| echo ERR` so any HTTP response counts as reachable. A real outage shows up as `--max-time` timeout with code "000" or "ERR". - Swap the probed paths to endpoints that reliably return 200 to anonymous callers: - crates.io/ → index.crates.io/config.json (sparse-index config) - static.rust-lang.org/ → .../dist/channel-rust-stable.toml - github.com/ → api.github.com/zen The step already has `continue-on-error: true`, so this was cosmetic — but the yellow X on every CI run was misleading.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Rust-diagnostics connectivity smoke test used
curl -fsS, which exits non-zero on HTTP 4xx. When github.com/ (or occasionally crates.io/) returned 403 to anonymous curl under anti-bot rules, the step exited 22 and flagged a yellow X on every CI job summary.What changed
-fand tolerate curl transport errors via|| echo ERR. A real connectivity outage surfaces as `--max-time` timeout (code "000") or the explicit "ERR" sentinel, not a 4xx response.Why it's cosmetic (but worth fixing)
The step is `continue-on-error: true`, so CI never failed — but every run carried a misleading yellow X. Downstream consumers reading the summary had to triple-check whether they were actually offline or just hitting a GitHub anti-bot page. Now the probe genuinely measures connectivity.
Test plan