Closed
Description
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:
- I've tried to replace the parent URL with the
blob
one (https://github.com/OpenLiberty/devfile-stack/blob/maven-0.7.0/templates/devfiles/maven/devfile.yaml), but the parser still fails:
$ 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
- I've also tried to replace the parent URL with the
raw
one (https://raw.githubusercontent.com/OpenLiberty/devfile-stack/maven-0.7.0/templates/devfiles/maven/devfile.yaml), but the parser still fails:
$ 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
orblob
URLs should have worked correctly.
Suggestion on how to fix the bug
Metadata
Metadata
Assignees
Type
Projects
Status
Done ✅