Skip to content

ci: cap job runtime and bound the apt step - #103

Open
achubaty wants to merge 1 commit into
PredictiveEcology:developmentfrom
FOR-CAST:ci/bound-apt-and-job-timeouts
Open

ci: cap job runtime and bound the apt step#103
achubaty wants to merge 1 commit into
PredictiveEcology:developmentfrom
FOR-CAST:ci/bound-apt-and-job-timeouts

Conversation

@achubaty

Copy link
Copy Markdown
Collaborator

Why

The render workflow sets no timeout-minutes, so a stalled step runs to GitHub's 6 hour default before failing.

That is not hypothetical. On 2026-08-19 two jobs in a sibling repo using the same install-spatial-deps action sat in that step for 6h0m and were killed, while the ubuntugis PPA was transiently unhealthy. Every other ubuntu job in the same matrix was degraded too (one took 56m against its usual ~8m). Re-running the identical commit passed all jobs in 6–9 minutes — so nothing was wrong with the package, but it cost 12 runner-hours and presented as a package failure.

What

  • timeout-minutes: 90 on the job — a stall now fails in minutes rather than hours. 90 rather than something tighter because these render jobs build a large dependency tree from source.
  • PredictiveEcology/actions pinned v0.2v0.4, which:
    • wraps each apt call in timeout (5m/5m/10m) with 3 attempts and backoff — composite-action steps do not support timeout-minutes, so this is the only way to bound them from inside;
    • sets DEBIAN_FRONTEND=noninteractive (with sudo -E) so an unattended apt-get cannot block on a debconf prompt;
    • passes --no-install-recommends.

install-spatial-deps is the only action changed between v0.2 and v0.4, so the pin bump carries nothing else.

Scope

Workflow file only — no module code touched. Branched from development so the diff is this change alone.

No timeout-minutes was set, so a stalled step ran to GitHub's 6h default
before failing. That is not hypothetical: on 2026-08-19 two jobs in a
sibling repo sat in install-spatial-deps for 6h0m and were killed while
the ubuntugis PPA was transiently unhealthy -- 12 runner-hours spent, and
it presented as a package failure. Re-running the same commit passed in
6-9 minutes.

- timeout-minutes on the job, so a stall fails in minutes rather than hours;
- PredictiveEcology/actions pinned v0.2 -> v0.4, which wraps each apt call
  in `timeout` with retries, sets DEBIAN_FRONTEND=noninteractive so an
  unattended apt-get cannot block on a debconf prompt, and passes
  --no-install-recommends. install-spatial-deps is the only action changed
  between those tags, so the bump carries nothing else.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
achubaty added a commit to PredictiveEcology/LandWeb that referenced this pull request Aug 20, 2026
Applies the same hardening to the six FOR-CAST Biomass_* forks:
timeout-minutes on the job, and PredictiveEcology/actions v0.2 -> v0.4
(bounded + retried apt calls, DEBIAN_FRONTEND=noninteractive,
--no-install-recommends).

The same change is proposed upstream, each PR branched from upstream's
`development` -- which is what the FOR-CAST forks' `main` derives from --
so every diff is exactly this one workflow file (+5/-4) rather than the
30-132 unrelated commits a default-branch base would have dragged in:

  Biomass_borealDataPrep     PredictiveEcology/Biomass_borealDataPrep#103
  Biomass_core               PredictiveEcology/Biomass_core#105
  Biomass_regeneration       PredictiveEcology/Biomass_regeneration#20
  Biomass_speciesData        PredictiveEcology/Biomass_speciesData#45
  Biomass_speciesParameters  PredictiveEcology/Biomass_speciesParameters#56
  Biomass_speciesFactorial   PredictiveEcology/Biomass_speciesFactorial#14

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant