Closed petr-muller closed 4 months ago
@petr-muller: This pull request references Jira Issue OCPBUGS-33896, which is valid. The bug has been moved to the POST state.
Requesting review from QA contact: /cc @evakhoni
The bug has been updated to refer to the pull request using the external bug tracker.
@petr-muller: This pull request references Jira Issue OCPBUGS-33896, which is valid.
Requesting review from QA contact: /cc @evakhoni
/lgtm /hold just adding a hold in case you want to address any nits. Feel free to unhold any time.
/lgtm /unhold
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: jan--f, petr-muller, wking
The full list of commands accepted by this bot can be found here.
The pull request process is described here
@petr-muller: Jira Issue OCPBUGS-33896: Some pull requests linked via external trackers have merged:
The following pull requests linked via external trackers have not merged:
These pull request must merge or be unlinked from the Jira bug in order for it to move to the next state. Once unlinked, request a bug refresh with /jira refresh
.
Jira Issue OCPBUGS-33896 has not been moved to the MODIFIED state.
[ART PR BUILD NOTIFIER]
This PR has been included in build openshift-enterprise-cli-container-v4.17.0-202405300213.p0.gd5b5b3a.assembly.stream.el9 for distgit openshift-enterprise-cli. All builds following this will include this PR.
We have seen instances where Thanos responses contained html, apparently by because it is briefly down. We can be slightly more robust to that by detecting non-OK status code right away, instead of passing content body out:
Also improve debugging by allowing to emit http call details and response body on higher verbosity settings, consistent with
client-go
calls to apiserver.Additionally, improve the error handling by refactoring the
getWithBearer
method, Previously, it iterated over URIs from a route but instead of searching for success it actually searched until first failure, which is against the point of iterating over possible URIs in the first place. Refactor the method so that it does not immediately return on error, and return on success instead. Only return with an error if all URIs failed to yield a workable result. Slightly optimize the error for the common case where there is only a single URI to try, and shorten the string by using a namespace/name notation.