Skip to content

Add build-tools to SHA digest pinning infrastructure #5985

Description

@lpcox

Problem

The build-tools image (used as the sysroot-stage init container for ARC/DinD deployments) is not included in the SHA digest pinning infrastructure. When gh-aw compiles a workflow lock file, it cannot supply a digest for build-tools because this repo's image-tag parser rejects the key.

Reported upstream: github/gh-aw#44040

Root Cause

Two gaps in src/image-tag.ts and src/services/sysroot-service.ts:

  1. IMAGE_DIGEST_KEYS doesn't include 'build-tools' (src/image-tag.ts:3) — the parser treats build-tools=sha256:... as an invalid key and throws an error.

  2. sysroot-service.ts bypasses the pinning helpers — it constructs the image reference directly as `${registry}/build-tools:${tag}` instead of using buildRuntimeImageRef() or assignImageSource(), so even if a digest were available it would never be appended.

Fix

  1. Add 'build-tools' to the IMAGE_DIGEST_KEYS array in src/image-tag.ts.
  2. Refactor buildSysrootStageService() in src/services/sysroot-service.ts to accept a ParsedImageTag and use buildRuntimeImageRef() (or assignImageSource()) so the @sha256:... suffix is appended when a digest is present.
  3. Update tests in src/image-tag.test.ts and src/services/sysroot-service.test.ts to cover the new key.

Notes

A corresponding change is needed in github/gh-aw to actually resolve and supply the build-tools digest during lock file generation — see github/gh-aw#44040.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions