Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Add support for apk.InstallPackages that assumes pre-resolved data. #172

Merged
merged 3 commits into from
Dec 12, 2023

Conversation

sfc-gh-ptabor
Copy link
Contributor

Thanks to this interface we can install packages based on pre-computed lock file. This guarantees fully hermetic and repeatable builds entirelly independent from APKINDEX payload.

This is alternative (and IMHO the best solution) to chainguard-dev/rules_apko#13

@sfc-gh-ptabor
Copy link
Contributor Author

@imjasonh - could you please take a look at this proposal ? Thank you.

@sfc-gh-ptabor sfc-gh-ptabor force-pushed the 20231208-split-executor branch 3 times, most recently from 16d90fa to a116d78 Compare December 8, 2023 16:06
@jonjohnsonjr
Copy link
Contributor

Ah I wish I had seen this before writing up this comment: chainguard-dev/apko#979 (comment)

Copy link
Contributor

@jonjohnsonjr jonjohnsonjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple small things but this looks good and very similar to a change I was planning to make myself.

pkg/apk/implementation.go Outdated Show resolved Hide resolved
pkg/apk/implementation.go Show resolved Hide resolved
@jonjohnsonjr
Copy link
Contributor

I don't understand what's going on with golangci-lint, those failures seem incorrect.

Thanks to this interface we can install packages based on pre-computed lock file.
This guarantees fully hermetic and repeatable builds entirelly independent from APKINDEX payload.

Signed-off-by: Piotr Tabor <piotr.tabor@snowflake.com>
@sfc-gh-ptabor
Copy link
Contributor Author

sfc-gh-ptabor commented Dec 12, 2023

I don't understand what's going on with golangci-lint, those failures seem incorrect.

Rebased on top of your PR.

My local runs of clint are clean:

ptabor@redacted go-apk % docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.55.2 golangci-lint run --out-format=github-actions
ptabor@redacted go-apk %

@imjasonh imjasonh enabled auto-merge (squash) December 12, 2023 14:23
@imjasonh imjasonh merged commit 85b9cc9 into chainguard-dev:main Dec 12, 2023
2 checks passed
imjasonh pushed a commit to chainguard-dev/rules_apko that referenced this pull request Dec 31, 2023
… (re)builds. (#41)

Integrate with apko-0.12+ . Pass `--lockfile` to apko to get hermetic
(re)builds.

This is `rules_apko` part of:
#13
that integrates: 
 - go-apk change: chainguard-dev/go-apk#172
 - apko change: chainguard-dev/apko#979

---------

Signed-off-by: Piotr Tabor <piotr.tabor@snowflake.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants