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 url create permanently expands devfile variables #5496

Closed
arthurbarr opened this issue Feb 24, 2022 · 4 comments
Closed

odo url create permanently expands devfile variables #5496

arthurbarr opened this issue Feb 24, 2022 · 4 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@arthurbarr
Copy link

/kind bug

What versions of software are you using?

odo 2.5 on macOS:

odo v2.5.0 (724f16e68)

Server: https://api.arthur3.cp.fyre.ibm.com:6443
Kubernetes: v1.22.3+e790d7f

How did you run odo exactly?

odo url create --port 9443 --secure --container dev

Actual behavior

My devfile.yaml was completely re-written:

  1. The order of all the YAML was changed to be alphabetical, which is ugly2.
  2. More importantly, all the devfile variables were permanently expanded. e.g. instead of {{liberty-version}}, every occurrence was expanded out to be the value of that variable.3.

Expected behavior

Don't do that. Ideally, leave the whole file alone, except the bit you're adding to. I can maybe manage with everything getting re-ordered, but expanding the variables makes things much harder to maintain.

Any logs, error output, etc?

No.

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 24, 2022
@kadel
Copy link
Member

kadel commented Mar 1, 2022

sadly, this is a "feature" of the Go yaml parser that odo uses.

Currently, there is no way to prevent re-writing the yaml file :-(
We would have to write our own yaml parser from scratch.

@rm3l rm3l added this to odo Project Oct 3, 2022
@rm3l rm3l moved this to To Do 📝 in odo Project Oct 3, 2022
@rm3l rm3l removed the status in odo Project Oct 3, 2022
@valaparthvi
Copy link
Contributor

Not relevant for v3. Closing it.
/close

@openshift-ci
Copy link

openshift-ci bot commented Feb 1, 2023

@valaparthvi: Closing this issue.

In response to this:

Not relevant for v3. Closing it.
/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.

@openshift-ci openshift-ci bot closed this as completed Feb 1, 2023
@github-project-automation github-project-automation bot moved this to Done ✅ in odo Project Feb 1, 2023
@valaparthvi
Copy link
Contributor

However, this is still relevant for any commands that try to edit the Devfile and we'll be tracking it in #5789.

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
Archived in project
Development

No branches or pull requests

3 participants