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

quarkus devfile v1 -> v2 convertion failure - 2 errors occurred: * devfile contains multiple endpoint entries with same name: hello-greeting-endpoint * devfile contains multiple containers with same TargetPort: 8080 #21198

Closed
Tracked by #21103
ibuziuk opened this issue Feb 21, 2022 · 1 comment
Labels
area/devfile-converter library used to convert v1 to v2 or v2 to v1 devfiles 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.

Comments

@ibuziuk
Copy link
Member

ibuziuk commented Feb 21, 2022

Describe the bug

Original devfile

apiVersion: 1.0.0
metadata:
  name: quarkus-unsn
projects:
  - name: quarkus-quickstarts
    source:
      location: 'https://github.com/che-samples/quarkus-quickstarts'
      type: git
      sparseCheckoutDir: getting-started
      branch: main
components:
  - id: redhat/quarkus-java11/latest
    type: chePlugin
  - mountSources: true
    endpoints:
      - attributes:
          path: /hello/greeting/che-user
        name: hello-greeting-endpoint
        port: 8080
      - attributes:
          public: 'false'
        name: debug
        port: 5005
    memoryLimit: 4G
    type: dockerimage
    volumes:
      - name: m2
        containerPath: /home/user/.m2
    alias: centos-quarkus-maven
    image: 'quay.io/eclipse/che-quarkus@sha256:5a08ef7ecd394c78b1002be3ece6afb1fd084f28b0d48319443e01e805057928'
    env:
      - value: '-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom -Duser.home=/home/user'
        name: JAVA_OPTS
      - value: $(JAVA_OPTS)
        name: MAVEN_OPTS
      - value: 0.0.0.0
        name: QUARKUS_HTTP_HOST
  - mountSources: true
    endpoints:
      - attributes:
          path: /hello/greeting/che-user
        name: hello-greeting-endpoint
        port: 8080
    command:
      - tail
    args:
      - '-f'
      - /dev/null
    memoryLimit: 32M
    type: dockerimage
    alias: ubi-minimal
    image: 'registry.access.redhat.com/ubi8/ubi-minimal@sha256:cf1c63e3247e4074ee3549a064b8798a1a2513ad57dd79c9edb979836355b469'
  - id: redhat/vscode-didact/latest
    preferences:
      didact.defaultUrl: 'https://che-dogfooding.apps.che-dev.x6e0.p1.openshiftapps.com/devfile-registry/devfiles/quarkus/didact.md'
      che.welcome.enable: false
      didact.openDefaultTutorialAtStartup: true
    type: chePlugin
    alias: didact-plugin
commands:
  - name: Package
    actions:
      - workdir: '${CHE_PROJECTS_ROOT}/quarkus-quickstarts/getting-started'
        type: exec
        command: ./mvnw package
        component: centos-quarkus-maven
  - name: Start Development mode (Hot reload + debug)
    actions:
      - workdir: '${CHE_PROJECTS_ROOT}/quarkus-quickstarts/getting-started'
        type: exec
        command: './mvnw compile quarkus:dev'
        component: centos-quarkus-maven
  - name: Package Native
    actions:
      - workdir: '${CHE_PROJECTS_ROOT}/quarkus-quickstarts/getting-started'
        type: exec
        command: ./mvnw package -Dnative -Dmaven.test.skip -Dquarkus.native.native-image-xmx=2G
        component: centos-quarkus-maven
  - name: Start Native
    actions:
      - workdir: '${CHE_PROJECTS_ROOT}/quarkus-quickstarts/getting-started/target'
        type: exec
        command: ./getting-started-1.0.0-SNAPSHOT-runner
        component: ubi-minimal
  - name: Attach remote debugger
    actions:
      - referenceContent: |
          {
            "version": "0.2.0",
            "configurations": [
              {
                "type": "java",
                "request": "attach",
                "name": "Attach to Remote Quarkus App",
                "hostName": "localhost",
                "port": 5005
              }
            ]
          }
        type: vscode-launch

Che version

7.42@latest

Steps to reproduce

try to convert the quarkus devfile v1 to devfile v2
ERROR: 2 errors occurred: * devfile contains multiple endpoint entries with same name: hello-greeting-endpoint * devfile contains multiple containers with same TargetPort: 8080

Expected behavior

the conversion works without issues

Runtime

OpenShift

Screenshots

image

Installation method

OperatorHub

Environment

Linux

Eclipse Che Logs

No response

Additional context

No response

@ibuziuk ibuziuk added the kind/bug Outline of a bug - must adhere to the bug report template. label Feb 21, 2022
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Feb 21, 2022
@ibuziuk ibuziuk added area/devfile-converter library used to convert v1 to v2 or v2 to v1 devfiles severity/P1 Has a major impact to usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Feb 21, 2022
@benoitf
Copy link
Contributor

benoitf commented Feb 21, 2022

it's a dup of #21167 and #21121
it's fixed by eclipse-che/che-dashboard#465 / che 7.44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-converter library used to convert v1 to v2 or v2 to v1 devfiles 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.
Projects
None yet
Development

No branches or pull requests

3 participants