-
-
Notifications
You must be signed in to change notification settings - Fork 17
Adding a "componentref" structure in the product definition #186
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
base: main
Are you sure you want to change the base?
Conversation
This is to be able to reference a specific release of a component in addition to referencing the component itself. Signed-off-by: Olle E. Johansson <[email protected]>
Signed-off-by: Olle E. Johansson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @oej,
Thanks for this PR — it’s a solid step in the right direction! I appreciate how it enables a TEA Product to reference precise versions of TEA Components. This seems well-suited for use cases like physical devices, where the hardware version is fixed and TEA can provide the initial software revision.
That said, I’m not sure it fully covers all the scenarios we discussed during the workshop. In particular, for products like Dependency-Track, we might need to support multiple releases of the same product.
To support that, I suggest introducing a product-release
object, distinct from product
, which includes fields like version
and releaseDate
. Both could coexist in the model but be served via separate endpoints:
product
→/product/{uuid}
product-release
→/product/{productUuid}/release/{releaseUuid}
- All releases →
/product/{productUuid}/releases
If this direction makes sense to you, I’d be happy to draft a PR to explore it further.
What do you think?
spec/openapi.yaml
Outdated
description: Unique identifier of the TEA componentref | ||
"$ref": "#/components/schemas/uuid" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: Unique identifier of the TEA componentref | |
"$ref": "#/components/schemas/uuid" | |
description: Reference to a TEA Component | |
"$ref": "#/components/schemas/component-ref" |
If I understand the intent correctly, the goal is to embed the component reference directly into the object, rather than introducing an additional level of indirection.
idValue: cpe:2.3:a:apache:log4j | ||
- idType: PURL | ||
idValue: pkg:maven/org.apache.logging.log4j/log4j-api | ||
- idType: PURL | ||
idValue: pkg:maven/org.apache.logging.log4j/log4j-core | ||
- idType: PURL | ||
idValue: pkg:maven/org.apache.logging.log4j/log4j-layout-template-json | ||
components: | ||
- 3910e0fd-aff4-48d6-b75f-8bf6b84687f0 | ||
- b844c9bd-55d6-478c-af59-954a932b6ad3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should remove all three PURL identifiers, including the one for log4j-api
.
Also, it looks like the components
section in this example wasn’t updated. Follow the updated format it should be:
components:
- uuid: 3910e0fd-aff4-48d6-b75f-8bf6b84687f0
release: c1f2f9c4-d86e-4007-b61c-a53dc36f3e72
- uuid: b844c9bd-55d6-478c-af59-954a932b6ad3
- uuid: d6d3f754-d4f4-4672-b096-b994b064ca2d
In the meeting we agreed that the version of the hardware is part of the name and that we don't need any new releases object for the product - this was confirmed by @nscuro . |
Signed-off-by: Olle E. Johansson <[email protected]>
I agree that for physical devices, including the version in the product name makes sense — there are few variants, and the hardware doesn't change. But for software, it's different. Products like Dependency-Track may have many versions (e.g., 4.0.0, 4.0.1, etc.). Should we treat each as a separate product? If it were commercial, which version would appear on an invoice? |
Signed-off-by: Olle E. Johansson <[email protected]>
In most cases there will be a product that doesn't lock on specific versions, because the version of components in the sold product keeps changing. But with DT Niclas wanted to create separate products for all releases, like 4.0, 4.1 |
Fix examples Co-authored-by: Piotr P. Karwasz <[email protected]> Signed-off-by: Olle E. Johansson <[email protected]>
For Apache, we will likely align TEA concepts with those used in the Apache Trusted Releases platform. A possible mapping would be:
However, TEA does not currently have a direct equivalent of a subproject release—that is, a versioned unit that groups together multiple TEA Component Releases (possibly across multiple components) and corresponds to a PMC release vote. |
Isn't that what we fix here? Or doesn't it work for you? |
The proposed PR still forces us to make a choice: should we map subprojects or subproject releases to TEA Products? Depending on that choice, we'll end up with one of the following:
|
@oej Here is one more use case I thought about that we are losing on without product - product release split. Let's take DT example, and say a user makes a discovery based on TEI for product version 4.12.0 - so far so good. However, image that at some point CLE references for all component releases will show that they are not supported. And what user is expected to do is to migrate to DT product version 4.13.0 instead. Without Another (unrelated) consideration to having open (without pinned release versions) Component references in Product releases: Basically, what I'm thinking a Component may contain for versions that for any reason should not be used in this particular product - i.e. I saw scenarios where particular firmware would brick a certain product and should never be used even though it may look newer than the existing one, but the consumer would have no way of knowing this. CLE data may be imperfect here, as the problems may exist only in the context of a single product, while the Component may be used in multiple products. |
@taleodor You need to be more specific in a pull request review. You are expanding the discussion far beyond this actual PR in my view. Are you against merging this or are you merely adding a new use case to the list of stuff we need to do -- then it's another issue? Niklas from dependency track agreed on this change, so he's fine with this. |
I'm very busy for the rest of this week and early next week, so apologies if this and my comment above look too brief, but:
Bottom line, I would like to see another 1 hour workshop on this, from my side I can prepare clear suggestions on the points mentioned above - balancing the need for Product / Product Release split and at the same time making Product optional so only the projects who needs it would use it. On my side I can commit to June 27 to prepare detailed materials on this. Now, I understand the desire to rush this PR through, but I believe this is very important to get right and I see significant issues in the current form. |
I'm somewhat conflicted on your remark about CLE metadata:
|
I agree, but actually the CLE conversation is something I think should be out of scope for now (and of this PR in particular). Here is why - given my use case:
The above fits the existing paradigm, so we can defer the CLE discussion to the future. |
This is what I propose: Here, we keep the meaning of One important note is that the A clear benefit of this model is we clearly define what Now, for folks who don't want to use the concept of Again, I would suggest to have another 1 hour workshop on this to discuss - I believe we had 2 workshops scheduled originally for this, so that should be reasonable to have the second one. |
This is to be able to reference a specific release of a component in addition to referencing the component itself.
The product now includes a list of "componentref" objects where each object contains one or two items - the first is a reference to the component, which is required, the second is a reference to specific release of that component, which is optional.