Skip to content

docs: component constructor ADR#110

Merged
jakobmoellerdev merged 3 commits into
open-component-model:mainfrom
jakobmoellerdev:constructor-adr
May 26, 2025
Merged

docs: component constructor ADR#110
jakobmoellerdev merged 3 commits into
open-component-model:mainfrom
jakobmoellerdev:constructor-adr

Conversation

@jakobmoellerdev

@jakobmoellerdev jakobmoellerdev commented May 15, 2025

Copy link
Copy Markdown
Member

What this PR does / why we need it

see the ADR for a concrete description or the issue for a short summary

Which issue(s) this PR fixes

fix open-component-model/ocm-project#501

@jakobmoellerdev jakobmoellerdev requested a review from a team as a code owner May 15, 2025 15:23
@github-actions github-actions Bot added area/documentation Documentation related size/m Medium labels May 15, 2025
@jakobmoellerdev

Copy link
Copy Markdown
Member Author

Even though the PR is not fully ready it has enough content to be reviewed

@jakobmoellerdev jakobmoellerdev changed the title docs: add component constructor support docs: component constructor ADR May 15, 2025
@jakobmoellerdev jakobmoellerdev force-pushed the constructor-adr branch 4 times, most recently from 9e98e9c to 9541888 Compare May 15, 2025 15:35
@jakobmoellerdev jakobmoellerdev added the kind/feature new feature, enhancement, improvement, extension label May 15, 2025
@jakobmoellerdev jakobmoellerdev force-pushed the constructor-adr branch 3 times, most recently from 462d17d to 9f1b889 Compare May 15, 2025 15:43
Comment thread docs/adr/0006_component_constructors.md

@Skarlso Skarlso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few questions really. Overall the design is okay. Though I will read this again.

Comment thread docs/adr/0006_component_constructors.md
Comment thread docs/adr/0006_component_constructors.md
Comment thread docs/adr/0006_component_constructors.md Outdated
Comment thread docs/adr/0006_component_constructors.md Outdated
Comment thread docs/adr/0006_component_constructors.md

@Skarlso Skarlso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more questions for clarification. Otherwise, LGTM honestly.

Comment thread docs/adr/0006_component_constructors.md
Comment thread docs/adr/0006_component_constructors.md
Comment thread docs/adr/0006_component_constructors.md
Comment thread docs/adr/0006_component_constructors.md
Comment thread docs/adr/0006_component_constructors.md Outdated
Comment thread docs/adr/0006_component_constructors.md
Comment thread docs/adr/0006_component_constructors.md Outdated

@frewilhelm frewilhelm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general very nicely written. Thanks a lot!

Maybe what I am missing are examples why the extensibility is beneficial. Why should the model be extensible? What input types are likely to be implemented?

Comment thread docs/adr/0006_component_constructors.md Outdated
@jakobmoellerdev jakobmoellerdev force-pushed the constructor-adr branch 2 times, most recently from 14cb6e5 to a7654d2 Compare May 21, 2025 07:37
@github-actions github-actions Bot added the component/github-actions Changes on GitHub Actions or within `.github/` directory label May 21, 2025
see the ADR for a concrete description
Comment thread docs/adr/0006_component_constructors.md Outdated

@frewilhelm frewilhelm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering if by reference-accesses would download the referenced resource as well to calculate the resource digest to put it in the CV. This is the current behaviour of ocm lib v1. However, this is not mentioned in this ADR.

There several arguments for downloading the resources (or getting the resource digest through an OCI manifest) and against it. For instance, secure delivery vs. separation of concerns vs. substantial changes in the cli usage for users...

Is the discussion or "feature" also in scope for this ADR or should we postpone it?

@jakobmoellerdev

Copy link
Copy Markdown
Member Author

I was wondering if by reference-accesses would download the referenced resource as well to calculate the resource digest to put it in the CV. This is the current behaviour of ocm lib v1. However, this is not mentioned in this ADR.

I agree, I ammended a section on the ADR to describe specifically how to handle digest behavior through a digest provider. The advantage of a dedicated digest provider is that we can more efficiently compute digests: while in the past OCMv1 had to download entire resources, I propose that the underlying implementation can decide how to amend the digest. For OCI for example, the implementation would just need to resolve the descriptor.

There several arguments for downloading the resources (or getting the resource digest through an OCI manifest) and against it. For instance, secure delivery vs. separation of concerns vs. substantial changes in the cli usage for users...

For me secure delivery means resources should be able to be provided with a digest for our most supported accesses. But for extension purposes we should probably go for a flow such as above. I ammended the PR as such with a separate section. Also note that this only applies to resources, because sources do not have digests.

Is the discussion or "feature" also in scope for this ADR or should we postpone it?

definetly IN SCOPE for ADR, but implementation may need to be done in steps.

PTAL at the changed ADR @frewilhelm and thanks for bringing it up!

Skarlso
Skarlso previously approved these changes May 23, 2025

@Skarlso Skarlso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now

@jakobmoellerdev jakobmoellerdev merged commit f187f07 into open-component-model:main May 26, 2025
18 checks passed
@frewilhelm

Copy link
Copy Markdown
Contributor

Very nice! Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Documentation related component/github-actions Changes on GitHub Actions or within `.github/` directory kind/feature new feature, enhancement, improvement, extension size/m Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ADR for Next Generation Component Constructors

3 participants