Skip to content

fix: stop fetching APKINDEX files for locked image builds - #418

Open
trevorc wants to merge 1 commit into
chainguard-dev:mainfrom
trevorc:offline-without-indexes
Open

trevorc wants to merge 1 commit into
chainguard-dev:mainfrom
trevorc:offline-without-indexes

Conversation

@trevorc

@trevorc trevorc commented Nov 5, 2026

Copy link
Copy Markdown

Fixes #417.

The generated contents target depended on an index label per lockfile repository, so every apko_image fetched each live, unpinned APKINDEX.tar.gz. In the builds listed under Validation, locked image builds produce the same images without those indexes.

This change:

  • apko/translate_lock.bzl: stop listen labels in the generated contents target.
  • apko/private/apk.bzl: removes the private apk_filegroup rule's indexes attribute and output group.
  • apko/private/apko_image.bzl: no longer stages indexes into the apko cache. This is the same change as Do not stage APKINDEX files into the apko_image cache #412.
  • Smoke fixtures: the e2e/smoke lockfiles' index URLs point at the reserved .invalid domain, so an index fetch fails the smoke tests.

The module extension and the generated repositories.bzl still declare the apk_repository repositories; nothing in rules_apko references them now. I can remove those declarations too if you prefer (or feel free to edit the PR directly).

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.

Locked image builds fetch APKINDEX files that are unused during the build

1 participant