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

Fix wrapping of k8s api messages #348

Merged
merged 1 commit into from
Oct 11, 2019

Conversation

sleshchenko
Copy link
Contributor

What does this PR do?

Fix wrapping of k8s API messages.
The example response:

{
  "response": {
    "statusCode": 422,
    "body": {
      "kind": "Status",
      "apiVersion": "v1",
      "metadata": {},
      "status": "Failure",
      "message": "customresourcedefinitions.apiextensions.k8s.io 'checlusters.org.eclipse.che' is invalid: metadata.resourceVersion: Invalid value: 0x0: must be specified for an update",
      "reason": "Invalid",
      "details": {
        "name": "checlusters.org.eclipse.che",
        "group": "apiextensions.k8s.io",
        "kind": "customresourcedefinitions",
        "causes": [
          {
            "reason": "FieldValueInvalid",
            "message": "Invalid value: 0x0: must be specified for an update",
            "field": "metadata.resourceVersion"
          }
        ]
      },
      "code": 422
    },
    "headers": {
      "cache-control": "no-store",
      "content-type": "application/json",
      "date": "Thu, 10 Oct 2019 14:53:54 GMT",
      "content-length": "536",
      "connection": "close"
    },
    "request": {
      "uri": {
        "protocol": "https:",
        "slashes": true,
        "auth": null,
        "host": "192.168.99.104:8443",
        "port": "8443",
        "hostname": "192.168.99.104",
        "hash": null,
        "search": null,
        "query": null,
        "pathname": "/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/checlusters.org.eclipse.che",
        "path": "/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/checlusters.org.eclipse.che",
        "href": "https://192.168.99.104:8443/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/checlusters.org.eclipse.che"
      },
      "method": "PUT",
      "headers": {
        "authorization": "",
        "Authorization": "Bearer er6HSqM1Y1BlJOMSrCBfppDVZKk_EYLf38AcXpsgnU4",
        "accept": "application/json",
        "content-type": "application/json",
        "content-length": 334
      }
    }
  },
  "body": {
    "apiVersion": "v1",
    "kind": "Status",
    "metadata": {},
    "status": {}
  }
}

What issues does this PR fix or reference?

It's related but not sure that fixes fully eclipse-che/che#14665

Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
@sleshchenko sleshchenko merged commit 85d7805 into che-incubator:master Oct 11, 2019
@sleshchenko sleshchenko deleted the rightK8sErrorMessage branch October 11, 2019 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants