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

describe and create commands test for existing component in context folder is inconsistent #4210

Closed
dgolovin opened this issue Nov 11, 2020 · 4 comments · Fixed by #4332
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@dgolovin
Copy link
Contributor

/kind bug

What versions of software are you using?

Operating System: Linux

Output of odo version: 2.0.0

How did you run odo exactly?

Current folder has .odo/env left after previous component and no devfile.yaml

$ odo describe
✗  The current directory does not represent an odo component. Use 'odo create' to create component here or switch to directory with a component

Actual behavior

$ odo create nodejs
✗  this directory already contains a component

Expected behavior

odo create nodejs creates component

Any logs, error output, etc?

N/A

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 11, 2020
@girishramnani girishramnani self-assigned this Nov 18, 2020
@girishramnani
Copy link
Contributor

I think as there is no devfile present - the user cannot move forward in anyway, one solution I feel is allowing the user to override the env/env.yaml when user does odo create nodejs.

@kadel
Copy link
Member

kadel commented Dec 3, 2020

I think as there is no devfile present - the user cannot move forward in anyway, one solution I feel is allowing the user to override the env/env.yaml when user does odo create nodejs.

This should work.

It would be interesting to know how this situation can happen.

Current folder has .odo/env left after previous component and no devfile.yaml

@dgolovin, how did you get it into this state? There should be no way to create this situation with odo.

@dgolovin
Copy link
Contributor Author

dgolovin commented Dec 3, 2020

@kadel I probably did it outside of odo, by deleting devfile.yaml form file browser, but did not see .odo folder because it was hidden. Behaviour should be ether overwriting .odo/env/env.yaml in case of something missing to detect component or recognizing component with invalid configuration, but it should be consistent throughout all commands.

@girishramnani
Copy link
Contributor

Understood moving forward on the approach I have mentioned above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants