Skip to content

Conversation

@adobes1
Copy link
Contributor

@adobes1 adobes1 commented Oct 23, 2025

Currently get_latest_konflux_build() and get_latest_brew_build() behave differently when no build is found. Brew raises a clear IOError with default=-1, while Konflux returns None with default=None. This causes issues where code expects both to behave the same way.

This changes Konflux to match Brew's behavior: default to -1 and raise IOError when no build is found. Callers that explicitly want None returned (without raising IOError) now pass default=None. The PR also updates affected files to maintain existing functionality.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 23, 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 vfreex 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

@adobes1 adobes1 force-pushed the konflux-build-consistency branch from ab90428 to 8ce1614 Compare October 23, 2025 13:42
@adobes1 adobes1 force-pushed the konflux-build-consistency branch from 8ce1614 to 538325f Compare October 24, 2025 07:34
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 24, 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 538325f 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.

if default != -1:
self.logger.info(msg)
return default
raise IOError(msg)
Copy link
Contributor

Choose a reason for hiding this comment

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

I am a little concerned about changing this behavior, unless we're assessed that it is ok for a IOError to be raised in such cases. Another approach might be using a strict param as defined in https://github.com/openshift-eng/art-tools/blob/main/artcommon/artcommonlib/konflux/konflux_db.py#L282.

Last, I would like we make sure that there is no place where we do things like if build:, which would evaluate to False in case we return None, to True if we return -1.

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