Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
thegreyd committed Jun 21, 2022
1 parent b623795 commit 512b70f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion doozerlib/cli/inspect_stream.py
@@ -1,4 +1,5 @@
import click
from pprint import pprint

from doozerlib.rhcos import RHCOSBuildInspector, RHCOSBuildFinder
from doozerlib.cli import cli
Expand All @@ -25,8 +26,9 @@ def inspect_stream(runtime, code, strict):
if code == AssemblyIssueCode.INCONSISTENT_RHCOS_RPMS:
rhcos_builds, rhcos_inconsistencies = _check_inconsistent_rhcos_rpms(runtime, assembly_inspector)
if rhcos_inconsistencies:
msg = f'Found RHCOS inconsistencies in builds {rhcos_builds}: {rhcos_inconsistencies}'
msg = f'Found RHCOS inconsistencies in builds {rhcos_builds}'
print(msg)
pprint(rhcos_inconsistencies)
assembly_issue = AssemblyIssue(msg, component='rhcos', code=code)
if assembly_inspector.does_permit(assembly_issue):
print(f'Assembly permits code {code}.')
Expand Down
8 changes: 5 additions & 3 deletions doozerlib/cli/release_gen_payload.py
Expand Up @@ -875,11 +875,13 @@ def find_rhcos_build_rpm_inconsistencies(rhcos_builds: List[RHCOSBuildInspector]
for nvr in rhcos_build.get_rpm_nvrs():
rpm_name = parse_nvr(nvr)['name']
if rpm_name not in rpm_uses:
rpm_uses[rpm_name] = set()
rpm_uses[rpm_name].add(nvr)
rpm_uses[rpm_name] = dict()
if nvr not in rpm_uses[rpm_name]:
rpm_uses[rpm_name][nvr] = []
rpm_uses[rpm_name][nvr].append(rhcos_build.brew_arch)

# Report back rpm name keys which were associated with more than one NVR in the set of RHCOS builds.
return {rpm_name: nvr_list for rpm_name, nvr_list in rpm_uses.items() if len(nvr_list) > 1}
return {rpm_name: nvr_dict for rpm_name, nvr_dict in rpm_uses.items() if len(nvr_dict) > 1}

@staticmethod
def get_mirroring_destination(sha256: str, dest_repo: str) -> str:
Expand Down

0 comments on commit 512b70f

Please sign in to comment.