Repository navigation
ci: add timeouts to docker build, lint, and setup-node install steps - #22795
Closed
GirlBossRush wants to merge 1 commit into
Closed
GirlBossRush wants to merge 1 commit into
GirlBossRush wants to merge 1 commit into
Conversation
Three places where CI could previously hang indefinitely now have an explicit upper bound: * `.github/workflows/ci-main.yml` — the main lint/test job gets a 30-minute job-level `timeout-minutes`. * `.github/workflows/_reusable-docker-build-single.yml` — the per-arch container build job gets a 30-minute job-level `timeout-minutes`. * `.github/actions/setup-node/action.yml` — both `corepack npm ci` invocations are wrapped with `timeout 5m`. A step-level `timeout-minutes` would be the more idiomatic GitHub Actions approach but is not supported inside composite actions (actions/runner#1979); the `timeout(1)` shell wrapper is the current workaround. Co-Authored-By: Agent (authentik-m-split-pr-committed-every-mikado) <[email protected]>
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22795 +/- ##
==========================================
- Coverage 93.29% 93.25% -0.05%
==========================================
Files 1033 1033
Lines 60150 60150
Branches 400 400
==========================================
- Hits 56117 56090 -27
- Misses 4033 4060 +27
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
dominic-r
approved these changes
Jun 2, 2026
BeryJu
reviewed
Jun 2, 2026
| run: | #shell | ||
| node ./scripts/node/lint-lockfile.mjs | ||
| corepack npm ci | ||
| timeout 5m corepack npm ci |
Member
There was a problem hiding this comment.
I'd prefer to not do this, this seems much more like a hacky bandaid than a fix
Member
There was a problem hiding this comment.
I agree. I'd rather rely on github action timeouts instead
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
Three places where CI could previously hang indefinitely now have an explicit
upper bound. This is the timeouts-only half of #22533, split out per
@rissson's request; the actual Node-script hang fix lives in the
sibling PR (
ci/fix-node-lint-script-hang)..github/workflows/ci-main.yml— the main lint/test job picks up ajob-level
timeout-minutes: 30. Previously fell back to GitHub's six-hourdefault.
.github/workflows/_reusable-docker-build-single.yml— the per-archcontainer
buildjob picks up the sametimeout-minutes: 30..github/actions/setup-node/action.yml— bothcorepack npm ciinvocations are wrapped with
timeout 5m. See "On thesetup-nodetimeout"below for why this is a
timeout(1)shell wrapper rather than a step-leveltimeout-minutes.Closes #22533 (in favor of this PR + the hang-fix PR).
On the
setup-nodetimeout (reply to @rissson)It is not supported.
.github/actions/setup-node/action.ymlis a compositeaction, and GitHub Actions does not currently allow
timeout-minutesonindividual steps inside
runs.stepsof a composite action. The supported keyson a composite action step are limited to:
run,shell,if,name,id,env,working-directory,uses,with, andcontinue-on-error— per theofficial action metadata syntax reference:
https://docs.github.com/en/actions/sharing-automations/creating-actions/metadata-syntax-for-github-actions.
The long-standing tracking issue is
actions/runner#1979
("Support timeout-minutes in composite-actions"), open since 2022 and still
unresolved — the GitHub Actions team has deferred it pending a future ADR.
So
timeout 5m corepack npm ci(using coreutilstimeout(1)) is the rightworkaround today: a hung
npm cisurfaces as a real step failure within 5minutes instead of relying on the outer 6-hour job default. If
timeout-minuteson composite-action steps lands upstream, we can swap this out for the more
idiomatic form in a follow-up.
Test plan
churn (the
.github/**tree is in.prettierignore).timeout-minutes: 30is set at the job level (where it issupported);
timeout 5mis only used inside the composite action.Disclosure
Triaged and authored end-to-end by an agent running in a sandbox against
goauthentik/authentik@main. Reviewed and shipped by @GirlBossRush.