fix: update module ocm.software/open-component-model/bindings/go/oci to v0.0.40 (#2331)#2352
Conversation
Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
✅ Deploy Preview for ocm-website ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (7)
📒 Files selected for processing (16)
✅ Files skipped from review due to trivial changes (9)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughBumped multiple Go module references to Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@bindings/go/transfer/integration/integration_test.go`:
- Around line 921-925: The test currently only asserts the resource descriptor
type (gotDesc.Component.Resources[0].Access -> descriptorv2.LocalBlobAccessType)
but doesn't verify the blob is actually present in the target; update the test
to retrieve the localBlob from the target repository and assert it can be
resolved/downloaded (use targetRepo or the resource repository used in the
test), e.g. locate the resource's local blob reference from gotAccess and call
the repository's Resolve/Fetch method and assert the blob exists and is readable
so CopyModeAllResources failures are caught at test-time.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3b1971fa-15b7-4ced-b129-28b8592d40e2
⛔ Files ignored due to path filters (7)
bindings/go/constructor/go.sumis excluded by!**/*.sumbindings/go/helm/go.sumis excluded by!**/*.sumbindings/go/transfer/go.sumis excluded by!**/*.sumbindings/go/transfer/integration/go.sumis excluded by!**/*.sumcli/go.sumis excluded by!**/*.sumcli/integration/go.sumis excluded by!**/*.sumkubernetes/controller/go.sumis excluded by!**/*.sum
📒 Files selected for processing (15)
bindings/go/constructor/go.modbindings/go/helm/go.modbindings/go/oci/integration/go.modbindings/go/transfer/go.modbindings/go/transfer/integration/go.modbindings/go/transfer/integration/integration_test.gocli/go.modcli/integration/go.modcli/integration/resolver_integration_test.goconformance/scenarios/sovereign/components/notes/deploy/chart/templates/deployment.yamlconformance/scenarios/sovereign/components/postgres/deploy/chart/templates/deployment.yamlconformance/scenarios/sovereign/components/product/deploy/rgd.yamldocs/adr/0013_sovereign_cloud_reference_scenario.mdkubernetes/controller/go.modwebsite/content/docs/concepts/ocm-controllers.md
💤 Files with no reviewable changes (1)
- cli/integration/resolver_integration_test.go
Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
…to v0.0.40 (#2331) (#2352) #### What this PR does / why we need it Adapts all consumers to the breaking change introduced in #2275: `GlobalAccessPolicy` now defaults to `Never`, meaning `localBlob` resources no longer have a `globalAccess` field populated after transfer. This upgrades `bindings/go/oci` from v0.0.39 to v0.0.40 and updates `go.mod`/`go.sum` across 8 consuming modules (constructor, helm, oci/integration, transfer, transfer/integration, cli, cli/integration, kubernetes/controller). **Test fixes:** - `transfer/integration`: Rewrites the `CopyModeAllResources` test — instead of verifying `globalAccess` is non-nil and resolvable in the target registry, it now asserts `globalAccess` is nil and verifies the blob is directly readable from the target repository via `GetLocalResource` - `cli/integration`: Replaces weak output assertions (checking registry addresses from `globalAccess` image references) with a stronger negative test that proves component-b is unreachable from registry-a without resolver config, confirming resolver routing actually works **Conformance scenario fixes:** - RGD: Replaces `resource.access.globalAccess.imageReference.toOCI()` with `resource.access.toOCI()`, which constructs the OCI reference directly from the component's repository spec and local reference digest - RGD: Uses `image.digest` instead of `image.tag` in HelmRelease values, since `toOCI()` on a `localBlob` returns only a digest reference (no tag) - RGD: Drops the `tag` field from `additionalStatusFields` — no longer available without `globalAccess` - Helm chart templates (notes + postgres): Switches image references from `:tag` to `@digest` format - Helm chart values: Replaces `tag` field with `digest` field **Documentation:** - Sovereign cloud ADR: Updates CEL expression examples from `resource.access.globalAccess.imageReference.toOCI()` to `resource.access.toOCI()` - OCM controllers concept page: Updates CEL example from `resource.access.globalAccess.imageReference.split('/')[0]` to `resource.access.toOCI().registry` #### How it was tested - Unit tests: all modules pass - Integration tests: `transfer/integration` and `cli/integration` pass - E2E tests: 12/12 pass on Kind cluster - Conformance scenario: passes with both the current CLI (`0.0.0-main`, which still populates `globalAccess`) and a locally-built CLI using OCI v0.0.40 (which does not) #### Which issue(s) this PR fixes Fixes #2331 --------- Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com> Co-authored-by: ocmbot[bot] <125909804+ocmbot[bot]@users.noreply.github.com> Co-authored-by: Matthias Bruns <github@matthiasbruns.com> f71796b
What this PR does / why we need it
Adapts all consumers to the breaking change introduced in #2275:
GlobalAccessPolicynow defaults toNever, meaninglocalBlobresources no longer have aglobalAccessfield populated after transfer.This upgrades
bindings/go/ocifrom v0.0.39 to v0.0.40 and updatesgo.mod/go.sumacross 8 consuming modules (constructor, helm, oci/integration, transfer, transfer/integration, cli, cli/integration, kubernetes/controller).Test fixes:
transfer/integration: Rewrites theCopyModeAllResourcestest — instead of verifyingglobalAccessis non-nil and resolvable in the target registry, it now assertsglobalAccessis nil and verifies the blob is directly readable from the target repository viaGetLocalResourcecli/integration: Replaces weak output assertions (checking registry addresses fromglobalAccessimage references) with a stronger negative test that proves component-b is unreachable from registry-a without resolver config, confirming resolver routing actually worksConformance scenario fixes:
resource.access.globalAccess.imageReference.toOCI()withresource.access.toOCI(), which constructs the OCI reference directly from the component's repository spec and local reference digestimage.digestinstead ofimage.tagin HelmRelease values, sincetoOCI()on alocalBlobreturns only a digest reference (no tag)tagfield fromadditionalStatusFields— no longer available withoutglobalAccess:tagto@digestformattagfield withdigestfieldDocumentation:
resource.access.globalAccess.imageReference.toOCI()toresource.access.toOCI()resource.access.globalAccess.imageReference.split('/')[0]toresource.access.toOCI().registryHow it was tested
transfer/integrationandcli/integrationpass0.0.0-main, which still populatesglobalAccess) and a locally-built CLI using OCI v0.0.40 (which does not)Which issue(s) this PR fixes
Fixes #2331