quay / quay-bridge-operator

Utilization of Red Hat Quay as the default image registry for an OpenShift Container Platform environment
Apache License 2.0
20 stars 23 forks source link

fix: nil check http response when err is not nil (PROJQUAY-6620) #111

Closed arborite-rh closed 3 months ago

arborite-rh commented 4 months ago

Topic: projquay-6620

The operator was panicking due to the httpResponse being nil and attempting to return the httpResponse.StatusCode in the response; the response was most likely nil due to a prior error when attempting to marshal json and build the http request itself. This now allows the error to be propagated out to the logs instead of causing the operator to panic

fix: addtl nil checking http responses

chore: lint_controllers

chore: lint quay client Signed-off-by: Ross Bryan robryan@redhat.com

arborite-rh commented 4 months ago

Reviews in this chain: └https://github.com/quay/quay-bridge-operator/pull/111 fix: nil check http response when err is not nil (PROJQUAY-6620)  └https://github.com/quay/quay-bridge-operator/pull/112 chore: remove reflection zero type when zero value is known   └https://github.com/quay/quay-bridge-operator/pull/113 chore: upgrade go.mod to 1.20 (matches Dockerfile builder) + ioutil deprecation    └https://github.com/quay/quay-bridge-operator/pull/114 fix: lint and clean up quay types     └https://github.com/quay/quay-bridge-operator/pull/115 test: unit test/mock quay client

arborite-rh commented 4 months ago
# head base diff date summary
0 d0f1208d 2f224adc diff Feb 27 20:29 PM 4 files changed, 50 insertions(+), 96 deletions(-)
1 c39e6d24 2f224adc diff Feb 27 20:45 PM 0 files changed
arborite-rh commented 4 months ago

/lgtm

openshift-ci[bot] commented 4 months ago

@arborite-rh: you cannot LGTM your own PR.

In response to [this](https://github.com/quay/quay-bridge-operator/pull/111#issuecomment-1976745489): >/lgtm Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
openshift-ci[bot] commented 4 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: arborite-rh, dmage

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

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/quay/quay-bridge-operator/blob/master/OWNERS)~~ [dmage] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
arborite-rh commented 4 months ago

@dmage mind /lgtm this for me 😄 ?

arborite-rh commented 3 months ago

/cherrypick redhat-3.12

openshift-cherrypick-robot commented 3 months ago

@arborite-rh: new pull request could not be created: failed to create pull request against quay/quay-bridge-operator#redhat-3.12 from head openshift-cherrypick-robot:cherry-pick-111-to-redhat-3.12: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"No commits between quay:redhat-3.12 and openshift-cherrypick-robot:cherry-pick-111-to-redhat-3.12"}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request"}

In response to [this](https://github.com/quay/quay-bridge-operator/pull/111#issuecomment-1981514596): >/cherrypick redhat-3.12 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
arborite-rh commented 3 months ago

/cherrypick redhat-3.11

openshift-cherrypick-robot commented 3 months ago

@arborite-rh: new pull request created: #116

In response to [this](https://github.com/quay/quay-bridge-operator/pull/111#issuecomment-1981528880): >/cherrypick redhat-3.11 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.