From 2dc0134fdcff0a04376e77a6ef04833b7213f4ee Mon Sep 17 00:00:00 2001 From: Hilmar Falkenberg Date: Fri, 10 Jan 2025 16:09:55 +0100 Subject: [PATCH] fixes: https://github.com/open-component-model/ocm/issues/1235 --- api/ocm/extensions/repositories/genericocireg/component.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/ocm/extensions/repositories/genericocireg/component.go b/api/ocm/extensions/repositories/genericocireg/component.go index 5d96b32db2..13ca88c56b 100644 --- a/api/ocm/extensions/repositories/genericocireg/component.go +++ b/api/ocm/extensions/repositories/genericocireg/component.go @@ -128,6 +128,10 @@ func (c *componentAccessImpl) HasVersion(vers string) (bool, error) { } func (c *componentAccessImpl) LookupVersion(version string) (*repocpi.ComponentVersionAccessInfo, error) { + // LookupVersion '0.0.1-20250108132333.build-af79499' would fail with: + // unable to unref last: unable to cleanup component version [%v] while unref last: closing component version [%v]: check failed: component version [%v] is invalid + // This is because the version comes from an artifact tag, which doesn't allow '+' characters, which we replace with '.build-' during the push + version = toVersion(version) // ensure the cv doesn't contain '.build-' tag, err := toTag(version) if err != nil { return nil, err