Cannot create a workspace using devfile and swagger api
Describe the bug
Che version
- [x] latest
- [x] nightly
- [x] other: 7.3.1
Steps to reproduce
- Install che
- 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 versionandkubectl version) - [ ] minishift (include output of
minishift versionandoc version) - [ ] docker-desktop + K8S (include output of
docker versionandkubectl 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 wondering if it's not just that you have forgotten the quotation mark for the header --header 'Content-Type: text/yaml'
@l0rd nope, the quotes on the curl command is right. nothing changed as it was done as part of automation and suddenly stopped working.
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.