Skip to content

Conversation

@adobes1
Copy link
Contributor

@adobes1 adobes1 commented Oct 10, 2025

doozer --build-system=konflux images:print '{component}-{version}-{release}' does not currently look at Konflux builds when trying to get the version and release of latest image builds.

Use get_latest_build_sync() instead of get_latest_brew_build() to honor --build-system option passed to doozer

Required for openshift-eng/art-bot#224

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 10, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mbiarnes for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

"""
build = self.get_latest_brew_build(default=default, **kwargs)
build = self.get_latest_build_sync(default=default, **kwargs)
if default != -1 and build == default:
Copy link
Contributor

Choose a reason for hiding this comment

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

get_latest_konflux_build() will return None if no builds are found; we should probably make this consistent across build systems, otherwise this check is going to have different outcomes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching that, Daniele! I've raised #2137 to make get_latest_konflux_build() consistent with get_latest_brew_build() and how it handles its default parameter.
default is now -1 and it will raise an IOError if no build is found and default is left unspecified.
Changing how get_latest_brew_build() works seemed more error-prone

The other alternative would be to handle this directly here in get_latest_build_info()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@locriandev I've updated this PR with a temporary workaround to unblock art-bot since making get_latest_konflux_build() and get_latest_brew_build() consistent requires deeper analysis. I'll happily tackle this later.

Setting strict=True in get_latest_build_sync() when called on Konflux with default == -1 keeps the behavior consistent across build systems. When default == -1, it will raise IOError if no build is found. Otherwise, if the caller sets a different default, that value will be returned instead.

The only other caller of get_latest_build_sync() (aside from get_latest_build_info()) already passes default=None, so it should affect only get_latest_build_info()

wdyt?

@adobes1 adobes1 force-pushed the images-print-konflux branch from fa560d9 to 18bdf40 Compare October 30, 2025 08:20
@adobes1 adobes1 force-pushed the images-print-konflux branch from 18bdf40 to e1e99a2 Compare October 30, 2025 09:01
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 30, 2025

@adobes1: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/security e1e99a2 link false /test security

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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