ci: TEM-9 release workflow - #138
Conversation
|
Hey, I went through this and I like the general direction, but I’m a bit worried about how the release is coordinated. Right now each image workflow and The GitHub Release can also be created before all image builds and smoke tests finish, so we could end up with a release where one image family failed or is missing. Could we have one workflow calculate the version once, pass it to the image builds, wait for them, and only create the release after everything succeeds? A few smaller things I noticed:
Since #142 is based on this branch and #146/#147 touch the same release and versioning files, it would be best to finalize this flow before merging the others. |
|
Thanks, I checked the latest commits. The release documentation now matches the centralized workflow, and the latest run shows that the new build chain itself is working, all builds and the base, Nvidia, PyTorch, autoresearch, and cluster tests passed. The ROCm failure looks unrelated to the code: all three images were skipped because no MI300X capacity was available, with 0 actual test failures. One thing we should decide before merging is whether unavailable ROCm capacity should block a real release on The main concurrency setup also still keeps only one pending run. This avoids the duplicate-version race, but if three merges land during a long build, the middle release run will be replaced by the newest one. If combining those changes into one release is intentional, that’s fine; otherwise the main release path should use a multi-run queue such as There’s also one small stale comment in |
You're right, but I think it's fine for us. Our version comes from git history (compute-version covers the whole range since the last tag), so even if a middle run gets superseded, the surviving run still includes all those commits - nothing is lost, we'd just get one combined release instead of separate ones. And realistically, this needs 3+ merges within a single long build window, which our small team and merge cadence just don't hit. We can add a merge queue later if per-merge releases ever become a requirement. All other findings were fixed. |
|
I noticed one small issue in the successful rerun: the Because the download step uses |
Summary
Implements automated, semver-based releases driven by Conventional Commits
(TEM-9) and documents the process (TEM-10).
Previously the version lived in
versions.hcland was bumped by hand. This PRmakes the version derived from git tags + Conventional Commits: PRs build
release-candidate images, and a squash-merge to
mainbuilds the final images,creates the
vX.Y.Ztag, and publishes a GitHub Release — with no manualversion editing.
A single orchestrator workflow computes the version once, fans out to the
per-family build workflows (reused via
workflow_call), waits for all of them,and only then cuts the release — so builds and the release can't disagree on the
version or race each other.
How it works
release.yml, "Build and Release") owns all triggers(
pull_request,push: main,workflow_dispatch), computes the version oncein a
versionjob, and passes it into every build.vX.Y.Ztag reachable from HEAD + theConventional Commit type.
feat:→ minor,fix:/perf:→ patch,!/BREAKING CHANGE→ major,everything else (
ci:/chore:/docs:…) → no release.becomes the commit on
main); onmainit's derived from the commits.base.yml,nvidia.yml,rocm.ymlviaon: workflow_call) — they no longer compute the version orown triggers; the orchestrator calls them with the computed
version/suffix.X.Y.Z-rc.<PR#>for the affected families only(a
changesjob gates which reusable workflows are called).main(releasable): builds all families withX.Y.Z,then the
releasejob tagsvX.Y.Z+ cuts a GitHub Release only after everyfamily built and smoke-tested successfully.
workflow_dispatch: builds-devimages, never releases.push: main(
concurrencywith a constant group,cancel-in-progress: false), so twomerges landing close together can't compute the same version — the 2nd waits
for the 1st to tag.
base → pytorch → pytorch-cluster:-clusterbuildsFROM the published
runpod/pytorch, so it runs afterbuild-pytorchinthe same run. On a release it layers on the freshly-built
X.Y.Zpytorch; on aPR that changed pytorch it layers on that PR's RC pytorch (so smoke tests
reflect the real post-merge image); a cluster-only PR layers on the last
released pytorch (no pointless full-matrix pytorch rebuild).
Changes
.github/actions/compute-version— computes version/suffix and theshould-build/should-releaseflags from git + Conventional Commits.Selects the base tag as the latest release reachable from HEAD (so
re-running an older commit doesn't pick up a newer, unrelated tag). Also
exposes a
base-versionoutput (last released version, no bump) so a clusterbuild can layer onto an already-published pytorch when this run doesn't
rebuild pytorch.
release.ymlis now the orchestrator — owns triggers + concurrency,runs the single
versionjob and achangesjob (per-family PR gating),calls the reusable build workflows, and gates the tag + GitHub Release on
push: main+should-release+ all families succeeding.base.yml/nvidia.yml/rocm.yml→ reusable workflows(
on: workflow_call, inputsversion/suffix/base_version,secrets: inherit). Removed their individualversionjobs, triggers andconcurrency;
RELEASE_VERSION/RELEASE_SUFFIXnow come from inputs. Internalper-family changed-files gating (pytorch/autoresearch/cluster) is unchanged.
pytorch-clusterrelease — the-clusterfamily lives insidebase.ymlas
build-cluster+test-clusterafterbuild-pytorch(base → pytorch →cluster in one deterministic pipeline).
pytorch-cluster/docker-bake.hcl'sBASE_IMAGEuses a dedicatedPYTORCH_BASE_VERSIONvariable (the pytorch itbuilds FROM), kept separate from the cluster's own tag so PR builds don't try
to layer onto a not-yet-published pytorch version.
official-templates/**,container-template/**) so no build-relevant input (e.g.requirements.txt,pre_start.sh,start.sh) is missed. Pipeline-only (ci:) changes to theworkflow/action files intentionally don't trigger a build.
softprops/action-gh-releasepinned to a commit SHA (like the otheractions).
docker-setup— dropped the old-dev-<branch>suffix logic (moved intocompute-version).versions.hcl—RELEASE_VERSIONis now a bakevariable(CI-overridable;the default is just a local fallback).
docs/RELEASE.md— release + maintenance documentation (TEM-10).