-
Notifications
You must be signed in to change notification settings - Fork 243
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 add binding
drops all YAML comments from the Devfile
#5789
Comments
TL;DR Summary of my quick investigations sigs.k8s.io/yaml is a fork of ghodss/yaml, which is a wrapper around go-yaml (v2). Found the following open issues and discussions related to these:
While it certainly makes sense for the Devfile library to use sigs.k8s.io/yaml (to effectively reuse the JSON tags defined in the Devfile API objects or |
Added this to the Devfile community call (just to open the discussion), but we didn't have enough time to start discussing it. We will discuss it at a later time. |
/status blocked Issue created on the Devfile library side: devfile/api#919 |
A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity. |
/kind bug
What versions of software are you using?
Operating System:
Fedora release 36 (Thirty Six)
Output of
odo version
:odo v3.0.0-alpha2
(ba7f1a1)How did you run odo exactly?
Now add a few comments in the devfile.yaml file.
This is just an example, but we can imagine users having more-complex Devfiles with many comments/documentation in them.
❯ git commit -am "Add comments to the Devfile" [main 0718673] Add comments to the Devfile 1 file changed, 3 insertions(+)
Now run
odo add binding
(either interactively or not), e.g.:❯ odo add binding --service redis-standalone.Redis.redis.redis.opstreelabs.in --name my-sample-go-redis-standalone ✓ Successfully added the binding to the devfile. Run `odo dev` to create it on the cluster.
Actual behavior
The Devfile has been updated, as expected, to include the ServiceBinding Kubernetes Component. But all YAML comments in it have been surprisingly removed at the same time:
Expected behavior
Users might have spent some time adding comments and documentation to their Devfiles, which might be quite complex. So existing comments should not be removed, especially since we want the Devfile to be the main source of truth.
I guess we will have the same issue with any other commands that edit the Devfile.
The text was updated successfully, but these errors were encountered: