Skip to content

Validation fails on devfile with component/container annotation #675

@feloy

Description

@feloy

/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:

Metadata

Metadata

Assignees

Labels

area/libraryCommon devfile library for interacting with devfileskind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions