-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: +
in component version is replaced by .build-
#1235
Comments
I suppose, the '+' character is not allowed in the version as per specification:
and therefore getting replaced. See also: https://kubernetes.io/docs/concepts/containers/images/ |
Same in the OCI spec:
https://github.com/opencontainers/distribution-spec/blob/main/spec.md#workflow-categories |
@ikhandamirov thanks for those! Weird, why OCM isn't following here semver... semver.org clearly allows |
@hilmarf I'm not able to reproduce the issue. I can create, transfer and then get the CV from the target registry with the version
|
@morri-son, that's maybe the case because the version gets converted back, when calling |
ocm get cv ocm-oci-test.int.repositories.cloud.sap//docker.io/recmo/docker-hello-tiny:0.0.1-20250108132333.build-af79499 -o yaml fails for me with:
although the returned yaml looks like this: ---
component:
componentReferences: []
creationTime: "2025-01-09T11:20:47Z"
name: docker.io/recmo/docker-hello-tiny
provider: recmo
repositoryContexts:
- baseUrl: ocm-oci-test.int.repositories.cloud.sap
componentNameMapping: urlPath
type: OCIRegistry
resources:
- access:
imageReference: ocm-oci-test.int.repositories.cloud.sap/recmo/docker-hello-tiny:latest@sha256:c6be339a02a039f6ceac6b749568a2b4e76c619a2827e11b46da8745e72cd7af
type: ociArtifact
digest:
hashAlgorithm: SHA-256
normalisationAlgorithm: ociArtifactDigest/v1
value: c6be339a02a039f6ceac6b749568a2b4e76c619a2827e11b46da8745e72cd7af
name: docker-hello-tiny
relation: external
type: ociImage
version: v1.0
sources: []
version: 0.0.1-20250108132333+af79499
meta:
schemaVersion: v2 |
ok, but aren't we then look at OCI tags and not OCM component versions? Since the OCI spec does not allow |
PR which introduced this: |
The problem is, that a version with this It must be assured that the version name given at the API matches the version name stored in the component descriptor, otherwise the complete structure would be corrupted. So, such a version should be rejected at all. May be you could add the following check to
|
What happened:
During
ocm transfer
the cv version:0.0.1-20250108132333+af79499
, gets changed to:0.0.1-20250108132333.build-af79499
What you expected to happen:
I didn't expect that
+
is replaced by.build-
. Why is that happening fully automatic?How to reproduce it (as minimally and precisely as possible):
Error:
closing session: unable to close: closing docker.io/recmo/docker-hello-tiny:0.0.1-20250108132333.build-af79499: unable to unref last: unable to cleanup component version docker.io/recmo/docker-hello-tiny/0.0.1-20250108132333.build-af79499 while unref last: closing component version docker.io/recmo/docker-hello-tiny:0.0.1-20250108132333.build-af79499: check failed: component version "0.0.1-20250108132333+af79499" is invalid
Environment:
The text was updated successfully, but these errors were encountered: