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

[devfile-registry] The content of meta.yaml is in JSON format #20828

Closed
svor opened this issue Nov 25, 2021 · 3 comments · Fixed by eclipse-che/che-devfile-registry#527
Closed
Assignees
Labels
area/devfile-registry kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. sprint/next

Comments

@svor
Copy link
Contributor

svor commented Nov 25, 2021

Describe the bug

If we check the content of meta.yaml, its content is in JSON format:

bash-5.0# ls
devfile.yaml  devworkspace-che-theia-latest.yaml  devworkspace-che-theia-next.yaml  meta.yaml
bash-5.0# cat meta.yaml 
{
  "displayName": "Go",
  "description": "Stack with Go 1.14",
  "tags": [
    "Debian",
    "Go"
  ],
  "icon": "/images/go.svg",
  "links": {
    "v2": "https://github.com/che-samples/golang-echo-example/tree/devfile2",
    "self": "/devfiles/go/devfile.yaml",
    "devWorkspaces": {
      "eclipse/che-theia/latest": "/devfiles/go/devworkspace-che-theia-latest.yaml",
      "eclipse/che-theia/next": "/devfiles/go/devworkspace-che-theia-next.yaml"
    }
  }
}

Che version

next (development version)

Steps to reproduce

Open any meta.yaml file in the devfile folder

Expected behavior

It should be in yaml format

Runtime

OpenShift

Screenshots

No response

Installation method

chectl/next

Environment

Linux

Eclipse Che Logs

No response

Additional context

No response

@svor svor added kind/bug Outline of a bug - must adhere to the bug report template. area/devfile-registry team/plugins severity/P1 Has a major impact to usage or development of the system. sprint/next labels Nov 25, 2021
@nickboldt
Copy link
Contributor

nickboldt commented Nov 26, 2021

good news is that you can open a json file and dump it to yaml with yq

yq -y . < /tmp/meta.json.yaml > /tmp/meta.actual.yaml
displayName: Go
description: Stack with Go 1.14
tags:
  - Debian
  - Go
icon: /images/go.svg
links:
  v2: https://github.com/che-samples/golang-echo-example/tree/devfile2
  self: /devfiles/go/devfile.yaml
  devWorkspaces:
    eclipse/che-theia/latest: /devfiles/go/devworkspace-che-theia-latest.yaml
    eclipse/che-theia/next: /devfiles/go/devworkspace-che-theia-next.yaml

@svor
Copy link
Contributor Author

svor commented Nov 26, 2021

@nickboldt thanks, should be a quick fix

@benoitf
Copy link
Contributor

benoitf commented Nov 26, 2021

well, it's just that when we're calling yq, by default yq output to json rather than yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-registry kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. sprint/next
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants