Skip to content

Why Manifest Resolvers Run on macOS

Vanndher Amós edited this page Nov 16, 2026 · 1 revision

Summary

The weekly manifest refresh workflow (.github/workflows/update-manifest.yaml) runs on macos-latest instead of ubuntu-latest because the DATASUS SI-PNI portal (sipni.datasus.gov.br) blocks network connections from GitHub Actions' Linux and Windows runners.

Because datazoompuc/datazoom.saude is a public repository, macos-latest runners are available at no cost.


Root Cause: Datacenter IP Blocking

During CI testing across GitHub-hosted runners:

  • Linux (ubuntu-latest) and Windows (windows-latest) runners consistently fail to open a TCP connection to sipni.datasus.gov.br on port 443:
    Timeout was reached [sipni.datasus.gov.br]: Connection timed out after 30000 milliseconds
    
    The connection never completes the TCP handshake, meaning the server firewall/edge drops packets before any TLS negotiation or HTTP request (User-Agent, cookies, headers) is seen.
  • macOS (macos-latest) runners run on separate infrastructure (Apple/AWS) outside the Azure datacenter IP ranges used by Linux/Windows runners, and reach sipni.datasus.gov.br without timeout.

How CI Is Configured

Workflow Runner(s) Behavior
.github/workflows/update-manifest.yaml macos-latest Runs actions/scripts/build_manifest.R (both resolve_datasus.R and resolve_sipni.R) every Monday at 05:00 UTC or on manual dispatch.
.github/workflows/R-CMD-check.yaml ubuntu-latest (release, devel, oldrel-1), windows-latest (release), macos-latest (release) Keeps full cross-platform coverage. load_vaccines() uses @examplesIf interactive(), so R CMD check skips live SI-PNI network calls in non-interactive CI runs.

Monitoring & Fallback

  • If macos-latest is ever blocked by DATASUS in the future, resolve_sipni.R captures structured network/HTTP diagnostics (sipni_failed_fetch_evidence()) and update-manifest.yaml opens or comments on a GitHub Issue labeled manifest (exit code 30, or 11 if another resolver such as datasus produced manifest updates).
  • Partial failures do not discard updates from healthy resolvers: datasus FTP updates are still staged and opened as a review PR even if sipni fails.

Clone this wiki locally