Skip to content

feat: move repository wrapper into oci#1717

Merged
matthiasbruns merged 3 commits into
open-component-model:mainfrom
matthiasbruns:feat/refactor_oci_repo_interface_oci
Feb 4, 2026
Merged

feat: move repository wrapper into oci#1717
matthiasbruns merged 3 commits into
open-component-model:mainfrom
matthiasbruns:feat/refactor_oci_repo_interface_oci

Conversation

@matthiasbruns

Copy link
Copy Markdown
Contributor

Part of #1715

This PR updates the oci module.

What this PR does / why we need it

In ociArtifact PR we need the oci.Repository or something comparable to get oci artifacts in the transformation. We had no real way to provide a credentials-based oci repository since now.
This PR updates the ResourceRepository in bindings/go/repository/interface.go to make it credential-aware.
Since we did not want to change the implementation of the oci repository, we opted for a wrapper comparable to the one in cli/internal/plugin/builtin/oci (now deleted). The wrapper was moved into bindings/go/oci/repository/resource.

cli and controllers were updated as well to register the new ResourceRepository.

Which issue(s) this PR fixes

Contributes open-component-model/ocm-project#796

On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns requested a review from a team as a code owner February 4, 2026 12:30
@github-actions github-actions Bot added kind/feature new feature, enhancement, improvement, extension size/m Medium labels Feb 4, 2026
Comment thread bindings/go/oci/interface.go
@matthiasbruns matthiasbruns force-pushed the feat/refactor_oci_repo_interface_oci branch from 8b1a051 to 10d5f07 Compare February 4, 2026 12:42
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns force-pushed the feat/refactor_oci_repo_interface_oci branch from 10d5f07 to be2ff1c Compare February 4, 2026 12:44
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns enabled auto-merge (squash) February 4, 2026 13:30
@matthiasbruns matthiasbruns merged commit 3311801 into open-component-model:main Feb 4, 2026
18 checks passed
@matthiasbruns matthiasbruns deleted the feat/refactor_oci_repo_interface_oci branch February 4, 2026 13:57
matthiasbruns added a commit that referenced this pull request Feb 13, 2026
<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it
This PR ties all the changes related to
open-component-model/ocm-project#796 together
in the cli package and implement oci transfer with tests.
It also adds two new flags, which were taken from old ocm
https://ocm.software/docs/reference/ocm-cli/transfer/componentversions/

- `FlagCopyResources      = "copy-resources"`

in addition, I've added an integration test, that:
- creates two oci registries
- uploads one artifact to the first registry
- creates a cv pointing to the artifact
- calls:

```go
transferCMD.SetArgs([]string{
		"transfer",
		"component-version",
		sourceRef,
		targetRef,
		"--config", cfgPath,
		"--copy-resources", // required, otherwise we wouldn't transfer oci artifacts
	})
```
- verifies, that the oci artifact is in the 2nd registry

#### Which issue(s) this PR fixes
Contributes:
open-component-model/ocm-project#796

Split PRs:
- #1730
- #1751
- #1736
- #1727
- #1718
- #1717

---------

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
Signed-off-by: Matthias Bruns <github@matthiasbruns.com>
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Co-authored-by: Fabian Burth <fabian.burth@sap.com>
morri-son pushed a commit to morri-son/open-component-model that referenced this pull request Feb 16, 2026
<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it
This PR ties all the changes related to
open-component-model/ocm-project#796 together
in the cli package and implement oci transfer with tests.
It also adds two new flags, which were taken from old ocm
https://ocm.software/docs/reference/ocm-cli/transfer/componentversions/

- `FlagCopyResources      = "copy-resources"`

in addition, I've added an integration test, that:
- creates two oci registries
- uploads one artifact to the first registry
- creates a cv pointing to the artifact
- calls:

```go
transferCMD.SetArgs([]string{
		"transfer",
		"component-version",
		sourceRef,
		targetRef,
		"--config", cfgPath,
		"--copy-resources", // required, otherwise we wouldn't transfer oci artifacts
	})
```
- verifies, that the oci artifact is in the 2nd registry

#### Which issue(s) this PR fixes
Contributes:
open-component-model/ocm-project#796

Split PRs:
- open-component-model#1730
- open-component-model#1751
- open-component-model#1736
- open-component-model#1727
- open-component-model#1718
- open-component-model#1717

---------

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
Signed-off-by: Matthias Bruns <github@matthiasbruns.com>
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Co-authored-by: Fabian Burth <fabian.burth@sap.com>
morri-son pushed a commit to morri-son/open-component-model that referenced this pull request Feb 18, 2026
<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it
This PR ties all the changes related to
open-component-model/ocm-project#796 together
in the cli package and implement oci transfer with tests.
It also adds two new flags, which were taken from old ocm
https://ocm.software/docs/reference/ocm-cli/transfer/componentversions/

- `FlagCopyResources      = "copy-resources"`

in addition, I've added an integration test, that:
- creates two oci registries
- uploads one artifact to the first registry
- creates a cv pointing to the artifact
- calls:

```go
transferCMD.SetArgs([]string{
		"transfer",
		"component-version",
		sourceRef,
		targetRef,
		"--config", cfgPath,
		"--copy-resources", // required, otherwise we wouldn't transfer oci artifacts
	})
```
- verifies, that the oci artifact is in the 2nd registry

#### Which issue(s) this PR fixes
Contributes:
open-component-model/ocm-project#796

Split PRs:
- open-component-model#1730
- open-component-model#1751
- open-component-model#1736
- open-component-model#1727
- open-component-model#1718
- open-component-model#1717

---------

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
Signed-off-by: Matthias Bruns <github@matthiasbruns.com>
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Co-authored-by: Fabian Burth <fabian.burth@sap.com>
Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
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/m Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants