Skip to content

Conversation

christoph-zededa
Copy link
Contributor

@christoph-zededa christoph-zededa commented Sep 11, 2025

Description

use automatic hashes provided by linuxkit to avoid having to bump manually like crazy

this is doing the same as #5190 but for other packages

PR dependencies

How to test and validate this PR

There are no specific steps to validate, common EVE Test Plan should cover the functionality.

Changelog notes

internal change

PR Backports

For all current LTS branches, please state explicitly if this PR should be
backported or not. This section is used by our scripts to track the backports,
so, please, do not omit it.

Here is the list of current LTS branches (it should be always up to date):

  • 14.5-stable: no
  • 13.4-stable: no

Checklist

  • I've provided a proper description
  • I've added the proper documentation
  • I've tested my PR on amd64 device
  • I've tested my PR on arm64 device
  • I've written the test verification instructions
  • I've set the proper labels to this PR

And the last but not least:

  • I've checked the boxes above, or I've provided a good reason why I didn't
    check them.

Please, check the boxes above after submitting the PR in interactive mode.

@christoph-zededa christoph-zededa changed the title Lkt automatic hashes more pkgs more pkgs: no more package bumping Sep 11, 2025
@christoph-zededa christoph-zededa force-pushed the lkt_automatic_hashes_more_pkgs branch from 691cf2a to 4612ff5 Compare September 11, 2025 18:14
@christoph-zededa christoph-zededa force-pushed the lkt_automatic_hashes_more_pkgs branch from 24d3514 to 9ec7b48 Compare September 11, 2025 18:23
@christoph-zededa
Copy link
Contributor Author

I will squash the commits before merge.

@christoph-zededa christoph-zededa force-pushed the lkt_automatic_hashes_more_pkgs branch from 1e8e66e to fc6556c Compare September 12, 2025 16:15
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modernizes package builds by using automatic hashes provided by LinuxKit to eliminate manual package bumping. It standardizes the approach across multiple EVE packages by introducing build arguments and parameterized base image references.

  • Adds REL_HASH_%=@lkt:pkgs:../* build arguments to package build configurations
  • Replaces hardcoded image references with parameterized ARG variables in Dockerfiles
  • Removes unnecessary hadolint ignores and updates hadolint configuration

Reviewed Changes

Copilot reviewed 101 out of 101 changed files in this pull request and generated 3 comments.

File Description
pkg/*/build.yml Add build arguments for automatic hash resolution
pkg/*/Dockerfile Replace hardcoded image references with ARG variables
.hadolint.yaml Add DL3006 to ignored hadolint rules

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

FROM ucode-build-${TARGETARCH} AS ucode-build

FROM lfedge/eve-alpine:745ae9066273c73b0fd879c4ba4ff626a8392d04 AS compactor-common
FROM ${REL_HASH_LFEDGE_EVE_ALPINE} AS compactor-common
Copy link
Preview

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

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

Line 142 correctly uses the parameterized ARG variable, but line 214 appears to be duplicating the same FROM statement with the same alias name 'compactor-common' changed to 'compactor-full'. This inconsistency should be reviewed to ensure the correct stage naming and purpose.

Copilot uses AI. Check for mistakes.



FROM lfedge/eve-alpine:745ae9066273c73b0fd879c4ba4ff626a8392d04 AS compactor-full
FROM ${REL_HASH_LFEDGE_EVE_ALPINE} AS compactor-full
Copy link
Preview

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

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

Line 142 correctly uses the parameterized ARG variable, but line 214 appears to be duplicating the same FROM statement with the same alias name 'compactor-common' changed to 'compactor-full'. This inconsistency should be reviewed to ensure the correct stage naming and purpose.

Suggested change
FROM ${REL_HASH_LFEDGE_EVE_ALPINE} AS compactor-full
FROM build AS compactor-full

Copilot uses AI. Check for mistakes.

@christoph-zededa christoph-zededa force-pushed the lkt_automatic_hashes_more_pkgs branch from aa1951a to 67a3867 Compare September 12, 2025 16:21
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 101 out of 101 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

image: eve-external-boot-image

buildArgs:
- REL_HASH_%=@lkt:pkgs:../*
Copy link
Contributor Author

Choose a reason for hiding this comment

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

so, actually this change is not needed, as obviously Dockerfile is not using any REL_HASH_*, but I would like to add it anyways for two reasons:

  • being consistent
  • if somebody adds REL_HASH_* to the Dockerfile then they might forget to add these lines to build.yml, so to keep the frustration low, let's add it already

furthermore I don't expect any disadvantages from this

@christoph-zededa christoph-zededa marked this pull request as ready for review September 16, 2025 09:25
@christoph-zededa christoph-zededa force-pushed the lkt_automatic_hashes_more_pkgs branch 5 times, most recently from 7977a69 to c29c97c Compare September 17, 2025 10:53
@christoph-zededa
Copy link
Contributor Author

Screenshot_20250917_134802

@christoph-zededa
Copy link
Contributor Author

arm64/nvidia: 2025-09-17T12:15:37.6729557Z Error: error building "lfedge/eve-vector:0238d6694e978cae3f7c3c8ce888d68aa363de7a": error building for arch arm64: failed to solve: ResourceExhausted: process "/bin/sh -c cargo build --release $VECTOR_FEATURES" did not complete successfully: cannot allocate memory

@christoph-zededa
Copy link
Contributor Author

/rerun red

1 similar comment
@OhmSpectator
Copy link
Member

/rerun red

@rene
Copy link
Contributor

rene commented Sep 18, 2025

Screenshot_20250917_134802

If a single PR changes too many files there will be an issue to generate/apply patch and Yetus will complain, we see this a lot for PRs updating vendor files, that's the case for this one as well:

2025-09-18T09:00:05.8643968Z HEAD is now at 6fbb49bdf Merge c29c97c5cdba9632a46ccb743533f8444ae1c3de into d3defeded2a3596fa016f92f036deb8fe27c5cfa
2025-09-18T09:00:06.0839227Z Previous HEAD position was 6fbb49bdf Merge c29c97c5cdba9632a46ccb743533f8444ae1c3de into d3defeded2a3596fa016f92f036deb8fe27c5cfa
2025-09-18T09:00:06.0849591Z Switched to a new branch 'master'
2025-09-18T09:00:06.0850246Z Branch 'master' set up to track remote branch 'master' from 'origin'.
2025-09-18T09:00:06.5896571Z Already up to date.
2025-09-18T09:00:06.6824146Z Already on 'master'
2025-09-18T09:00:06.6831991Z Your branch is up to date with 'origin/master'.
2025-09-18T09:00:07.3016668Z HEAD is now at fdc3a4eee Kernel update - [amd64-generic]
2025-09-18T09:00:07.4455121Z ERROR: GH:5219 does not apply to master.
2025-09-18T09:00:07.4478270Z ##[endgroup]
2025-09-18T09:00:07.4478632Z ##[group]Generating Reports . . .

@rucoder
Copy link
Contributor

rucoder commented Sep 19, 2025

@christoph-zededa I see you have some commits in the PR that were picked up from master, do you need to rebase the branch?

@christoph-zededa christoph-zededa force-pushed the lkt_automatic_hashes_more_pkgs branch from c29c97c to d93268f Compare September 19, 2025 10:16
@christoph-zededa
Copy link
Contributor Author

@christoph-zededa I see you have some commits in the PR that were picked up from master, do you need to rebase the branch?

done

Copy link
Contributor

@rene rene left a comment

Choose a reason for hiding this comment

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

LGTM, let's see how it goes builds and tests...

@rucoder
Copy link
Contributor

rucoder commented Sep 19, 2025

@christoph-zededa I guess #5228 can be closed then in favor of this one

@rene
Copy link
Contributor

rene commented Sep 19, 2025

@christoph-zededa I guess #5228 can be closed then in favor of this one

ok, feel free to close it then.

@christoph-zededa christoph-zededa force-pushed the lkt_automatic_hashes_more_pkgs branch from d93268f to 614650c Compare September 19, 2025 16:49
@github-actions github-actions bot requested a review from rene September 19, 2025 16:51
@christoph-zededa
Copy link
Contributor Author

@christoph-zededa I guess #5228 can be closed then in favor of this one

ok, feel free to close it then.

Actually I removed that commit right now because of #5228 (comment)

this change runs lkt only for the targets `build-docker` and
`build-docker-test`, it does not run anymore for all the other
targets as the global variable `DOCKER_LIKE_LKT` now holds the
command and not the output of the command

otherwise it leads to:
```
35 [build  7/14] RUN --mount=type=cache,target=/root/.cache/go-build echo "Running go vet" && make HV="$HV" vet &&     echo "Running go fmt" && ERR="$(find . -name \*.go | grep -v /vendor/ | xargs gofmt -d -e -l -s)" &&        if [ -n "$ERR" ] ; then printf 'go fmt Failed - ERR: %s' "$ERR" ; exit 1 ; fi &&        make ZARCH=amd64 HV="$HV" DEV="n" RSTATS=n RSTATS_ENDPOINT= RSTATS_TAG= DISTDIR=/final/opt/zededa/bin BUILD_VERSION=v0.0.0-20250911170914-280122ca6335 build
35 1.824 Running go vet
35 1.828 /bin/sh: ../../build-tools/bin/linuxkit: not found
35 1.830 go vet  ./...
```
as inside of the pillar docker image there is no linuxkit

Signed-off-by: Christoph Ostarek <[email protected]>
@christoph-zededa christoph-zededa force-pushed the lkt_automatic_hashes_more_pkgs branch from 614650c to c21410b Compare September 19, 2025 18:42
$(shell ...) is evaluated immediately and not on the line
it is executed on, therefore build-docker-test needs to be
split into three different targets

otherwise an error message like this shows up:
```
Dockerfile:19
--------------------
  17 |
  18 |     FROM ${REL_HASH_LFEDGE_EVE_UEFI} AS uefi-build
  19 | >>> FROM ${REL_HASH_LFEDGE_EVE_DOM0_ZTOOLS} AS zfs
  20 |     RUN mkdir /out
  21 |     # copy zfs-related files from dom0-ztools using prepared list of files
--------------------
ERROR: failed to build: failed to solve: lfedge/eve-dom0-ztools:000adaabe42b4f34dc196b722f143d3ae39f47fa-dirty-cb3d84e: failed to resolve source metadata for docker.io/lfedge/eve-dom0-ztools:000adaabe42b4f34dc196b722f143d3ae39f47fa-dirty-cb3d84e: docker.io/lfedge/eve-dom0-ztools:000adaabe42b4f34dc196b722f143d3ae39f47fa-dirty-cb3d84e: not found
```

Signed-off-by: Christoph Ostarek <[email protected]>
it is used to prevent using docker images without tag,
but for us linuxkit fills in the tag

Signed-off-by: Christoph Ostarek <[email protected]>
provided by linuxkit to avoid having to bump
manually like crazy

Signed-off-by: Christoph Ostarek <[email protected]>
@christoph-zededa christoph-zededa force-pushed the lkt_automatic_hashes_more_pkgs branch from c21410b to cb405b3 Compare September 19, 2025 18:48
similar to pillar the docker image with the test target
has to be built with docker directly and the build-args
have to be extracted from linuxkit

Signed-off-by: Christoph Ostarek <[email protected]>
@christoph-zededa
Copy link
Contributor Author

2025-09-20T02:37:11.5982545Z #9 8.105 ERROR: Failed to create usr/lib/llvm13/lib/libLLVMAArch64CodeGen.a: No space left on device

@christoph-zededa
Copy link
Contributor Author

/rerun red

@uncleDecart
Copy link
Member

2025-09-20T02:37:11.5982545Z #9 8.105 ERROR: Failed to create usr/lib/llvm13/lib/libLLVMAArch64CodeGen.a: No space left on device

Which runner?

@christoph-zededa
Copy link
Contributor Author

2025-09-20T02:37:11.5982545Z #9 8.105 ERROR: Failed to create usr/lib/llvm13/lib/libLLVMAArch64CodeGen.a: No space left on device

Which runner?

Unfortunately I cannot find it anymore - it was in 'Go Tests'. Let's see if it fails again ...

@christoph-zededa
Copy link
Contributor Author

2025-09-20T02:37:11.5982545Z #9 8.105 ERROR: Failed to create usr/lib/llvm13/lib/libLLVMAArch64CodeGen.a: No space left on device

Which runner?

Unfortunately I cannot find it anymore - it was in 'Go Tests'. Let's see if it fails again ...

it should be this one:
Screenshot_20250920_165049

Unfortunately when I click on it, I get to a pipeline running for about 30 minutes. For sure 2:43am GMT+2 is more than 30 minutes ago.

@uncleDecart
Copy link
Member

minutes ago.

We run go tests on free GitHub provided runners, they have limitation on disk size, if it becomes too much we can always switch to SH runners

@christoph-zededa
Copy link
Contributor Author

We run go tests on free GitHub provided runners, they have limitation on disk size, if it becomes too much we can always switch to SH runners

it happened again; seems like we should do that ...

@christoph-zededa christoph-zededa marked this pull request as draft September 24, 2025 16:21
@christoph-zededa
Copy link
Contributor Author

Moving this into draft as we should first solve linuxkit/linuxkit#4176

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.

5 participants