Skip to content

CWFHEALTH-5089: Fix IndexError in _get_impacted_bundles when bundle has no brew image - #307

Merged
lslebodn merged 1 commit into
redhat-exd-rebuilds:mainfrom
lslebodn:bundle_search
Aug 14, 2026
Merged

CWFHEALTH-5089: Fix IndexError in _get_impacted_bundles when bundle has no brew image#307
lslebodn merged 1 commit into
redhat-exd-rebuilds:mainfrom
lslebodn:bundle_search

Conversation

@lslebodn

@lslebodn lslebodn commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

get_images_by_digest can return an empty list when a bundle path
digest has no brew-built data in pyxis (e.g. Konflux-built bundles).

We need to skip these instead of crashing with an IndexError on bundle_images[0].
We cannot rebuilt operator bundles which were not built in brew.

    Traceback:
      File "freshmaker/handlers/botas/botas_shipped_advisory.py", line 372,
        in _get_impacted_bundles
        bundle_nvr = bundle_images[0]["brew"]["build"]
    IndexError: list index out of range

Assisted-by: Claude Opus 4.6 noreply@anthropic.com

@lslebodn
lslebodn requested a review from FernandesMF as a code owner June 29, 2026 12:21
@lslebodn

Copy link
Copy Markdown
Contributor Author

Related to CWFHEALTH-5008

@lslebodn

Copy link
Copy Markdown
Contributor Author

FernandesMF
FernandesMF previously approved these changes Jul 23, 2026

@FernandesMF FernandesMF left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense and looks good to me!

@lslebodn
lslebodn marked this pull request as draft July 24, 2026 11:05
get_images_by_digest can return an empty list when a bundle path
digest has no brew-built data in pyxis (e.g. Konflux-built bundles).

We need to skip these instead of crashing with an IndexError on bundle_images[0].
We cannot rebuilt operator bundles which were not built in brew.

Traceback:
  File "freshmaker/handlers/botas/botas_shipped_advisory.py", line 372,
    in _get_impacted_bundles
    bundle_nvr = bundle_images[0]["brew"]["build"]
IndexError: list index out of range

Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>
@lslebodn lslebodn changed the title pyxis: Search just images from brew Fix IndexError in _get_impacted_bundles when bundle has no brew image Aug 12, 2026
@lslebodn
lslebodn marked this pull request as ready for review August 12, 2026 12:12
@lslebodn
lslebodn requested a review from FernandesMF August 12, 2026 12:12
@lslebodn

Copy link
Copy Markdown
Contributor Author

Rebased && modified

@FernandesMF @ElenaKarolinaSemanova PTAL

@lslebodn lslebodn changed the title Fix IndexError in _get_impacted_bundles when bundle has no brew image CWFHEALTH-5089: Fix IndexError in _get_impacted_bundles when bundle has no brew image Aug 12, 2026
@lslebodn
lslebodn merged commit 257c30e into redhat-exd-rebuilds:main Aug 14, 2026
2 checks passed
@lslebodn
lslebodn deleted the bundle_search branch August 14, 2026 11:06
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.

2 participants