Skip to content

Run short CI bookkeeping jobs on ubuntu-slim runners - #72852

Merged
potiuk merged 2 commits into
mainfrom
use-ubuntu-slim-for-short-jobs
Sep 10, 2026
Merged

potiuk merged 2 commits into
mainfrom
use-ubuntu-slim-for-short-jobs

Conversation

@potiuk

@potiuk potiuk commented Sep 9, 2026

Copy link
Copy Markdown
Member

A large share of our workflow jobs never build an image, never install Airflow
and never run a test suite — they compute a matrix, post a Slack message, close
a stale issue, check a newsfragment name. They were holding a 2-core runner for
their whole (short) lifetime, competing with the builds and test shards that
genuinely need one.

ubuntu-slim (1 core, 5 GB RAM, 14 GB disk, unprivileged container) is the right
size for that class of work. 22 jobs across 19 workflows move onto it.

What decided the cut

ubuntu-slim's constraints, verified against the runner image rather than assumed:

  • No Docker daemon — client only, unprivileged, no DinD. Everything touching
    Breeze, image builds or Docker-container actions stays put.
  • python3 is Ubuntu's system interpreter — PEP 668 externally managed, so a
    bare pip install fails.
  • Minimal toolset — git, gh, jq, node, curl present; no Java, no Go.
    actions/setup-* still works (tool-cache downloads).
  • One core — jobs doing real work need timeout headroom.

So every moved job is one that only shuffles metadata: matrix computation
(detect-languages, registry-backfill's prepare), notifications (notify-slack,
notify-on-failure, the CI-duration and flaky-test reports), issue/PR housekeeping
(stale, recheck-old-bug-report, milestone-tag-assistant, automatic-backport),
and cheap guards (check-newsfragment-pr-number, the two dependency-review jobs,
registry-tests). I checked that every Python script involved is stdlib-only.

uv installs

Three moved jobs installed uv by sed-ing the version out of uv.lock and
pip-installing it into the system interpreter — which this image refuses. They now use:

- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d  # v10.0.1
  with:
    version-file: uv.lock

setup-uv's uv.lock parser finds the package named uv and returns its version —
exactly what the sed did — so the pin is preserved. ci-notification was previously
installing unpinned uv, so it gains determinism here. All three scripts carry PEP 723
inline metadata, so uv run provisions its own Python; no setup-python needed. The
pinned SHA is already used in registry-tests.yml and is on the ASF approved allowlist.

Not moved

asf-allowlist-check is the one obvious candidate left behind: the blocker is inside
the upstream apache/infrastructure-actions/allowlist-check composite, which does a
bare pip install ruyaml with no setup-python. Fixing that belongs upstream — PR to
follow.

registry-tests is the only moved job doing real work, so its timeout goes 5 → 10 min
for the single core.

Also documents the two runner tiers and the slim constraints in
dev/breeze/doc/ci/05_workflows.md, so new jobs land on the right one.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5)

Generated-by: Claude Code (Opus 5) following the guidelines

🤖 Generated with Claude Code

https://claude.ai/code/session_01UL4HBX63zq4um1L4XBcJYy

A large share of our workflow jobs never build an image, never install
Airflow and never run a test suite - they compute a matrix, post a Slack
message, close a stale issue or check a newsfragment name. Those jobs held
a 2-core runner for their whole (short) lifetime, competing with the builds
and test shards that genuinely need one.

ubuntu-slim is a single-core, 5 GB, unprivileged container image, which is
the right size for that class of work and keeps the larger runners free for
jobs that cannot fit on it. Its constraints - no Docker daemon, an
externally-managed system Python, a minimal toolset - decided which jobs
moved: anything touching Breeze, Docker, Gradle or a real test suite stayed
where it was.

Three of the moved jobs installed uv by extracting the version from uv.lock
and pip-installing it into the system interpreter, which PEP 668 refuses on
this image. They now use astral-sh/setup-uv with version-file: uv.lock,
which resolves the same locked version and lets uv provision its own Python.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UL4HBX63zq4um1L4XBcJYy

@jason810496 jason810496 left a comment

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.

Make sense to use lightweight machine for the operational work, nice one. Thanks.

Comment thread dev/breeze/doc/ci/05_workflows.md Resolved
@potiuk
potiuk merged commit 1685bd6 into main Sep 10, 2026
9 checks passed
@potiuk
potiuk deleted the use-ubuntu-slim-for-short-jobs branch September 10, 2026 08:14
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: v3-3-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
❌ v3-3-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 1685bd6 v3-3-test

This should apply the commit to the v3-3-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

@github-actions github-actions Bot added this to the Airflow 3.3.2 milestone Sep 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.3.2 based on: backport label targeting v3-3-test
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

potiuk added a commit that referenced this pull request Sep 10, 2026
) (#72874)

* Run short CI bookkeeping jobs on ubuntu-slim runners

A large share of our workflow jobs never build an image, never install
Airflow and never run a test suite - they compute a matrix, post a Slack
message, close a stale issue or check a newsfragment name. Those jobs held
a 2-core runner for their whole (short) lifetime, competing with the builds
and test shards that genuinely need one.

ubuntu-slim is a single-core, 5 GB, unprivileged container image, which is
the right size for that class of work and keeps the larger runners free for
jobs that cannot fit on it. Its constraints - no Docker daemon, an
externally-managed system Python, a minimal toolset - decided which jobs
moved: anything touching Breeze, Docker, Gradle or a real test suite stayed
where it was.

Three of the moved jobs installed uv by extracting the version from uv.lock
and pip-installing it into the system interpreter, which PEP 668 refuses on
this image. They now use astral-sh/setup-uv with version-file: uv.lock,
which resolves the same locked version and lets uv provision its own Python.


Claude-Session: https://claude.ai/code/session_01UL4HBX63zq4um1L4XBcJYy

* Update dev/breeze/doc/ci/05_workflows.md



---------



(cherry picked from commit 1685bd6)

Co-authored-by: Claude Opus 5 <[email protected]>
Co-authored-by: Wei Lee <[email protected]>
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.

3 participants