-
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
Component version issue with OCM #1172
Comments
The version needs to follow a "relaxed" SemVer scheme: major, minor (+ optional patch level) - optional v-prefix). If versions of resources have a different versioning scheme not following this, they need to be converted to match the version format in OCM. You can think of using a label to store the original artifact version. |
Hi @morri-son, |
Hi @arjunroy-89 , we can only support (relaxed) SemVer for our versioning scheme. Since we have a toolset for the lifecycle of component (versions), we need the ability to compare versions and determine order, e.g. when there is a SemVer specified on our subscription for components in our OCM controller based setup, the an expression using SemVer is used to determine when a newer version is available and should be pulled. Allowing (relatively) arbitrary version schemes would make our implementation overly complex. Therefore we stick to the "relaxed" SemVer scheme. On resource level you can completely omit the
|
Thanks @morri-son |
Hi @morri-son, `components:
But its failing to pass the version. Can we connect over team meeting to discuss on this issue, It will be feasible for all of us. |
Hi @arjunroy-89, I tried to reproduce the issue. Let me paste my components.yaml, the ocm add cv to a local CTF and then an ocm get cv from that CTF. I'm using the current 0.19.0-dev version, but we didn't change anything wrt version handling from the last releases. Can you please check again on your side?
|
Hi @morri-son,
Error
We are trying to achieve to accomodate multiple images (part of one artifacts.yml) under which this ubuntu_packages is causing the issue with the pattern. However, kindly recommend if we can use this for all the images as a standard approach. |
Hi @arjunroy-89, the version |
@arjunroy-89 , please see my and Hilmar's comment and proposal. |
HI @arjunroy-89 , did you check Hilmar's comment? As mentioned above the last error you reported comes from the fact that the used version does not follow SemVer. Nonetheless I re-opened the ticket, so that you can confirm that if using SemVer you're able to correctly add the resource. |
What would you like to be added:
I am trying to convert the LSS format product (specifically Cloud Foundry) to OCM format through one python script.
its failing because of one component has different version compare to others.
consolidated_components.yaml
...rror creating OCM descriptor. Error:
Error: failed adding component "github.tools.sap/cloudfoundry/product-cf-hcp/jumpbox"(components.yaml[1][56]): component.resources.10.version: Does not match pattern '^[v]?(0|[1-9]\d*)(?:.(0|[1-9]\d*))?(?:.(0|[1-9]\d*))?(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-])(?:.(?:0|[1-9]\d|\d*[a-zA-Z-][0-9a-zA-Z-]))))?(?:+([0-9a-zA-Z-]+(?:.[0-9a-zA-Z-]+)*))?$'
created rsa key pair key.priv[key.pub]
Error: error processing "None": invalid component version reference "None": component version "None" is invalid
ERROR:root:Signing component versions failed
Error: path is None, unable to transfer component.
Version format we have for other component is like
trendmicro:
version: 20.0.1.21510
slirp4netns_arm64:
name: slirp4netns
version: 1.3.1
Version format for ubuntu_packages is like below
ubuntu_packages:
version: ubuntu-20.04-v20240119-gdch
Why is this needed:
Is the ubuntu packages version is specific to alpha-numeric pattern or just randomly selected/created.
I am asking because I wants to know as the script is failing to generate OCM descriptor file due to this version mismatch error.
Reason:
its failing because of one component has different version compare to others.
https://github.tools.sap/cloudfoundry/product-cf-hcp/blob/d293c0916c5f3f31ddb2032120275d6254762b70/components/jumpbox/artifacts.yml#L44
https://github.tools.sap/cloudfoundry/product-cf-hcp/blob/d293c0916c5f3f31ddb2032120275d6254762b70/components/jumpbox/artifacts.yml#L37
The text was updated successfully, but these errors were encountered: