Skip to content

feat: transfer local blobs by default#1669

Merged
fabianburth merged 10 commits into
open-component-model:mainfrom
jakobmoellerdev:local-blob-transfer-cli
Jan 29, 2026
Merged

feat: transfer local blobs by default#1669
fabianburth merged 10 commits into
open-component-model:mainfrom
jakobmoellerdev:local-blob-transfer-cli

Conversation

@jakobmoellerdev

@jakobmoellerdev jakobmoellerdev commented Jan 27, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it

  • Implemented AddLocalResource and GetLocalResource transformations for OCI and CTF schemes to handle local resource operations.
  • Added logic to generate transformation IDs for local resources and manage their tracking in transformation graphs.
  • Enhanced descriptor reconstruction to include dynamically updated local resources using CEL expressions.
  • Updated dependencies, including ocm.software/open-component-model/bindings/go/oci to v0.0.27.

Which issue(s) this PR fixes

copies local blob 🥳 . --copy-local-resources was left out for now as I dont see many folks using it.

part of open-component-model/ocm-project#795

- Implemented `AddLocalResource` and `GetLocalResource` transformations for OCI and CTF schemes to handle local resource operations.
- Added logic to generate transformation IDs for local resources and manage their tracking in transformation graphs.
- Enhanced descriptor reconstruction to include dynamically updated local resources using CEL expressions.
- Updated dependencies, including `ocm.software/open-component-model/bindings/go/oci` to v0.0.27.

This change extends transformation capabilities to support local resources, ensuring compatibility with OCI and CTF workflows.

Signed-off-by: Jakob Möller <jakob.moeller@sap.com>
@github-actions github-actions Bot added kind/feature new feature, enhancement, improvement, extension size/m Medium labels Jan 27, 2026
- Updated `go.mod` and `go.sum` files to use the latest versions of open-component-model bindings:
  - `descriptor/normalisation` to `v0.0.0-20260127115341-537c613eeacb`
  - `descriptor/runtime` to `v0.0.0-20260127115341-537c613eeacb`
  - `input/utf8` to `v0.0.0-20260127115341-537c613eeacb`
  - `rsa` to `v0.0.0-20260127115341-537c613eeacb`
  - `signing` to `v0.0.0-20260127115341-537c613eeacb`
  - `transform` to `v0.0.0-20260127115341-537c613eeacb`
  - `cel` to `v0.0.0-20260127115341-537c613eeacb`

This update ensures compatibility with the latest bug fixes and features in the library. Included changes propagate to both `cli` and `integration` modules.

Signed-off-by: Jakob Möller <jakob.moeller@sap.com>
matthiasbruns
matthiasbruns previously approved these changes Jan 28, 2026

@matthiasbruns matthiasbruns 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 - just one improvement idea and conflicts

Comment thread cli/cmd/transfer/component-version/internal/discovery.go Outdated
- Added support for parsing `Group`, `AllOf`, `AnyOf`, and `OneOf` error kinds in addition to existing `Schema` and `Reference` kinds.
- Updated the parser logic to improve error categorization when handling JSON schema validations.
- Enhanced comments to reflect the newly added error types for clarity and maintainability.

Signed-off-by: Jakob Möller <jakob.moeller@sap.com>
- Enhanced error handling in component version transfer by introducing `errors.Join()` to aggregate multiple errors and provide detailed output for debug purposes.
- Replaced `interface{}` with `any` in maps and data structures for improved type clarity and Go convention compliance.
- Streamlined resource transformation logic by removing unnecessary comments and ensuring consistent usage of `any`.

This improves the reliability of error messaging and aligns with modern Go practices for type definition.

Signed-off-by: Jakob Möller <jakob.moeller@sap.com>
…-cli

Signed-off-by: Jakob Möller <jakob.moeller@sap.com>

# Conflicts:
#	bindings/go/cel/jsonschema/santhosh-tekuri/v6/parser.go
#	cli/go.mod
#	cli/go.sum
#	cli/integration/go.mod
#	cli/integration/go.sum
- Updated `go.mod` and `go.sum` files in `cli` and `integration` modules to use newer versions of Open Component Model bindings:
  - `descriptor/normalisation` to `v0.0.0-20260128102645-872217d4e8eb`
  - `descriptor/runtime` to `v0.0.0-20260128102645-872217d4e8eb`
  - `input/utf8` to `v0.0.0-20260128102645-872217d4e8eb`
  - `rsa` to `v0.0.0-20260128102645-872217d4e8eb`
  - `signing` to `v0.0.0-20260128102645-872217d4e8eb`
  - `transform` to `v0.0.0-20260128102645-872217d4e8eb`
  - `cel` to `v0.0.0-20260128102645-872217d4e8eb`

This update ensures compatibility with recent improvements and bug fixes in the library. Adjustments reflect across both main and integration modules.

Signed-off-by: Jakob Möller <jakob.moeller@sap.com>
- Updated `go.mod` and `go.sum` files in both `cli` and `integration` modules:
  - Upgraded `ocm.software/open-component-model/bindings/go/oci` from v0.0.26 to v0.0.27.

This change ensures compatibility with the latest fixes and improvements in the `go/oci` binding.

Signed-off-by: Jakob Möller <jakob.moeller@sap.com>
Comment thread cli/cmd/transfer/component-version/internal/discovery.go

@fabianburth fabianburth 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.

Looks fine! Wouldn't we want some tests here?

### What this does / why we need it
- Introduced `Test_Transfer_Component_Version_With_Local_Blob` to verify proper transfer of component versions containing local blob resources between repositories.
- Ensured local blob resources are accessible in the target repository after transfer.
- Validated integrity and metadata of transferred resources in source and target repositories.

### Impact
- Strengthens test coverage for `ocm transfer`, ensuring robustness in handling local blob resources.
- Helps identify potential issues in component version transfer workflows.

Signed-off-by: Jakob Möller <jakob.moeller@sap.com>
…-cli

Signed-off-by: Jakob Möller <jakob.moeller@sap.com>

# Conflicts:
#	cli/go.mod
#	cli/go.sum
#	cli/integration/go.sum
@github-actions github-actions Bot added the size/l Large label Jan 29, 2026
Signed-off-by: Jakob Möller <jakob.moeller@sap.com>
@jakobmoellerdev jakobmoellerdev force-pushed the local-blob-transfer-cli branch from 7df9554 to 6879767 Compare January 29, 2026 12:10
@fabianburth fabianburth merged commit 8eab916 into open-component-model:main Jan 29, 2026
20 checks passed
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 size/m Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants