Which area this feature is related to?
/kind bug
Which area this bug is related to?
/area library
What versions of software are you using?
Go project
Operating System and version:
Fedora 38
Go Pkg Version:
Latest commit on the main branch: devfile/library@f041d79
Bug Summary
Describe the bug:
In redhat-developer/odo#6768, we have updated the Devfile library to the latest commit. And now, some of our tests are failing due to Devfile parsing issues.
To Reproduce:
I've narrowed down this issue to the following reproduction steps:
- Sample Devfile
$ cat << EOF > /tmp/devfile-issue-with-parent-uri.yaml
schemaVersion: 2.1.0
metadata:
name: new-ol-version
description: Child devfile to test OL image updating
parent:
uri: https://github.com/OpenLiberty/application-stack/releases/download/maven-0.7.0/devfile.yaml
components:
- name: dev
container:
image: maven:3.6-adoptopenjdk-11-openj9
EOF
- Parser is now failing (I'm running this from the library repo: https://github.com/devfile/library/blob/main/main.go)
$ go run . /tmp/devfile-issue-with-parent-uri.yaml
parsing devfile from /tmp/devfile-issue-with-parent-uri.yaml
failed to populateAndParseDevfile: url path to directory or file should contain 'tree' or 'blob'
NOTES:
$ go run . /tmp/devfile-issue-with-parent-uri.yaml
parsing devfile from /tmp/devfile-issue-with-parent-uri.yaml
failed to populateAndParseDevfile: 1 error occurred:
* failed to switch repo to revision. repo dir: /tmp/git-resources2839940370, revision: maven-0.7.0
$ go run . /tmp/devfile-issue-with-parent-uri.yaml
parsing devfile from /tmp/devfile-issue-with-parent-uri.yaml
failed to populateAndParseDevfile: 1 error occurred:
* failed to switch repo to revision. repo dir: /tmp/git-resources3340282075, revision: maven-0.7.0
Expected behavior
- Is it intentional that we cannot reference a parent from a GitHub release artifact?
- I guess however that using the
raw or blob URLs should have worked correctly.
Suggestion on how to fix the bug
Which area this feature is related to?
/kind bug
Which area this bug is related to?
/area library
What versions of software are you using?
Go project
Operating System and version:
Fedora 38
Go Pkg Version:
Latest commit on the
mainbranch: devfile/library@f041d79Bug Summary
Describe the bug:
In redhat-developer/odo#6768, we have updated the Devfile library to the latest commit. And now, some of our tests are failing due to Devfile parsing issues.
To Reproduce:
I've narrowed down this issue to the following reproduction steps:
NOTES:
blobone (https://github.com/OpenLiberty/devfile-stack/blob/maven-0.7.0/templates/devfiles/maven/devfile.yaml), but the parser still fails:rawone (https://raw.githubusercontent.com/OpenLiberty/devfile-stack/maven-0.7.0/templates/devfiles/maven/devfile.yaml), but the parser still fails:Expected behavior
raworblobURLs should have worked correctly.Suggestion on how to fix the bug