Skip to content

fix: support compress option for file and dir inputs#512

Merged
jakobmoellerdev merged 7 commits into
open-component-model:mainfrom
ikhandamirov:compressed-input
Aug 7, 2025
Merged

fix: support compress option for file and dir inputs#512
jakobmoellerdev merged 7 commits into
open-component-model:mainfrom
ikhandamirov:compressed-input

Conversation

@ikhandamirov

@ikhandamirov ikhandamirov commented Aug 6, 2025

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

This PR makes it possible to create resource from fileand dir with Compress option set to true. In such cases, when creating respective OCI layer, the size and the digest of the blob are now calculated dynamically.

The use of the fix is not limited to fileand dir inputs, but applicable to all cases, when the size or the digest of the blob are not known in advance.

Which issue(s) this PR fixes

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

@ikhandamirov ikhandamirov requested a review from a team as a code owner August 6, 2025 17:02
Signed-off-by: Ilya Khandamirov <ilya.khandamirov@sap.com>
@ikhandamirov ikhandamirov changed the title fix: close reader reliably fix: support compress option for file and dir inputs Aug 6, 2025
Signed-off-by: Ilya Khandamirov <ilya.khandamirov@sap.com>
Signed-off-by: Ilya Khandamirov <ilya.khandamirov@sap.com>
Comment thread bindings/go/oci/blob/artifact_blob.go Outdated
Comment thread bindings/go/oci/blob/artifact_blob.go Outdated
Comment thread bindings/go/oci/blob/artifact_blob.go Outdated
Comment thread bindings/go/oci/internal/pack/pack.go Outdated
Comment thread bindings/go/oci/blob/artifact_blob.go Outdated
Signed-off-by: Ilya Khandamirov <ilya.khandamirov@sap.com>
@github-actions github-actions Bot added the size/m Medium label Aug 7, 2025
@jakobmoellerdev jakobmoellerdev merged commit 5d87cde into open-component-model:main Aug 7, 2025
19 checks passed
jakobmoellerdev pushed a commit that referenced this pull request Aug 8, 2025
<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it

This PR is related to open-component-model/ocm-project#566 and #512 and
provides respective unit test.

#### Which issue(s) this PR fixes
<!--
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->

---------

Signed-off-by: Ilya Khandamirov <ilya.khandamirov@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: cannot create CVs with compressed file and dir inputs

2 participants