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

Unable to create workspace if URL reference is used for component #13861

Closed
3 of 23 tasks
sleshchenko opened this issue Jul 16, 2019 · 5 comments
Closed
3 of 23 tasks

Unable to create workspace if URL reference is used for component #13861

sleshchenko opened this issue Jul 16, 2019 · 5 comments
Assignees
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. status/info-needed More information is needed before the issue can move into the “analyzing” state for engineering.

Comments

@sleshchenko
Copy link
Member

sleshchenko commented Jul 16, 2019

Describe the bug

Unable to create workspace if URL reference is used for component.

Che version

  • latest
  • nightly
  • other: please specify

Steps to reproduce

Two alternative ways:

  1. Try to create a workspace with swagger with the following Devfile
https://raw.githubusercontent.com/eclipse/che/master/e2e/files/happy-path/containers-happy-path.yaml
---
apiVersion: 1.0.0
metadata:
  name: petclinic-dev-environment
projects:
  - name: petclinic
    source:
      type: git
      location: 'https://github.com/spring-projects/spring-petclinic.git'
components:
  - type: kubernetes
    alias: petclinic-web
    reference: https://raw.githubusercontent.com/eclipse/che/master/e2e/files/happy-path/containers-happy-path.yaml
    selector:
      app.kubernetes.io/component: webapp
    entrypoints:
      - containerName: spring-boot
        command: ["tail"]
        args: ["-f", "/dev/null"]
  - type: kubernetes
    alias: petclinic-db
    reference: https://raw.githubusercontent.com/eclipse/che/master/e2e/files/happy-path/containers-happy-path.yaml
    selector:
      app.kubernetes.io/component: database
  - type: dockerimage
    alias: maven-container
    image: bujhtr5555/maven-with-artifacts:latest
    command: ['sleep']
    args: ['infinity']
    env:
      - name: MAVEN_CONFIG
        value: /home/user/.m2
    memoryLimit: 4Gi
    mountSources: true
  - type: chePlugin
    id: redhat/java/latest
  - type: chePlugin
    id: redhat/vscode-yaml/latest
commands:
  - name: build
    actions:
      - type: exec
        component: maven-container
        command: mvn clean package >> build.txt
        workdir: /projects/petclinic
  - name: build-file-output
    actions:
      - type: exec
        component: maven-container
        command: 'mkdir -p /projects/petclinic/?/.m2 && cp -r /.m2/* /projects/petclinic/?/.m2 && cd /projects/petclinic && mvn package >> build-output.txt'
        workdir: /projects/petclinic
  - name: run
    actions:
      - type: exec
        component: maven-container
        command: java -jar spring-petclinic-2.1.0.BUILD-SNAPSHOT.jar --spring.profiles.active=mysql
        workdir: /projects/petclinic/target
  - name: run-with-changes
    actions:
      - type: exec
        component: maven-container
        command: java -jar spring-petclinic-2.1.0.BUILD-SNAPSHOT.jar --spring.profiles.active=mysql
        workdir: /projects/petclinic/target
  - name: run-debug
    actions:
      - type: exec
        component: maven-container
        command: java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044 spring-petclinic-2.1.0.BUILD-SNAPSHOT.jar --spring.profiles.active=mysql
        workdir: /projects/petclinic/target
**Expected**: workspace is created and appears on dashboard. **Actual**: Response contains the following error message
{
  "message": "Failed to validate content reference of component 'petclinic-web' of type 'kubernetes': 
Failed to fetch a file https://raw.githubusercontent.com/eclipse/che/master/e2e/files/happy-path/containers-happy-path.yaml specified in devfile null from URL https://raw.githubusercontent.com/eclipse/che/master/e2e/files/happy-path/containers-happy-path.yaml. 
Make sure the URL of the devfile points to the raw content of it (e.g. not to the webpage showing it but really just its contents). 
Additionally, if you're using  relative form, make sure the referenced files are actually stored relative to the devfile on the same host, or try to specify URL in absolute form. 
The current attempt to download the file failed with the following error message: raw.githubusercontent.com"
}
  1. Try to create a workspace with a factory from a devfile where URL reference is used for component. To do it open ${CHE_HOST}/f?url=https://raw.githubusercontent.com/eclipse/che/master/e2e/files/happy-path/happy-path-workspace.yaml
    Expected: workspace is created and appears on dashboard.
    Actual:
    Screenshot_20190716_153324
    Screenshot_20190716_153339

Runtime

  • kubernetes (include output of kubectl version)
  • 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)

Screenshots

Installation method

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

Environment

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

Additional context

@sleshchenko sleshchenko added the kind/bug Outline of a bug - must adhere to the bug report template. label Jul 16, 2019
@sleshchenko
Copy link
Member Author

Probably, it's my Che installation issue because it's not reproducible on Radim and Mykhailo installations.
I restart my minishift without any Che installation modifications and now I'm able to create a workspace with swagger but with factory I got another error message
Screenshot_20190716_163205

Something strange happened. Will try update minishift

@sleshchenko
Copy link
Member Author

Both cases are reproducible for me on OCP 3.9

@skabashnyuk skabashnyuk added severity/P1 Has a major impact to usage or development of the system. team/platform labels Jul 16, 2019
@l0rd l0rd added the status/info-needed More information is needed before the issue can move into the “analyzing” state for engineering. label Jul 16, 2019
@l0rd
Copy link
Contributor

l0rd commented Jul 16, 2019

@sleshchenko @skabashnyuk that looks like a blocker more than a P1 if it has an impact on the happy path test right?

And it's not clear if it works if, instead of using an URL reference for the component definition, we use a file reference or a file content.

Flagging it as status/info-needed for now but if that's confirmed (it impacts the happy path scenario and if happens on any devfile using a component URL reference) we should add that to the 7.0.0 milestone.

@mshaposhnik
Copy link
Contributor

Cannot reproduce yet. WS are created OK both via factory or swagger. AM i missing something ?

@sleshchenko
Copy link
Member Author

The issue was an issue with DNS on my laptop. After tunning local DNS settings, this issue can not be reproduced anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. status/info-needed More information is needed before the issue can move into the “analyzing” state for engineering.
Projects
None yet
Development

No branches or pull requests

4 participants