Skip to content

Publish gf180mcu-precheck.pdk_version image label; fail build on unresolvable labels - #45

Open
mithro wants to merge 4 commits into
mainfrom
fix/publish-pdk-version-label
Open

Publish gf180mcu-precheck.pdk_version image label; fail build on unresolvable labels#45
mithro wants to merge 4 commits into
mainfrom
fix/publish-pdk-version-label

Conversation

@mithro

@mithro mithro commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Why

platform.wafer.space's revision-metadata fetch has been failing for every image built since 2026-06-03, when adfc552 ("feat: use open_pdks") replaced PDK_TAG ?= 1.6.6 with PDK_COMMIT ?= <open_pdks sha1> in the Makefile. The platform requires a PDK version from either the gf180mcu-precheck.pdk_version image label (never published) or the Makefile's PDK_TAG (removed), finds neither, raises ValueError, and discards all fetched metadata — so its check-status pages show raw sha256:... digests instead of version numbers, and it re-fetches every 5 minutes forever.

What

  1. scripts/resolve_pdk_version.py — resolves the pinned PDK_COMMIT to open_pdks' VERSION file content at that commit (currently d658698b1.0.604). Any failure (missing PDK_COMMIT, unfetchable commit, non-version content) exits non-zero.
  2. scripts/check_image_labels.py — validates the final label set from docker/metadata-action before the build: all required labels (gf180mcu-precheck.pdk_version, gf180mcu-precheck.pdk_commit, OCI created/revision/version) must be non-empty. Catches Actions expressions silently expanding to "" (typo'd step id, renamed output).
  3. docker-publish.yml — runs the resolver, feeds both new labels through metadata-action, and gates the build on the completeness check. Unresolvable label values now fail the build instead of silently publishing an unlabeled image.

Verification

  • Resolver run against this repo's Makefile: pdk_commit=d658698bd8bcf4e05fc7b5991a701247ba0d744c, pdk_version=1.0.604 (matches open_pdks' "chore: bump version" commit for 1.0.604).
  • 7 failure-path tests (missing PDK_COMMIT, unfetchable commit, missing Makefile, empty label, unset/invalid METADATA_JSON) all exit non-zero with clear errors.
  • Workflow YAML validated: step order is resolve → metadata → verify-labels → build.

Both scripts are stdlib-only Python (no uv/pip setup needed in the workflow).

Note: label values are: gf180mcu-precheck.pdk_version=1.0.604 (open_pdks version scheme — differs from the old wafer-space/gf180mcu 1.6.x tags, as the PDK source itself changed) plus gf180mcu-precheck.pdk_commit for exact traceability.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KMV2xQm2RP5JiTzU22U1sJ

mithro and others added 3 commits July 9, 2026 09:23
The Makefile pins the PDK as an open_pdks commit hash (ciel enable), but
downstream consumers like platform.wafer.space need a human-meaningful
PDK version. Resolve the pinned commit to open_pdks' VERSION file
content at that commit (e.g. d658698b -> 1.0.604).

Unresolvable values are fatal (non-zero exit) so callers cannot
silently publish images with missing version metadata.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMV2xQm2RP5JiTzU22U1sJ
Reads docker/metadata-action JSON output and fails if any label the
build promises to publish is missing or empty. Guards against GitHub
Actions expressions silently expanding to empty strings.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMV2xQm2RP5JiTzU22U1sJ
Resolve the pinned PDK_COMMIT to a version number at build time and
publish it as image labels; verify all required labels resolved to
non-empty values before building. Both steps are fatal on failure.

platform.wafer.space's revision-metadata fetch has been failing for
every image built since the June 2026 PDK_TAG->PDK_COMMIT Makefile
change: it required a PDK version from the (preferred) image label or
the (removed) Makefile PDK_TAG, found neither, and discarded all
metadata - leaving check status pages showing raw sha256 digests
instead of version numbers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMV2xQm2RP5JiTzU22U1sJ
resolve_pdk_version.py fetched the VERSION file from efabless/open_pdks, which
has been archived since 2022 and does not carry the pinned commit on any of its
own branches (it only resolved via GitHub's shared fork-network storage, which
is fragile). Point at the actively-maintained fossi-foundation/open_pdks fork,
where PDK_COMMIT (d658698, VERSION 1.0.604) is a real ref.

Verified: resolver still returns pdk_version=1.0.604 for the pinned commit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LtHCsJ77CY3f6N8FcTELW9
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.

1 participant