test: fix build info cache path creation to use correct runner_distro#2495
Open
achilleas-k wants to merge 2 commits into
Open
test: fix build info cache path creation to use correct runner_distro#2495achilleas-k wants to merge 2 commits into
achilleas-k wants to merge 2 commits into
Conversation
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.
19a6ca1 to
6c29947
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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.