Skip to content

Commit

Permalink
Request ODCS pulp composes with use_only_compatible_arch flag
Browse files Browse the repository at this point in the history
With the `use_only_compatible_arch` flag, the ODCS produced repofile
will use a $basearch variable in the repourl, then build task for an
arch won't have irrelevant arch repos enabled. This can help especially
for base image builds, when irrelevant arch repos are enabled, it can
cause the build task to be slower and occupy more memory, and can cause
unexpected issues like RHELBLD-14336 where base images can not be built
due to x86_64 appstream repo is enabled for non-x86_64 build tasks.

JIRA: CWFHEALTH-2746
  • Loading branch information
qixiang committed Jan 16, 2024
1 parent 79c04a8 commit 0a95329
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions freshmaker/odcsclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,13 @@ def prepare_pulp_repo(self, build, content_sets):

odcs = create_odcs_client()
if not self.handler.dry_run:
new_compose = odcs.new_compose(" ".join(content_sets), "pulp")
new_compose = odcs.new_compose(
" ".join(content_sets), "pulp", flags=["use_only_compatible_arch"]
)
else:
new_compose = self._fake_odcs_new_compose(content_sets, "pulp")
new_compose = self._fake_odcs_new_compose(
content_sets, "pulp", flags=["use_only_compatible_arch"]
)

return new_compose

Expand Down

0 comments on commit 0a95329

Please sign in to comment.