Skip to content

Git change detect spdx example - #1

Draft
christoph-zededa wants to merge 5 commits into
git_change_detectfrom
git_change_detect-spdx_example
Draft

Git change detect spdx example#1
christoph-zededa wants to merge 5 commits into
git_change_detectfrom
git_change_detect-spdx_example

Conversation

@christoph-zededa

Copy link
Copy Markdown
Owner

No description provided.

This is needed for git-change-exec.

Signed-off-by: Christoph Ostarek <christoph@zededa.com>
Sometimes hard tabs come from a copy-paste example and
the example should not be modified.

Also tabs are better than spaces ;-)

Signed-off-by: Christoph Ostarek <christoph@zededa.com>
This new tool detects if in your git tree changed files
(compared to master branch and local-only changed files)
and uses this information to run only the specified actions.

Here it is used to run pillar's go-tests only if something
changed there, same for this tool itself and the get-deps tool.

Signed-off-by: Christoph Ostarek <christoph@zededa.com>
Signed-off-by: Christoph Ostarek <christoph@zededa.com>
@christoph-zededa
christoph-zededa force-pushed the git_change_detect branch 8 times, most recently from 90d00f8 to 3e7e1d2 Compare September 9, 2024 16:54
@christoph-zededa
christoph-zededa force-pushed the git_change_detect branch 2 times, most recently from 132f566 to ffe1b50 Compare September 20, 2024 13:46
@christoph-zededa
christoph-zededa force-pushed the git_change_detect branch 3 times, most recently from b5ac4b0 to 01d4402 Compare October 5, 2025 10:48
christoph-zededa pushed a commit that referenced this pull request Mar 10, 2026
The eve job was rebuilding arm64 packages from scratch instead of
using the ones already built by the packages job. Investigating
the root cause revealed several interrelated issues.

1. Redundant 'pkgs' target in the eve build command

   The eve job ran 'make pkgs eve', but the packages job already
   builds and caches all packages. Since the eve job restores the
   cache first, the 'pkgs' target should be a no-op. Removed it.

2. arm64 packages were never restored from cache

   The cache restore logic had a conditional: if the runner arch
   matched the matrix arch, it skipped both clearing the linuxkit
   cache and restoring the target arch cache. The assumption was
   that the first cache restore (for tool images) already had the
   right packages. But that first restore always fetched the amd64
   generic cache — even on arm64 runners. So arm64 jobs were left
   with amd64 packages in the cache, and 'make pkgs' (issue #1)
   was silently rebuilding everything for arm64.

3. Tool images were hardcoded to amd64

   The cache key for loading tool images (mkconf, mkimage-raw-efi,
   mkrootfs-squash, etc.) into docker was hardcoded to amd64. On
   arm64 runners this is wrong — they need arm64 tool images. Since
   for native builds the target cache already contains these tools,
   we now load them directly from the target cache. The two-cache
   dance (load tools from one arch, then restore packages from
   another) is only needed for riscv64 cross-builds on amd64.

4. The 'rt' platform maps to generic packages

   No build-rt.yml files exist anywhere in pkg/, so PLATFORM=rt
   produces identical packages to PLATFORM=generic. Rather than
   adding a redundant amd64/rt entry to the packages matrix, we
   map 'rt' to 'generic' in the cache key.

The fix simplifies the eve job's cache handling:
- Native builds (amd64, arm64): restore target cache, load tools, build
- Cross-builds (riscv64): restore amd64 cache, load tools, clear,
  restore riscv64 cache, build

The "Arch Runner is Matrix" step is removed as it is no longer used.

Signed-off-by: Paul Gaiduk <paulg@zededa.com>
(cherry picked from commit e1cc105)
christoph-zededa pushed a commit that referenced this pull request Mar 10, 2026
The eve job was rebuilding arm64 packages from scratch instead of
using the ones already built by the packages job. Investigating
the root cause revealed several interrelated issues.

1. Redundant 'pkgs' target in the eve build command

   The eve job ran 'make pkgs eve', but the packages job already
   builds and caches all packages. Since the eve job restores the
   cache first, the 'pkgs' target should be a no-op. Removed it.

2. arm64 packages were never restored from cache

   The cache restore logic had a conditional: if the runner arch
   matched the matrix arch, it skipped both clearing the linuxkit
   cache and restoring the target arch cache. The assumption was
   that the first cache restore (for tool images) already had the
   right packages. But that first restore always fetched the amd64
   generic cache — even on arm64 runners. So arm64 jobs were left
   with amd64 packages in the cache, and 'make pkgs' (issue #1)
   was silently rebuilding everything for arm64.

3. Tool images were hardcoded to amd64

   The cache key for loading tool images (mkconf, mkimage-raw-efi,
   mkrootfs-squash, etc.) into docker was hardcoded to amd64. On
   arm64 runners this is wrong — they need arm64 tool images. Since
   for native builds the target cache already contains these tools,
   we now load them directly from the target cache. The two-cache
   dance (load tools from one arch, then restore packages from
   another) is only needed for riscv64 cross-builds on amd64.

4. The 'rt' platform maps to generic packages

   No build-rt.yml files exist anywhere in pkg/, so PLATFORM=rt
   produces identical packages to PLATFORM=generic. Rather than
   adding a redundant amd64/rt entry to the packages matrix, we
   map 'rt' to 'generic' in the cache key.

The fix simplifies the eve job's cache handling:
- Native builds (amd64, arm64): restore target cache, load tools, build
- Cross-builds (riscv64): restore amd64 cache, load tools, clear,
  restore riscv64 cache, build

The "Arch Runner is Matrix" step is removed as it is no longer used.

Signed-off-by: Paul Gaiduk <paulg@zededa.com>
(cherry picked from commit e1cc105)
christoph-zededa pushed a commit that referenced this pull request Mar 10, 2026
The eve job was rebuilding arm64 packages from scratch instead of
using the ones already built by the packages job. Investigating
the root cause revealed several interrelated issues.

1. Redundant 'pkgs' target in the eve build command

   The eve job ran 'make pkgs eve', but the packages job already
   builds and caches all packages. Since the eve job restores the
   cache first, the 'pkgs' target should be a no-op. Removed it.

2. arm64 packages were never restored from cache

   The cache restore logic had a conditional: if the runner arch
   matched the matrix arch, it skipped both clearing the linuxkit
   cache and restoring the target arch cache. The assumption was
   that the first cache restore (for tool images) already had the
   right packages. But that first restore always fetched the amd64
   generic cache — even on arm64 runners. So arm64 jobs were left
   with amd64 packages in the cache, and 'make pkgs' (issue #1)
   was silently rebuilding everything for arm64.

3. Tool images were hardcoded to amd64

   The cache key for loading tool images (mkconf, mkimage-raw-efi,
   mkrootfs-squash, etc.) into docker was hardcoded to amd64. On
   arm64 runners this is wrong — they need arm64 tool images. Since
   for native builds the target cache already contains these tools,
   we now load them directly from the target cache. The two-cache
   dance (load tools from one arch, then restore packages from
   another) is only needed for riscv64 cross-builds on amd64.

4. The 'rt' platform maps to generic packages

   No build-rt.yml files exist anywhere in pkg/, so PLATFORM=rt
   produces identical packages to PLATFORM=generic. Rather than
   adding a redundant amd64/rt entry to the packages matrix, we
   map 'rt' to 'generic' in the cache key.

The fix simplifies the eve job's cache handling:
- Native builds (amd64, arm64): restore target cache, load tools, build
- Cross-builds (riscv64): restore amd64 cache, load tools, clear,
  restore riscv64 cache, build

The "Arch Runner is Matrix" step is removed as it is no longer used.

Signed-off-by: Paul Gaiduk <paulg@zededa.com>
(cherry picked from commit e1cc105)
christoph-zededa pushed a commit that referenced this pull request Mar 11, 2026
The eve job was rebuilding arm64 packages from scratch instead of
using the ones already built by the packages job. Investigating
the root cause revealed several interrelated issues.

1. Redundant 'pkgs' target in the eve build command

   The eve job ran 'make pkgs eve', but the packages job already
   builds and caches all packages. Since the eve job restores the
   cache first, the 'pkgs' target should be a no-op. Removed it.

2. arm64 packages were never restored from cache

   The cache restore logic had a conditional: if the runner arch
   matched the matrix arch, it skipped both clearing the linuxkit
   cache and restoring the target arch cache. The assumption was
   that the first cache restore (for tool images) already had the
   right packages. But that first restore always fetched the amd64
   generic cache — even on arm64 runners. So arm64 jobs were left
   with amd64 packages in the cache, and 'make pkgs' (issue #1)
   was silently rebuilding everything for arm64.

3. Tool images were hardcoded to amd64

   The cache key for loading tool images (mkconf, mkimage-raw-efi,
   mkrootfs-squash, etc.) into docker was hardcoded to amd64. On
   arm64 runners this is wrong — they need arm64 tool images. Since
   for native builds the target cache already contains these tools,
   we now load them directly from the target cache. The two-cache
   dance (load tools from one arch, then restore packages from
   another) is only needed for riscv64 cross-builds on amd64.

4. The 'rt' platform maps to generic packages

   No build-rt.yml files exist anywhere in pkg/, so PLATFORM=rt
   produces identical packages to PLATFORM=generic. Rather than
   adding a redundant amd64/rt entry to the packages matrix, we
   map 'rt' to 'generic' in the cache key.

The fix simplifies the eve job's cache handling:
- Native builds (amd64, arm64): restore target cache, load tools, build
- Cross-builds (riscv64): restore amd64 cache, load tools, clear,
  restore riscv64 cache, build

The "Arch Runner is Matrix" step is removed as it is no longer used.

Signed-off-by: Paul Gaiduk <paulg@zededa.com>
(cherry picked from commit e1cc105)
christoph-zededa pushed a commit that referenced this pull request Mar 11, 2026
The eve job was rebuilding arm64 packages from scratch instead of
using the ones already built by the packages job. Investigating
the root cause revealed several interrelated issues.

1. Redundant 'pkgs' target in the eve build command

   The eve job ran 'make pkgs eve', but the packages job already
   builds and caches all packages. Since the eve job restores the
   cache first, the 'pkgs' target should be a no-op. Removed it.

2. arm64 packages were never restored from cache

   The cache restore logic had a conditional: if the runner arch
   matched the matrix arch, it skipped both clearing the linuxkit
   cache and restoring the target arch cache. The assumption was
   that the first cache restore (for tool images) already had the
   right packages. But that first restore always fetched the amd64
   generic cache — even on arm64 runners. So arm64 jobs were left
   with amd64 packages in the cache, and 'make pkgs' (issue #1)
   was silently rebuilding everything for arm64.

3. Tool images were hardcoded to amd64

   The cache key for loading tool images (mkconf, mkimage-raw-efi,
   mkrootfs-squash, etc.) into docker was hardcoded to amd64. On
   arm64 runners this is wrong — they need arm64 tool images. Since
   for native builds the target cache already contains these tools,
   we now load them directly from the target cache. The two-cache
   dance (load tools from one arch, then restore packages from
   another) is only needed for riscv64 cross-builds on amd64.

4. The 'rt' platform maps to generic packages

   No build-rt.yml files exist anywhere in pkg/, so PLATFORM=rt
   produces identical packages to PLATFORM=generic. Rather than
   adding a redundant amd64/rt entry to the packages matrix, we
   map 'rt' to 'generic' in the cache key.

The fix simplifies the eve job's cache handling:
- Native builds (amd64, arm64): restore target cache, load tools, build
- Cross-builds (riscv64): restore amd64 cache, load tools, clear,
  restore riscv64 cache, build

The "Arch Runner is Matrix" step is removed as it is no longer used.

Signed-off-by: Paul Gaiduk <paulg@zededa.com>
(cherry picked from commit e1cc105)
christoph-zededa pushed a commit that referenced this pull request Apr 1, 2026
The eve job was rebuilding arm64 packages from scratch instead of
using the ones already built by the packages job. Investigating
the root cause revealed several interrelated issues.

1. Redundant 'pkgs' target in the eve build command

   The eve job ran 'make pkgs eve', but the packages job already
   builds and caches all packages. Since the eve job restores the
   cache first, the 'pkgs' target should be a no-op. Removed it.

2. arm64 packages were never restored from cache

   The cache restore logic had a conditional: if the runner arch
   matched the matrix arch, it skipped both clearing the linuxkit
   cache and restoring the target arch cache. The assumption was
   that the first cache restore (for tool images) already had the
   right packages. But that first restore always fetched the amd64
   generic cache — even on arm64 runners. So arm64 jobs were left
   with amd64 packages in the cache, and 'make pkgs' (issue #1)
   was silently rebuilding everything for arm64.

3. Tool images were hardcoded to amd64

   The cache key for loading tool images (mkconf, mkimage-raw-efi,
   mkrootfs-squash, etc.) into docker was hardcoded to amd64. On
   arm64 runners this is wrong — they need arm64 tool images. Since
   for native builds the target cache already contains these tools,
   we now load them directly from the target cache. The two-cache
   dance (load tools from one arch, then restore packages from
   another) is only needed for riscv64 cross-builds on amd64.

4. The 'rt' platform maps to generic packages

   No build-rt.yml files exist anywhere in pkg/, so PLATFORM=rt
   produces identical packages to PLATFORM=generic. Rather than
   adding a redundant amd64/rt entry to the packages matrix, we
   map 'rt' to 'generic' in the cache key.

The fix simplifies the eve job's cache handling:
- Native builds (amd64, arm64): restore target cache, load tools, build
- Cross-builds (riscv64): restore amd64 cache, load tools, clear,
  restore riscv64 cache, build

The "Arch Runner is Matrix" step is removed as it is no longer used.

Signed-off-by: Paul Gaiduk <paulg@zededa.com>
christoph-zededa pushed a commit that referenced this pull request Apr 7, 2026
The eve job was rebuilding arm64 packages from scratch instead of
using the ones already built by the packages job. Investigating
the root cause revealed several interrelated issues.

1. Redundant 'pkgs' target in the eve build command

   The eve job ran 'make pkgs eve', but the packages job already
   builds and caches all packages. Since the eve job restores the
   cache first, the 'pkgs' target should be a no-op. Removed it.

2. arm64 packages were never restored from cache

   The cache restore logic had a conditional: if the runner arch
   matched the matrix arch, it skipped both clearing the linuxkit
   cache and restoring the target arch cache. The assumption was
   that the first cache restore (for tool images) already had the
   right packages. But that first restore always fetched the amd64
   generic cache — even on arm64 runners. So arm64 jobs were left
   with amd64 packages in the cache, and 'make pkgs' (issue #1)
   was silently rebuilding everything for arm64.

3. Tool images were hardcoded to amd64

   The cache key for loading tool images (mkconf, mkimage-raw-efi,
   mkrootfs-squash, etc.) into docker was hardcoded to amd64. On
   arm64 runners this is wrong — they need arm64 tool images. Since
   for native builds the target cache already contains these tools,
   we now load them directly from the target cache. The two-cache
   dance (load tools from one arch, then restore packages from
   another) is only needed for riscv64 cross-builds on amd64.

4. The 'rt' platform maps to generic packages

   No build-rt.yml files exist anywhere in pkg/, so PLATFORM=rt
   produces identical packages to PLATFORM=generic. Rather than
   adding a redundant amd64/rt entry to the packages matrix, we
   map 'rt' to 'generic' in the cache key.

The fix simplifies the eve job's cache handling:
- Native builds (amd64, arm64): restore target cache, load tools, build
- Cross-builds (riscv64): restore amd64 cache, load tools, clear,
  restore riscv64 cache, build

The "Arch Runner is Matrix" step is removed as it is no longer used.

Signed-off-by: Paul Gaiduk <paulg@zededa.com>
(cherry picked from commit e1cc105)
@christoph-zededa
christoph-zededa force-pushed the git_change_detect branch 3 times, most recently from d391765 to 637449a Compare June 18, 2026 16:38
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.

1 participant