Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Go-Binding: Validation detects duplicate instead of using the version attribute #50

Open
enrico-kaack-comp opened this issue Nov 19, 2021 · 0 comments
Labels
kind/bug Bug lifecycle/rotten Nobody worked on this for 12 months (final aging stage)

Comments

@enrico-kaack-comp
Copy link
Collaborator

What happened:
The go-binding behaves not according to spec when presented with two component references that only differ in name. The validation fails with a duplicated dependency error.

What you expected to happen:
Based on the spec, if two referenced artifacts (componentReference, resource, source) collide based on their name and extra identity, the version is implicitly added to the identity:

In v2, for backwards-compatibility-reasons, the (mandatory) version attribute is implicitly added to the set of additional identity attributes iff it is not explicitly declared as such, and the uniqueness constraint would otherwise be violated.

(https://gardener.github.io/component-spec/semantics.html#identities-and-accessors)

Anything else we need to know:
Root cause for this bug is probably in:
https://github.com/gardener/component-spec/blob/139929baecedfce543c389c1d09a065cc25b3c13/bindings-go/apis/v2/componentdescriptor.go#L230

Need to make sure this is correctly handled when accessing referenced artifacts as well.

Environment:

@gardener-robot gardener-robot added the lifecycle/stale Nobody worked on this for 6 months (will further age) label May 19, 2022
@gardener-robot gardener-robot added lifecycle/rotten Nobody worked on this for 12 months (final aging stage) and removed lifecycle/stale Nobody worked on this for 6 months (will further age) labels Nov 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Bug lifecycle/rotten Nobody worked on this for 12 months (final aging stage)
Projects
None yet
Development

No branches or pull requests

2 participants