-
Notifications
You must be signed in to change notification settings - Fork 39
Make get_latest_build_info compatible with Konflux #2074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| """ | ||
| build = self.get_latest_brew_build(default=default, **kwargs) | ||
| build = self.get_latest_build_sync(default=default, **kwargs) | ||
| if default != -1 and build == default: |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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()
There was a problem hiding this comment.
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?
fa560d9 to
18bdf40
Compare
18bdf40 to
e1e99a2
Compare
|
@adobes1: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
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 ofget_latest_brew_build()to honor--build-systemoption passed to doozerRequired for openshift-eng/art-bot#224