che icon indicating copy to clipboard operation
che copied to clipboard

Cannot create a workspace using devfile and swagger api

Open ssh24 opened this issue 6 years ago • 3 comments

Describe the bug

Che version

  • [x] latest
  • [x] nightly
  • [x] other: 7.3.1

Steps to reproduce

  1. Install che
  2. Create an workspace using the swagger api

Example curl call:

curl -s <link_to_devfile> | curl -s --header Content-Type: text/yaml --header 'Authorization: Bearer <my_secret>' --request POST --data-binary @- -D- -o/dev/null <che-ip>/api/workspace/devfile?start-after-create=true

Expected behavior

The swagger api should return 201 code and workspace should come up.

Runtime

  • [ ] kubernetes (include output of kubectl version)
  • [x] Openshift (include output of oc version)
  • [ ] minikube (include output of minikube version and kubectl version)
  • [ ] minishift (include output of minishift version and oc version)
  • [ ] docker-desktop + K8S (include output of docker version and kubectl version)
  • [ ] other: (please specify)
oc version
Client Version: version.Info{Major:"4", Minor:"1+", GitVersion:"v4.1.0+b4261e0", GitCommit:"b4261e07ed", GitTreeState:"clean", BuildDate:"2019-07-06T03:16:01Z", GoVersion:"go1.12.6", Compiler:"gc"
, Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.0+d4cacc0", GitCommit:"d4cacc0", GitTreeState:"clean", BuildDate:"2019-07-22T15:47:46Z", GoVersion:"go1.10.8", Compiler:"gc",
 Platform:"linux/amd64"}

Logs

This error is thrown:

HTTP/1.1 100 

HTTP/1.1 415 
JAXRS-Body-Provided: Error-Message
Content-Type: text/plain
Transfer-Encoding: chunked
Vary: Accept-Encoding
Date: Tue, 10 Dec 2019 16:28:28 GMT
Set-Cookie: 0f443a2a27de429b7964dbc8f3c18ef4=debdc4f50bbd60123330a2b7168efc0c; path=/; HttpOnly
X-RBT-SCAR: 9.108.104.10:819189990:1000

Media type null is not supported. There is no corresponded entity reader for type interface org.eclipse.che.api.workspace.shared.dto.devfile.DevfileDto

Installation method

  • [x] chectl
  • [ ] che-operator
  • [ ] minishift-addon
  • [ ] I don't know

Environment

  • [x] my computer
    • [ ] Windows
    • [ ] Linux
    • [x] macOS
  • [ ] Cloud
    • [ ] Amazon
    • [ ] Azure
    • [ ] GCE
    • [ ] other (please specify)
  • [ ] other: please specify

Additional context

ssh24 avatar Dec 10 '19 16:12 ssh24

@ssh24 wondering if it's not just that you have forgotten the quotation mark for the header --header 'Content-Type: text/yaml'

l0rd avatar Dec 10 '19 22:12 l0rd

@l0rd nope, the quotes on the curl command is right. nothing changed as it was done as part of automation and suddenly stopped working.

ssh24 avatar Dec 11 '19 13:12 ssh24

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

che-bot avatar Jun 11 '20 14:06 che-bot