Skip to content

[release-4.10] OCPBUGS-4160: OpenStack: Force JSON content-type in Swift#6628

Merged
openshift-merge-robot merged 1 commit intoopenshift:release-4.10from
openshift-cherrypick-robot:cherry-pick-6625-to-release-4.10
Nov 29, 2022
Merged

[release-4.10] OCPBUGS-4160: OpenStack: Force JSON content-type in Swift#6628
openshift-merge-robot merged 1 commit intoopenshift:release-4.10from
openshift-cherrypick-robot:cherry-pick-6625-to-release-4.10

Conversation

@openshift-cherrypick-robot
Copy link
Copy Markdown

This is an automated cherry-pick of #6625

/assign pierreprinetti

Some OpenStack object storages respond with `204 No Content` to list
requests when there are no containers or objects to list. In these
cases, when responding to requests with an `Accept: text/plain` or no
`Accept` header, some object storages omit the `content-type` header in
their status-204 responses.

Now, Gophercloud throws an error when the response does not contain a
`content-type` header.

With this change, we work around the issue by forcing Gophercloud to
request a JSON response from the object storage when listing containers.
When passed an `Accept: application/json` header, the server responds
with `220 Ok` and a `content-type` header in our tests.

This solution gives us a fix that is easily backportable because it
doesn't require any dependency bump.

Note that in my local tests, I didn't find the 'full' listing to take
more time than the short, name-only response we were requesting Swift
prior to this change.
@pierreprinetti
Copy link
Copy Markdown
Contributor

/approve
/lgtm

@openshift-ci openshift-ci Bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 27, 2022
@itzikb-redhat
Copy link
Copy Markdown

/label cherry-pick-approved

@openshift-ci openshift-ci Bot added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Nov 27, 2022
@pierreprinetti
Copy link
Copy Markdown
Contributor

/retest

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Nov 28, 2022

@openshift-cherrypick-robot: The following tests 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/okd-e2e-vsphere 17a698b link false /test okd-e2e-vsphere
ci/prow/e2e-azurestack 17a698b link false /test e2e-azurestack
ci/prow/e2e-azurestack-upi 17a698b link false /test e2e-azurestack-upi
ci/prow/e2e-alibaba 17a698b link false /test e2e-alibaba
ci/prow/e2e-openstack 17a698b link false /test e2e-openstack
ci/prow/okd-e2e-gcp-upgrade 17a698b link false /test okd-e2e-gcp-upgrade

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/test-infra repository. I understand the commands that are listed here.

Copy link
Copy Markdown
Member

@mandre mandre left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve
/label backport-risk-assessed

@openshift-ci openshift-ci Bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Nov 28, 2022
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Nov 28, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mandre, pierreprinetti

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

The pull request process is described 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

@pierreprinetti
Copy link
Copy Markdown
Contributor

/retitle [release-4.10] OCPBUGS-4160: OpenStack: Force JSON content-type in Swift

@openshift-ci openshift-ci Bot changed the title [release-4.10] OCPBUGS-4081: OpenStack: Force JSON content-type in Swift [release-4.10] OCPBUGS-4160: OpenStack: Force JSON content-type in Swift Nov 28, 2022
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Nov 28, 2022

@openshift-cherrypick-robot: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

Details

In response to this:

[release-4.10] OCPBUGS-4160: OpenStack: Force JSON content-type in Swift

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.

@pierreprinetti
Copy link
Copy Markdown
Contributor

/jira refresh

@pierreprinetti
Copy link
Copy Markdown
Contributor

OCPBUGS-4160

@pierreprinetti
Copy link
Copy Markdown
Contributor

/retitle [release-4.10] OCPBUGS-4160: OpenStack: Force JSON content-type in Swift

@openshift-ci openshift-ci Bot changed the title [release-4.10] OCPBUGS-4160: OpenStack: Force JSON content-type in Swift [release-4.10] OCPBUGS-4160: OpenStack: Force JSON content-type in Swift Nov 28, 2022
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Nov 28, 2022

@openshift-cherrypick-robot: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

Details

In response to this:

[release-4.10] OCPBUGS-4160: OpenStack: Force JSON content-type in Swift

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.

@pierreprinetti
Copy link
Copy Markdown
Contributor

/retitle [release-4.10] OCPBUGS-4160: OpenStack: Force JSON content-type in Swift
/jira refresh

@openshift-ci openshift-ci Bot changed the title [release-4.10] OCPBUGS-4160: OpenStack: Force JSON content-type in Swift [release-4.10] OCPBUGS-4160: OpenStack: Force JSON content-type in Swift Nov 28, 2022
@openshift-ci-robot openshift-ci-robot added the jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. label Nov 28, 2022
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Nov 28, 2022

@openshift-cherrypick-robot: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

Details

In response to this:

[release-4.10] OCPBUGS-4160: OpenStack: Force JSON content-type in Swift

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 jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Nov 28, 2022
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@pierreprinetti: This pull request references Jira Issue OCPBUGS-4160, which is invalid:

  • expected dependent Jira Issue OCPBUGS-4081 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), but it is POST instead

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

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

/retitle [release-4.10] OCPBUGS-4160: OpenStack: Force JSON content-type in Swift
/jira 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.

@pierreprinetti
Copy link
Copy Markdown
Contributor

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Nov 29, 2022
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@pierreprinetti: This pull request references Jira Issue OCPBUGS-4160, which is valid. The bug has been moved to the POST state.

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.10.z) matches configured target version for branch (4.10.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • dependent bug Jira Issue OCPBUGS-4081 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE))
  • dependent Jira Issue OCPBUGS-4081 targets the "4.11.z" version, which is one of the valid target versions: 4.11.0, 4.11.z
  • bug has dependents

Requesting review from QA contact:
/cc @eurijon

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

/jira 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-ci openshift-ci Bot requested a review from eurijon November 29, 2022 08:33
@openshift-merge-robot openshift-merge-robot merged commit 4f9fb72 into openshift:release-4.10 Nov 29, 2022
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-4160 has been moved to the MODIFIED state.

Details

In response to this:

This is an automated cherry-pick of #6625

/assign pierreprinetti

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.

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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants