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

Odo does not apply multiple deploy commands #5480

Closed
yangcao77 opened this issue Feb 22, 2022 · 3 comments
Closed

Odo does not apply multiple deploy commands #5480

yangcao77 opened this issue Feb 22, 2022 · 3 comments
Labels
area/deploy Issues or PRs specific to the `odo deploy` command 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.

Comments

@yangcao77
Copy link
Contributor

/kind bug

What versions of software are you using?

Operating System:

Output of odo version: odo v2.5.0 (2bd4f07)

How did you run odo exactly?

run odo deploy with a devfile having 2 deploy commands defined, one default, and one non-default.

  - id: deploy
    composite:
        commands:
          - build-image-stack-provided
          - outerloop-deploy
        group:
          kind: deploy
          isDefault: true   
  # Deploy an app image built with a developer provided dockerfile - non-default action
  - id: deploy-app-image
    composite:
       commands:
         - build-image-app-provided
         - outerloop-deploy
       group:
         kind: deploy

Actual behavior

Seeing error:

$ odo deploy
 ✗  more than one default deploy command found in devfile, should not happen

However, I have one and only one default deploy command defined in devfile.
It is because Odo does not check for isDefault property, only checks for length of deploy commands.

if len(deployGroupCmd) == 0 {
return devfilev1.Command{}, &NoDefaultDeployCommandFoundError{}
}
if len(deployGroupCmd) > 1 {
return devfilev1.Command{}, &MoreThanOneDefaultDeployCommandFoundError{}
}

Expected behavior

Odo should allow multiple deploy commands, but only one isDefault

Any logs, error output, etc?

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 22, 2022
@yangcao77
Copy link
Contributor Author

/area deploy

@openshift-ci openshift-ci bot added the area/deploy Issues or PRs specific to the `odo deploy` command label Feb 22, 2022
@kadel
Copy link
Member

kadel commented Feb 23, 2022

/triage duplicate

#5452

/close

@openshift-ci openshift-ci bot added the triage/duplicate Indicates an issue or PR that is a duplicate of other open issue or PR. label Feb 23, 2022
@openshift-ci openshift-ci bot closed this as completed Feb 23, 2022
@openshift-ci
Copy link

openshift-ci bot commented Feb 23, 2022

@kadel: Closing this issue.

In response to this:

/triage duplicate

#5452

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deploy Issues or PRs specific to the `odo deploy` command 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.
Projects
None yet
Development

No branches or pull requests

2 participants