Skip to content
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

Bug 1872557: handle 201 response from upload #168

Merged
merged 1 commit into from
Aug 26, 2020

Conversation

jhjaggars
Copy link
Contributor

The ingress service for cloud.redhat.com started returning 201 status codes when posting archives. This change handles that response code as a valid OK response.

@openshift-ci-robot
Copy link
Contributor

Hi @jhjaggars. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 24, 2020
@jhjaggars jhjaggars force-pushed the master branch 2 times, most recently from a4b3540 to 4c3dddd Compare August 25, 2020 00:15
counterRequestSend.WithLabelValues(c.metricsName, strconv.Itoa(resp.StatusCode)).Inc()
}

if resp.StatusCode >= 400 || resp.StatusCode < 200 {
Copy link
Member

Choose a reason for hiding this comment

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

We might want to check and see if we want to call out 3xx, because Go doesn't auto-POST after following redirects, if I recall correctly.

Copy link
Contributor

Choose a reason for hiding this comment

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

@jhjaggars Would it be ever neccessary to presume re-POST after 3xx, or can we rely that server will be processing eventual redirections as 2xx ?
From what I read about this it is preferred option.

Copy link
Contributor

Choose a reason for hiding this comment

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

What about response.StatusCode / 100 != 2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

re: 3XX, the operator didn't handle those to begin with so I'd prefer to handle that in another change set.

Copy link
Member

Choose a reason for hiding this comment

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

So this line should be >= 300 || < 200, right? Because we want to consider 3xx errors too, for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, that's right.

@martinkunc
Copy link
Contributor

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 25, 2020
@iNecas
Copy link
Contributor

iNecas commented Aug 25, 2020

@jhjaggars thanks for dealing with this issue on openshift side RedHatInsights/insights-ingress-go#133

@iNecas
Copy link
Contributor

iNecas commented Aug 25, 2020

Can we also extend the user-agent to include the cluster version in the user-agent header: we might need to make some condition on ingress to keep older clusters to work

@martinkunc
Copy link
Contributor

/retest

1 similar comment
@petr-muller
Copy link
Member

/retest

@wking
Copy link
Member

wking commented Aug 25, 2020

Can we also extend the user-agent to include the cluster version...

If that happens, here or in another PR, can it be fed from RELEASE_VERSION?

@jhjaggars
Copy link
Contributor Author

jhjaggars commented Aug 25, 2020

Can we also extend the user-agent to include the cluster version in the user-agent header: we might need to make some condition on ingress to keep older clusters to work

Currently we put the hash of the commit in the user-agent, could we replace that with RELEASE_VERSION? We could amend the user-agent with more key/value fields, but that'll require changes to ingress ahead of time.

Signed-off-by: Jesse Jaggars <[email protected]>
@martinkunc
Copy link
Contributor

/retest

@martinkunc
Copy link
Contributor

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 26, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhjaggars, martinkunc

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:

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 26, 2020
@martinkunc
Copy link
Contributor

/retitle Bug 1872557: handle 201 response from upload

@openshift-ci-robot openshift-ci-robot changed the title handle 201 response from upload Bug 1872557: handle 201 response from upload Aug 26, 2020
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Aug 26, 2020
@openshift-ci-robot
Copy link
Contributor

@jhjaggars: This pull request references Bugzilla bug 1872557, which is invalid:

  • expected the bug to target the "4.6.0" release, but it targets "4.7.0" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1872557: handle 201 response from upload

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/test-infra repository.

@martinkunc
Copy link
Contributor

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Aug 26, 2020
@openshift-ci-robot
Copy link
Contributor

@martinkunc: This pull request references Bugzilla bug 1872557, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

/bugzilla refresh

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/test-infra repository.

@openshift-merge-robot openshift-merge-robot merged commit ab35de3 into openshift:master Aug 26, 2020
@openshift-ci-robot
Copy link
Contributor

@jhjaggars: All pull requests linked via external trackers have merged:

Bugzilla bug 1872557 has been moved to the MODIFIED state.

In response to this:

Bug 1872557: handle 201 response from upload

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/test-infra repository.

@martinkunc
Copy link
Contributor

I created separate case, CCXDEV-2918 For adding Release version to User Agent.

@martinkunc
Copy link
Contributor

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@martinkunc: Bugzilla bug 1872557 is in an unrecognized state (ON_QA) and will not be moved to the MODIFIED state.

In response to this:

/bugzilla refresh

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/test-infra repository.

@iNecas
Copy link
Contributor

iNecas commented Aug 26, 2020

@jhjaggars the RELEASE_VER seems more useful to me than the commit sha: if that doesn't have any use, switching to version itself would make more sense to me, and adding the commit info as addition, if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants