feat: per-OS multi-select version matrix + versioned tag namespace (PARKED) - #37
Draft
jclaveau wants to merge 2 commits into
Draft
feat: per-OS multi-select version matrix + versioned tag namespace (PARKED)#37jclaveau wants to merge 2 commits into
jclaveau wants to merge 2 commits into
Conversation
The on-demand build form gains `ubuntu_version` + `alpine_version` multi-select dropdowns (each with a `_extra` free-text companion for unlisted versions). Each (os, os_version) becomes its own matrix cell; tags now include the OS version, e.g. `jclaveau/ubuntu-24.04-gha-tools:latest`. Internals: - github-context emits `os_matrix` as a tuple list plus five pre-computed Cartesians (hardened, test_gha, test_mode, test_pw, promote) so each downstream job can `include:` a flat list — GH Actions can't express Cartesian-of-include at job level. - All 25+ build/test/promote matrix jobs switch to `matrix: include:` and reference `matrix.os_version` alongside `matrix.os`. - `versions` becomes a matrix-per-tuple job; a new `versions-aggregate` job collates per-cell artifacts into a single `versions_map` keyed by `<os>-<os_version>`. `promote`'s pin step indexes this map via `format()`. - The `changes` detection script iterates os_matrix tuples and emits keys like `ubuntu-24.04-gha-tools` matching the new build-layer `image:` input. - OS defaults come from each Dockerfile's `ARG OS_VERSION=` — bumping the ARG is the deliberate maintainer step. New `refresh-os-version-options.yml` keeps the dropdown lists in sync with upstream supported releases (endoflife.date; Ubuntu LTS + non-EOL only). Runs weekly + manual; commits directly to main on drift; no-op on fetch failure (never empties the dropdown). Breaking: old `jclaveau/<os>-<image>:*` tags are now frozen. Consumers must migrate to `jclaveau/<os>-<os_version>-<image>:*`. README updated with a top-of-file migration banner. Assisted-by: Claude:claude-opus-4-7
The previous shape
matrix:
include: ${{ fromJSON(needs.github-context.outputs.X) }}
is YAML-valid but GH Actions rejects it at run-start (workflow-file
error, 0 jobs queued). The documented dynamic-matrix pattern is
matrix: ${{ fromJSON(needs.github-context.outputs.X) }}
where the JSON itself is `{"include":[...]}`. Updated github-context
to emit each per-shape matrix wrapped, switched all 27 matrix-using
jobs to the unindented form, and updated the changes-detection
Python to read `["include"]` off the wrapped os_matrix env var.
Internal cartesian shell vars stay bare arrays so downstream
cartesians compose cleanly; only the GITHUB_OUTPUT emits are wrapped.
Assisted-by: Claude:claude-opus-4-7
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.
Status: PARKED — do not merge yet
This branch holds the work I tried to ship to
mainasd8d250c+ed44dc4(then reverted viaeb8067b+080d8cebecause the workflow file was rejected by GitHub Actions at run-start). The commits below are cherry-picks of the reverted pair so the work isn't lost.Local
yaml.safe_loadparses the workflow fine; only GH's stricter parser objects. The signal is the run'snamebecoming the file path instead ofTest and Publish, with 0 jobs queued and no useful error in the API.What's in here
.github/ISSUE_TEMPLATE/build-request.yml—ubuntu_version+alpine_versionmulti-select dropdowns with_extrafree-text companions for unlisted versions..github/workflows/on-demand-build.yml— parses the four new fields, merges per-OS dropdown + extra CSV, forwardsubuntu_version/alpine_versiontotest-and-publish.yml..github/workflows/test-and-publish.yml—os_versioninput replaced byubuntu_version+alpine_version.os_matrixbecomes a{os, os_version}tuple list; five pre-computed Cartesians (hardened_matrix,test_gha_matrix,test_mode_matrix,test_pw_matrix,promote_matrix) feed the 27 matrix-using jobs.versionsrewritten as matrix-per-tuple with a newversions-aggregatecollator.promoteindexes theversions_mapviaformat().changesdetection iterates tuples and emits<os>-<os_version>-<suffix>keys..github/workflows/refresh-os-version-options.yml(new) — weekly cron pulling endoflife.date (Ubuntu LTS + non-EOL Alpine) →yqpatches the dropdown options → direct push on drift, no-op on fetch failure.README.md— top-of-file migration banner + versioned naming throughout.What broke
Both attempted matrix shapes were rejected:
d8d250cusedmatrix: { include: ${{ fromJSON(...) }} }.ed44dc4switched tomatrix: ${{ fromJSON(...) }}with the JSON wrapped as{"include": [...]}per the documented dynamic-matrix pattern.Both produced the same instant rejection.
Suspects to bisect
matrix:\n tuple: ${{ fromJSON(...) }}with downstream access viamatrix.tuple.os.fromJSON(...)[format('{0}-{1}', matrix.os, matrix.os_version)].osinpromote.pin.env— function-call inside the bracket indexer may not be supported.versions-aggregatedepending on a matrixversionsjob via plainneeds: versions— the aggregator is not itself a matrix; this combo could be the trigger.workflow_callinput rename — droppingos_versionwhile another workflow ref might still expect it.Suggested next attempt
Don't push to
mainagain until the root cause is found. Branch off main, apply changes in this order, push each, watch the workflow'snameingh run list— the moment it flips fromTest and Publishto the file path, the commit just pushed is the culprit:build-gha-tools).Failed runs (for evidence)
d8d250c)ed44dc4)