Skip to content

feat: add support for OCI repository pattern for add component version#628

Merged
jakobmoellerdev merged 15 commits into
open-component-model:mainfrom
Skarlso:support-oci-repositories
Sep 4, 2025
Merged

feat: add support for OCI repository pattern for add component version#628
jakobmoellerdev merged 15 commits into
open-component-model:mainfrom
Skarlso:support-oci-repositories

Conversation

@Skarlso

@Skarlso Skarlso commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

Fixes open-component-model/ocm-project#578

Which issue(s) this PR fixes

@github-actions github-actions Bot added kind/feature new feature, enhancement, improvement, extension size/s Small size/m Medium labels Aug 26, 2025
@Skarlso Skarlso marked this pull request as ready for review August 26, 2025 07:28
@Skarlso Skarlso requested a review from a team as a code owner August 26, 2025 07:28
Comment thread cli/cmd/add/component-version/cmd.go Outdated
Comment thread cli/cmd/add/component-version/cmd.go Outdated
Comment thread cli/cmd/add/component-version/cmd_test.go Outdated
@Skarlso Skarlso marked this pull request as draft August 26, 2025 08:04
@Skarlso Skarlso force-pushed the support-oci-repositories branch from c1fbd25 to 817f238 Compare August 26, 2025 10:16
Comment thread cli/docs/reference/ocm_add_component-version.md Outdated
Comment thread cli/integration/add_component_version_integration_test.go
@Skarlso Skarlso force-pushed the support-oci-repositories branch from 4b1523f to e5b249f Compare August 28, 2025 07:44
Comment thread cli/integration/add_component_version_integration_test.go
@Skarlso

Skarlso commented Aug 28, 2025

Copy link
Copy Markdown
Contributor Author

Ugh, the tests together are not working of course. I need a way to isolate them.

@Skarlso

Skarlso commented Aug 28, 2025

Copy link
Copy Markdown
Contributor Author

Yay, the tests are passing. I'm going to overhaul the suite_test a bit.

@Skarlso Skarlso force-pushed the support-oci-repositories branch from 3db798e to 476c932 Compare August 29, 2025 06:03
Comment thread cli/cmd/add/component-version/cmd.go Outdated
Comment thread cli/internal/reference/compref/compref_test.go Outdated
Comment thread cli/integration/suite_test.go Outdated
@Skarlso Skarlso removed size/s Small size/m Medium labels Sep 1, 2025
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
…rsing

On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso force-pushed the support-oci-repositories branch from a7c9ab2 to f61ceaa Compare September 1, 2025 08:20
@Skarlso Skarlso marked this pull request as ready for review September 1, 2025 08:32
Comment thread cli/cmd/add/component-version/cmd.go Outdated
Comment thread cli/cmd/add/component-version/cmd.go Outdated
Comment thread cli/cmd/add/component-version/cmd.go Outdated
Comment thread cli/cmd/add/component-version/cmd.go
Comment thread cli/integration/download_resource_integration_test.go Outdated
Comment thread cli/internal/reference/compref/compref.go Outdated
Comment thread cli/internal/reference/compref/compref.go
Comment thread cli/internal/reference/compref/compref_test.go Outdated
Comment thread cli/internal/reference/compref/compref_test.go Outdated
Comment thread cli/internal/reference/compref/compref_test.go Outdated
@Skarlso

Skarlso commented Sep 2, 2025

Copy link
Copy Markdown
Contributor Author

We talked about this, I'm going to try to remedy the integration test situation. For now, add component version is failing with

        	            	error constructing components: error checking for existing component version in target repository: failed to get manifest: failed to resolve reference "localhost:53806/component-descriptors/ocm.software/explicit-add-oci-component:v2.0.0": HEAD "http://localhost:53806/v2/component-descriptors/ocm.software/explicit-add-oci-component/manifests/v2.0.0": response status code 401: Unauthorized

Unauthorized if run together with others. And doesn't fail alone. Even after modifying the container name, random ports, and new component names.

@Skarlso

Skarlso commented Sep 2, 2025

Copy link
Copy Markdown
Contributor Author

ah I bet it's the config 🤦

@Skarlso

Skarlso commented Sep 2, 2025

Copy link
Copy Markdown
Contributor Author

Narrator: But it wasn't the config.

Comment thread cli/integration/suite_test.go Outdated
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso force-pushed the support-oci-repositories branch from 31468ed to e6a5603 Compare September 2, 2025 13:29
@Skarlso

Skarlso commented Sep 2, 2025

Copy link
Copy Markdown
Contributor Author

The integration test madness is over. Now focusing on the actual coding. :D

Skarlso and others added 2 commits September 2, 2025 16:37
Co-authored-by: Jakob Möller <contact@jakob-moeller.com>
Signed-off-by: Gergely Brautigam <skarlso777@gmail.com>
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso

Skarlso commented Sep 2, 2025

Copy link
Copy Markdown
Contributor Author

this is just a repository reference now (new concept, didnt exist before). You will need to document in detail how this works!

Where should I document it?

@jakobmoellerdev

Copy link
Copy Markdown
Member

this is just a repository reference now (new concept, didnt exist before). You will need to document in detail how this works!

Where should I document it?

It needs a documentation in the reference docs for the command. See get cv on examples on ref documentation

On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso force-pushed the support-oci-repositories branch from 9798c5a to 4f91d48 Compare September 3, 2025 10:55
Comment thread cli/cmd/add/component-version/cmd.go
@Skarlso Skarlso force-pushed the support-oci-repositories branch 3 times, most recently from b4bd444 to 53e3f22 Compare September 3, 2025 12:54
…nd examples

On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso force-pushed the support-oci-repositories branch from 53e3f22 to 2d215ee Compare September 3, 2025 12:56

@jakobmoellerdev jakobmoellerdev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I still think the tests are very weird, once that is done Im good for a merge 🥳

Skarlso and others added 2 commits September 4, 2025 08:53
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@jakobmoellerdev jakobmoellerdev enabled auto-merge (squash) September 4, 2025 07:11
@jakobmoellerdev jakobmoellerdev merged commit ee02d71 into open-component-model:main Sep 4, 2025
22 checks passed
@Skarlso Skarlso deleted the support-oci-repositories branch September 5, 2025 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature new feature, enhancement, improvement, extension size/l Large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make ocm add cv --repository to support OCI registries

3 participants