-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
devfile/library
#123Labels
area/libraryCommon devfile library for interacting with devfilesCommon devfile library for interacting with devfileskind/bugSomething isn't workingSomething isn't working
Description
/kind bug
Which area this bug is related to?
/area library
What versions of software are you using?
Operating System:
Linux Fedora
Go Pkg Version:
Bug Summary
Describe the bug:
When saving a devfile using a recent devfile/api library, an empty annotation is added to the container components:
components:
- container:
annotation: {}
endpoints:
- name: http-3000
targetPort: 3000
image: registry.access.redhat.com/ubi8/nodejs-14:latest
memoryLimit: 1024Mi
mountSources: true
sourceMapping: /project
name: runtime
When trying to validate this devfile with the devfile/library package, this error occurs:
✗ invalid devfile schema. errors :
- components.0.container: Additional property annotation is not allowed
To Reproduce:
Expected behavior
Additional context
Suggestion on how to fix the bug
The schemas of the different devfile revisions should be modified to authorize the annotation
field:
- https://github.com/devfile/library/blob/main/pkg/devfile/parser/data/v2/2.0.0/devfileJsonSchema200.go
- https://github.com/devfile/library/blob/main/pkg/devfile/parser/data/v2/2.1.0/devfileJsonSchema210.go
- https://github.com/devfile/library/blob/main/pkg/devfile/parser/data/v2/2.2.0/devfileJsonSchema220.go
Metadata
Metadata
Assignees
Labels
area/libraryCommon devfile library for interacting with devfilesCommon devfile library for interacting with devfileskind/bugSomething isn't workingSomething isn't working