Skip to content

feat: oci artifact uploader#1765

Merged
matthiasbruns merged 18 commits into
open-component-model:mainfrom
fabianburth:feat/oci-artifact-uploader
Feb 17, 2026
Merged

feat: oci artifact uploader#1765
matthiasbruns merged 18 commits into
open-component-model:mainfrom
fabianburth:feat/oci-artifact-uploader

Conversation

@fabianburth

@fabianburth fabianburth commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

Enhances the transfer command with a flag to upload oci artifacts as actual oci artifacts based on their reference name.

We added a new flafg upload-as for oci artifacts to control, if we use the already implemented lobalBlob or the new ociArtifact uploader. The latter is defined as default.

Integration tests have been updated/added to test both paths.

In addition, this PR splits the cluttered internal files into several smaller to give a better overview of the system and where everything resided.

Which issue(s) this PR fixes

contributes to open-component-model/ocm-project#875

Split PRs:

@github-actions github-actions Bot added kind/feature new feature, enhancement, improvement, extension component/github-actions Changes on GitHub Actions or within `.github/` directory size/l Large labels Feb 11, 2026
@matthiasbruns matthiasbruns force-pushed the feat/oci-artifact-uploader branch from e711797 to 095e8e0 Compare February 12, 2026 05:49
@matthiasbruns matthiasbruns force-pushed the feat/oci-artifact-uploader branch from ecdcd74 to 50a491e Compare February 13, 2026 13:49
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 adds AddOCIArtifact spec to oci.

```go
type AddOCIArtifactSpec struct {
	// Resource is the resource descriptor to add.
	// If the Resource contains an access specification, it may be used
	// by the underlying implementation to derive metadata to avoid additional compute
	// (such as digest information) or to steer implementation (such as a reference name)
	Resource *v2.Resource `json:"resource"`
	// File is the access specification to the file that should be added
	File v1alpha1.File `json:"file"`
}
```
We expect a file access and a resource descriptor as input for the add
transformation. The file will be uploaded to the `OCIRepository` based
on the `Resource` input.

```go
type AddOCIArtifactOutput struct {
	// Resource is the updated resource descriptor with complete oci image reference
	Resource *v2.Resource `json:"resource"`
}
```
The output of the transformation is the updated `Resource` pointing to
the newly uploaded oci image.

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

Part of:
- #1765

---------

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>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
…refactor transfer/internal

On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns force-pushed the feat/oci-artifact-uploader branch from 50a491e to 5f81ffa Compare February 13, 2026 18:44
@matthiasbruns

matthiasbruns commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

@matthiasbruns matthiasbruns marked this pull request as ready for review February 13, 2026 18:46
@matthiasbruns matthiasbruns requested a review from a team as a code owner February 13, 2026 18:46
matthiasbruns and others added 3 commits February 13, 2026 19:57
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns marked this pull request as draft February 16, 2026 09:07
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns marked this pull request as ready for review February 16, 2026 11:41
Comment thread cli/cmd/transfer/component-version/internal/oci.go Outdated

@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 small issues for now, I have to do a test run to really see this working. :)

Comment thread cli/integration/transfer_oci_artifact_integration_test.go Outdated
Comment thread cli/cmd/transfer/component-version/internal/oci.go Outdated
Comment thread cli/cmd/transfer/component-version/internal/oci.go Outdated
Comment thread cli/cmd/transfer/component-version/internal/options.go Outdated
Comment thread cli/cmd/transfer/component-version/internal/options.go
matthiasbruns and others added 2 commits February 16, 2026 14:06
Co-authored-by: Gergely Bräutigam <skarlso777@gmail.com>
Signed-off-by: Matthias Bruns <github@matthiasbruns.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 adds AddOCIArtifact spec to oci.

```go
type AddOCIArtifactSpec struct {
	// Resource is the resource descriptor to add.
	// If the Resource contains an access specification, it may be used
	// by the underlying implementation to derive metadata to avoid additional compute
	// (such as digest information) or to steer implementation (such as a reference name)
	Resource *v2.Resource `json:"resource"`
	// File is the access specification to the file that should be added
	File v1alpha1.File `json:"file"`
}
```
We expect a file access and a resource descriptor as input for the add
transformation. The file will be uploaded to the `OCIRepository` based
on the `Resource` input.

```go
type AddOCIArtifactOutput struct {
	// Resource is the updated resource descriptor with complete oci image reference
	Resource *v2.Resource `json:"resource"`
}
```
The output of the transformation is the updated `Resource` pointing to
the newly uploaded oci image.

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

Part of:
- open-component-model#1765

---------

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>
@matthiasbruns matthiasbruns force-pushed the feat/oci-artifact-uploader branch from a951f24 to 866a835 Compare February 16, 2026 14:25
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns force-pushed the feat/oci-artifact-uploader branch from 866a835 to 98839f8 Compare February 16, 2026 15:52
Comment thread cli/integration/transfer_oci_artifact_integration_test.go

@piotrjanik piotrjanik 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, small comments, rather questions

Comment thread cli/integration/transfer_oci_artifact_integration_test.go Outdated
Comment thread cli/integration/transfer_oci_artifact_integration_test.go Outdated
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns force-pushed the feat/oci-artifact-uploader branch 5 times, most recently from d3db8b0 to 44f8869 Compare February 17, 2026 10:16
Comment thread cli/integration/internal/oci.go
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns force-pushed the feat/oci-artifact-uploader branch from 44f8869 to 7b3b27c Compare February 17, 2026 10:21
Comment thread cli/integration/transfer_oci_artifact_integration_test.go Outdated
@Skarlso

Skarlso commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

Just a test fix, otherwise, I think this is becoming okay.

piotrjanik
piotrjanik previously approved these changes Feb 17, 2026
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns enabled auto-merge (squash) February 17, 2026 12:17
@matthiasbruns matthiasbruns merged commit 33ae43f into open-component-model:main Feb 17, 2026
22 checks passed
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 adds AddOCIArtifact spec to oci.

```go
type AddOCIArtifactSpec struct {
	// Resource is the resource descriptor to add.
	// If the Resource contains an access specification, it may be used
	// by the underlying implementation to derive metadata to avoid additional compute
	// (such as digest information) or to steer implementation (such as a reference name)
	Resource *v2.Resource `json:"resource"`
	// File is the access specification to the file that should be added
	File v1alpha1.File `json:"file"`
}
```
We expect a file access and a resource descriptor as input for the add
transformation. The file will be uploaded to the `OCIRepository` based
on the `Resource` input.

```go
type AddOCIArtifactOutput struct {
	// Resource is the updated resource descriptor with complete oci image reference
	Resource *v2.Resource `json:"resource"`
}
```
The output of the transformation is the updated `Resource` pointing to
the newly uploaded oci image.

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

Part of:
- open-component-model#1765

---------

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>
morri-son pushed a commit to morri-son/open-component-model that referenced this pull request Feb 18, 2026
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

component/github-actions Changes on GitHub Actions or within `.github/` directory kind/feature new feature, enhancement, improvement, extension size/l Large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants