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

Devfile v2 issue: Should not give error if other than exec command types present in devfile #3429

Closed
cdrage opened this issue Jun 25, 2020 · 4 comments
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/bug Categorizes issue or PR as related to a bug. triage/duplicate Indicates an issue or PR that is a duplicate of other open issue or PR. v2 Issue or PR that applies to the v2 of odo

Comments

@cdrage
Copy link
Member

cdrage commented Jun 25, 2020

/kind bug

What versions of software are you using?

Operating System:

Output of odo version:

How did you run odo exactly?

~/openshift/f                                                                                                                                                                                                                                                                                                                                                               
▶ odo create foo --devfile https://raw.githubusercontent.com/devfile/kubernetes-api/master/devfile-support/samples/simple-devfile.yaml
Experimental mode is enabled, use at your own risk

Validation
 ✓  Creating a devfile component from devfile path: https://raw.githubusercontent.com/devfile/kubernetes-api/master/devfile-support/samples/simple-devfile.yaml [29040ns]
 ✓  Validating devfile component [66356ns]                                                                                                                                                                                                                                                                                                                                  
 
Please use `odo push` command to create the component with source deployed

~/openshift/f                                                                                                                                                                                                                                                                                                                                                               
▶ odo push

Validation
 ✗  Validating the devfile [86168ns]
 ✗  Failed to start component with name foo. Error: Failed to create the component: failed to validate devfile build and run commands: command must be of type "exec"%!!(MISSING)(EXTRA string=
)command must be of type "exec"%!!(MISSING)(EXTRA string=
)

See below YAML:

  - exec:
      id: helloWorld
      env:
        - name: "USER"
          value: "John Doe"
      commandLine: 'echo "Hello ${USER}"'

I have a feeling it's from using quotes within the command. Or this here:

  - composite:
      id: buildSchemaAndOpenDevfile
      label: Build schema and open devfile
      commands:
        - buildSchema
        - openDevfile
      parallel: false

Actual behavior

Failure when deploying

Expected behavior

Being able to crrectly deploy with exec command

Any logs, error output, etc?

@cdrage cdrage added the area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. label Jun 25, 2020
@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 25, 2020
@mik-dass
Copy link
Contributor

mik-dass commented Jun 26, 2020

  • composite:
    id: buildSchemaAndOpenDevfile
    label: Build schema and open devfile
    commands:
    - buildSchema
    - openDevfile
    parallel: false

We don't support composite type of commands. There is a issue regarding support of composite commands #3338

@adisky
Copy link
Contributor

adisky commented Jun 26, 2020

@cdrage yes we do not support composite commands, but it is a valid bug, IMO we should not error out if other types of command is present. This needs to be updated here
https://github.com/openshift/odo/blob/edc7c336973c3978d3e8cadfee99e1c3dff2b91c/pkg/devfile/adapters/common/command.go#L94

@adisky adisky changed the title Devfile v2 issue: Issue with exec command when it already has quotes in it. Devfile v2 issue:Should not give error if other than exec command types present in devfile Jun 26, 2020
@cdrage cdrage changed the title Devfile v2 issue:Should not give error if other than exec command types present in devfile Devfile v2 issue: Should not give error if other than exec command types present in devfile Jun 26, 2020
@kadel
Copy link
Member

kadel commented Jul 8, 2020

/close
/triage duplicate

Composite commands will be implemented in #3338

@openshift-ci-robot openshift-ci-robot added the triage/duplicate Indicates an issue or PR that is a duplicate of other open issue or PR. label Jul 8, 2020
@openshift-ci-robot
Copy link
Collaborator

@kadel: Closing this issue.

In response to this:

/close
/triage duplicate

Composite commands will be implemented in #3338

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rm3l rm3l added the v2 Issue or PR that applies to the v2 of odo label Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/bug Categorizes issue or PR as related to a bug. triage/duplicate Indicates an issue or PR that is a duplicate of other open issue or PR. v2 Issue or PR that applies to the v2 of odo
Projects
Archived in project
Development

No branches or pull requests

7 participants