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 analyze returns error if current directory contains an invalid Devfile #6683

Closed
rm3l opened this issue Mar 24, 2023 · 1 comment · Fixed by #6905
Closed

odo analyze returns error if current directory contains an invalid Devfile #6683

rm3l opened this issue Mar 24, 2023 · 1 comment · Fixed by #6905
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Milestone

Comments

@rm3l
Copy link
Member

rm3l commented Mar 24, 2023

/kind bug

What versions of software are you using?

Output of odo version:
odo v3.8.0 (987d6f6)

How did you run odo exactly?

mkdir /tmp/issue-odo-analyze
cd /tmp/issue-odo-analyze

cat << EOF > main.go
package main

import "fmt"

func main() {
        fmt.Println("Hello World")
}
EOF

touch devfile.yaml

odo analyze -o json

Actual behavior

Output of odo analyze:

{
        "message": "failed to parse the devfile /tmp/bug-odo-analyze/devfile.yaml: failed to populateAndParseDevfile: schemaVersion not present in devfile: /tmp/bug-odo-analyze/devfile.yaml"
}

Expected behavior

The goal of odo analyze is to analyze the current directory and return things it has detected (like best Devfile, name, port, ...). Even if there is already a Devfile, I think we should not try to validate it at this point.

Any logs, error output, etc?

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 24, 2023
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Mar 24, 2023
@kadel kadel added the priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). label Mar 27, 2023
@valaparthvi
Copy link
Contributor

  • This error might be coming from where the Devfile obj is built into the context, we should be able to ignore this error for odo analyze.

@valaparthvi valaparthvi removed the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Apr 13, 2023
@rm3l rm3l changed the title odo analyze returns error message if current directory contains an invalid Devfile odo analyze returns error if current directory contains an invalid Devfile Jun 8, 2023
@rm3l rm3l self-assigned this Jun 13, 2023
@rm3l rm3l added this to the v3.12.0 🚀 milestone Jun 14, 2023
@rm3l rm3l moved this to In Progress 🚧 in odo Project Jun 15, 2023
@rm3l rm3l moved this from In Progress 🚧 to In Review 👀 in odo Project Jun 21, 2023
@github-project-automation github-project-automation bot moved this from In Review 👀 to Done ✅ in odo Project Jun 22, 2023
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. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants