Skip to content

ci: add timeouts to docker build, lint, and setup-node install steps - #22795

Closed
GirlBossRush wants to merge 1 commit into
goauthentik:mainfrom
GirlBossRush:ci/add-ci-step-timeouts
Closed

GirlBossRush wants to merge 1 commit into
goauthentik:mainfrom
GirlBossRush:ci/add-ci-step-timeouts

Conversation

@GirlBossRush

@GirlBossRush GirlBossRush commented Jun 2, 2026 •

Copy link
Copy Markdown
Contributor

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 a
    job-level timeout-minutes: 30. Previously fell back to GitHub's six-hour
    default.
  • .github/workflows/_reusable-docker-build-single.yml — the per-arch
    container build job picks up the same timeout-minutes: 30.
  • .github/actions/setup-node/action.yml — both corepack npm ci
    invocations are wrapped with timeout 5m. See "On the setup-node timeout"
    below for why this is a timeout(1) shell wrapper rather than a step-level
    timeout-minutes.

Closes #22533 (in favor of this PR + the hang-fix PR).

On the setup-node timeout (reply to @rissson)

Should this be a timeout on that step instead? If that's supported, I'm not
100% on that

It is not supported. .github/actions/setup-node/action.yml is a composite
action
, and GitHub Actions does not currently allow timeout-minutes on
individual steps inside runs.steps of a composite action. The supported keys
on a composite action step are limited to: run, shell, if, name, id,
env, working-directory, uses, with, and continue-on-error — per the
official 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 coreutils timeout(1)) is the right
workaround today: a hung npm ci surfaces as a real step failure within 5
minutes instead of relying on the outer 6-hour job default. If timeout-minutes
on composite-action steps lands upstream, we can swap this out for the more
idiomatic form in a follow-up.

Test plan

  • YAML changes are purely additive — no other lines touched, no formatting
    churn (the .github/** tree is in .prettierignore).
  • timeout-minutes: 30 is set at the job level (where it is
    supported); timeout 5m is only used inside the composite action.
  • CI green on this branch.

Disclosure

Triaged and authored end-to-end by an agent running in a sandbox against
goauthentik/authentik@main. Reviewed and shipped by @GirlBossRush.

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]>
@GirlBossRush
GirlBossRush requested a review from a team as a code owner June 2, 2026 15:35
@netlify

netlify Bot commented Jun 2, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit a6a4630
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6a1ef83b91603d0007470042
😎 Deploy Preview https://deploy-preview-22795--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jun 2, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit a6a4630
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a1ef83b3007480008d28c1f
😎 Deploy Preview https://deploy-preview-22795--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Jun 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.25%. Comparing base (4032c10) to head (a6a4630).
⚠️ Report is 7 commits behind head on main.

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     
Flag Coverage Δ
conformance 36.56% <ø> (+<0.01%) ⬆️
e2e 41.83% <ø> (+0.02%) ⬆️
integration 32.51% <ø> (-0.49%) ⬇️
rust 0.00% <ø> (ø)
unit 92.23% <ø> (+<0.01%) ⬆️
unit-migrate 92.26% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

run: | #shell
node ./scripts/node/lint-lockfile.mjs
corepack npm ci
timeout 5m corepack npm ci

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to not do this, this seems much more like a hacky bandaid than a fix

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I'd rather rely on github action timeouts instead

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.

4 participants