Skip to content

fix(image): preserve active and infrastructure aliases - #2128

Open
stephenlclarke wants to merge 1 commit into
apple:mainfrom
stephenlclarke:fix/image-prune-active-aliases
Open

stephenlclarke wants to merge 1 commit into
apple:mainfrom
stephenlclarke:fix/image-prune-active-aliases

Conversation

@stephenlclarke

@stephenlclarke stephenlclarke commented Aug 15, 2026

Copy link
Copy Markdown

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

Closes #2030.

Use OCI digests as active-image identity, normalize configured infrastructure aliases, and persist the fetched builder reference. This prevents image prune --all from deleting a normalized image used by an active builder and avoids unnecessary builder recreation.

This supersedes the earlier closed #2031, rebased onto current main.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

Negative control with the former reference-only decisions: three alias cases and the digest identity regression failed.

  • Focused alias/prune regressions: 14 tests passed
  • Full non-integration suite: 758 tests passed
  • End-to-end builder-prune regression added for integration CI
  • make fmt, make check, and git diff --check: passed
  • Commit signature: verified

@stephenlclarke
stephenlclarke force-pushed the fix/image-prune-active-aliases branch from 7e72616 to d2753b6 Compare August 26, 2026 22:33
@stephenlclarke

stephenlclarke commented Aug 26, 2026

Copy link
Copy Markdown
Author

Refresh 2026-08-26: rebased the single signed fix onto current main (d96dfa3). New head: d2753b6. Focused UtilityTests and ImagePruneTests passed 14/14, and git diff --check passed.

@stephenlclarke
stephenlclarke force-pushed the fix/image-prune-active-aliases branch from d2753b6 to fcd00e8 Compare August 31, 2026 10:34
@stephenlclarke

Copy link
Copy Markdown
Author

Rebased cleanly onto current Apple main (d925dab865cf). The updated head is signed and remains one commit over the base: fcd00e85f43cedc7a248edf38958484e882f1135.

Exact-head focused verification: swift test --jobs 4 --filter 'ImagePruneTests|UtilityTests' — 14 focused tests passed; git diff --check passed and the worktree is clean. The broader test evidence already recorded in this PR remains unchanged; this update only incorporates the newer Apple base.

@codex review

Match active images by OCI digest and configured infrastructure images by normalized aliases. Store the fetched builder reference so equivalent aliases neither recreate the builder nor become prune candidates.

Fixes apple#2030
@stephenlclarke
stephenlclarke force-pushed the fix/image-prune-active-aliases branch from fcd00e8 to 7df71fc Compare September 5, 2026 19:06
@stephenlclarke

Copy link
Copy Markdown
Author

Refresh 2026-09-05: rebased the single signed fix onto current Apple main (eee7ad097079). The new head is 7df71fcb0e11a0bf9422e05cda35008438e5bf4b; swift test --jobs 4 --filter 'ImagePruneTests|UtilityTests' passed 14/14 and git diff --check passed. The PR is mergeable; fork-originated CI still requires Apple approval.

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.

[Bug]: image prune can remove active infrastructure image aliases

1 participant