-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
devfile/library
#116Labels
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?
Go Pkg Version: 1.1.0
Bug Summary
Describe the bug:
An error is returned when adding a component with the same name as existing one, but a new component is still added, despite the error. I asked on Gitter and Elson said that this is not an intended behavior.
To Reproduce:
Execute this piece of code twice
devfile.AddComponents([]v1alpha2.Component{
{
Name: "TestComp",
ComponentUnion: v1alpha2.ComponentUnion{
Container: &v1alpha2.ContainerComponent{
Container: v1alpha2.Container{
Image: "test",
MemoryLimit: "3Gb",
},
},
},
},
})
Expected behavior
An error is returned and a component is not added the second time
Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable.
Additional context
Any workaround?
Right now in our code we check if a component with same name exist. If it does, we do not add it again.
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