Skip to content

[BUILD] Fix packaging CI: ENOSPC, PR-trigger removal, tag matching, version sync#796

Open
shiptux wants to merge 8 commits into
flagos-ai:mainfrom
shiptux:fix/packaging-ci
Open

[BUILD] Fix packaging CI: ENOSPC, PR-trigger removal, tag matching, version sync#796
shiptux wants to merge 8 commits into
flagos-ai:mainfrom
shiptux:fix/packaging-ci

Conversation

@shiptux

@shiptux shiptux commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #794. Fixes the packaging CI issues seen this week (two Build-RPM runs hit ENOSPC on 2026-07-15 and blocked unrelated PRs).

  • Narrow the PR trigger to packaging files — the old python/**-wide filter ran the ~45-min build on unrelated PRs (e.g. an mthreads change building the nvidia package). PRs now trigger only on packaging/** / workflow-file changes; source-code coverage moves to release tags + workflow_dispatch.
  • Fix ENOSPC — free ~25-30 GB of unused preinstalled toolchains before building (guarded to GitHub-hosted runners only), and drop the CMake build tree + LLVM cache from the wheel Docker layer.
  • Fix tag triggerv* never matched: release tags are unprefixed since 0.3.0 (0.6.0, 0.6.0rc1). Match numeric tags and skip backend-variant tags (0.6.0+mthreads3.6) at the job level.
  • Sync package version — spec/changelog said 0.5.0 while the wheel is 0.6.0; bump both and fail the rpm install step on future drift.

Why ENOSPC: disk breakdown of one packaging job

ubuntu-latest runners have ~14-20 GB free (varies per machine — hence the flakiness). Peak usage per job:

Segment Size
Checkout + buildx context + base/toolchain/pip layers ~2.5-3 GB
Wheel-build layer (peak): LLVM download + extract (~3 GB), CMake tree with libtriton.so (~4-8 GB), setuptools' two full staging copies (~2-3 GB), wheel zip ×2 (365 MB each) ~8-13 GB
RPM assembly (buildroot unpacks the wheel) + output ~2.5-3.5 GB

Total peak ~13-18 GB rides exactly on the free-space line; both observed failures happened inside the wheel-build peak (fedora43 while zipping the wheel, openeuler2403 at final link). The cleanup step raises headroom past the peak; the in-layer rm stops the dead build tree from being carried through the assembly stage.

shiptux added 5 commits July 16, 2026 00:00
The full-source wheel build peaks close to the standard runner's ~14 GB
free disk: two Build-RPM runs hit ENOSPC on 2026-07-15 (fedora43 during
wheel zip packing, openeuler2403 during final link), blocking unrelated
PRs. Packaging is a release artifact, not a PR gate:

- drop the pull_request trigger; keep tag push + workflow_dispatch
- reclaim ~25-30 GB by removing unused preinstalled toolchains
- add a concurrency group to cancel superseded runs
Remove /src/build and /root/.triton at the end of the wheel-build RUN so
the layer keeps only /wheels. The CMake build tree plus the downloaded
LLVM tarballs add several GB to the layer and contribute to ENOSPC on
CI runners; they are dead weight once the wheel exists.
The spec and debian changelog still said 0.5.0 while setup.py builds
flagtree 0.6.0, so packages were mislabeled. Bump both to 0.6.0 and make
the rpm install step fail if the wheel version ever drifts from the spec
Version again.
Skip the sudo rm -rf toolchain cleanup unless RUNNER_ENVIRONMENT is
github-hosted, so a future switch to a self-hosted runner cannot wipe a
persistent machine.
The tag trigger only matched 'v*', but FlagTree release tags dropped
the v prefix after v0.3.0 (0.6.0, 0.6.0rc1, ...), so tag pushes never
started a packaging build. Match unprefixed numeric tags too, and skip
backend-variant tags (0.6.0+mthreads3.6) at the job level: '+' is not
a valid RPM Version character and those releases are not the nvidia
package.
shiptux added 2 commits July 16, 2026 00:36
Move the rationale narrative to the PR description; keep only the
constraints a reader needs at the code.
Packaging edits do need CI validation before merge, and contributors
without write access cannot use workflow_dispatch upstream. Narrow the
paths to packaging/** and the workflow file itself instead of the old
python/**-wide filter that ran the 45-min build on unrelated PRs.
Install the freshly built rpm/deb in the assembler stage and run
'import triton'. rpmbuild/dpkg-buildpackage validate packaging metadata
but never execute the payload, so the 'installs fine, fails at import'
class (missing libs, bad rpath, glibc mismatch) went undetected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant