Skip to content

test: fix build info cache path creation to use correct runner_distro#2495

Open
achilleas-k wants to merge 2 commits into
osbuild:mainfrom
achilleas-k:fix-again/runner-distro-cache-check
Open

test: fix build info cache path creation to use correct runner_distro#2495
achilleas-k wants to merge 2 commits into
osbuild:mainfrom
achilleas-k:fix-again/runner-distro-cache-check

Conversation

@achilleas-k

Copy link
Copy Markdown
Member

In commit e24d799 I attempted to fix the problem of having the build config generator run on a different distro than the build itself. The problem was that by using the host distro to determine the runner path component in the cache meant that building on one distribution (CentOS Stream 9 for RHEL 7 images) and generating the configs on a different distribution (Fedora 44 for all) would always miss and cause rebuilds. The attempted fix sets the runner distro to the appropriate one when filtering manifests for the rebuild. However, this fix neglected an important step: The cache download that precedes the filtering was still using the host distro path component. So when generating build configs for RHEL 7, the following occurred:

  • Download build info from cache with runner distro Fedora 44 (the host distro).
  • Check for build info using the with a runner distro CentOS 9 (the runner for the build for RHEL 7).
  • Miss every check.

This commit fixes the gen_build_info_dir_path_prefix() function to always consult the Schutzfile for the runner distro path component, essentially moving the previous fix into the function that's always used to construct cache paths, so all cache-related functionality uses the correct paths.

@achilleas-k achilleas-k requested a review from supakeen July 8, 2026 11:50
@achilleas-k achilleas-k requested review from a team and thozza as code owners July 8, 2026 11:50
@achilleas-k achilleas-k requested a review from croissanne July 8, 2026 11:50
In commit e24d799 I attempted to fix
the problem of having the build config generator run on a different
distro than the build itself.  The problem was that by using the host
distro to determine the runner path component in the cache meant that
building on one distribution (CentOS Stream 9 for RHEL 7 images) and
generating the configs on a different distribution (Fedora 44 for all)
would always miss and cause rebuilds.  The attempted fix sets the runner
distro to the appropriate one when filtering manifests for the rebuild.
However, this fix neglected an important step: The cache download that
precedes the filtering was still using the host distro path component.
So when generating build configs for RHEL 7, the following occurred:
- Download build info from cache with runner distro Fedora 44 (the host
  distro).
- Check for build info using the with a runner distro CentOS 9 (the
  runner for the build for RHEL 7).
- Miss every check.

This commit fixes the gen_build_info_dir_path_prefix() function to
always consult the Schutzfile for the runner distro path component,
essentially moving the previous fix into the function that's always used
to construct cache paths, so all cache-related functionality uses the
correct paths.
- Remove unused import.
- Remove extra empty line between functions.
@achilleas-k achilleas-k force-pushed the fix-again/runner-distro-cache-check branch from 19a6ca1 to 6c29947 Compare July 8, 2026 11:55
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