Skip to content

chore: update identity type from OCIRepository to OCIRegistry across integration tests and configurations#1992

Merged
jakobmoellerdev merged 2 commits into
open-component-model:mainfrom
jakobmoellerdev:identity-fixup-upper
Mar 16, 2026
Merged

chore: update identity type from OCIRepository to OCIRegistry across integration tests and configurations#1992
jakobmoellerdev merged 2 commits into
open-component-model:mainfrom
jakobmoellerdev:identity-fixup-upper

Conversation

@jakobmoellerdev

@jakobmoellerdev jakobmoellerdev commented Mar 16, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it

this adjusts our current fixtures and configs to not contain the wrong typing for our credential configurations

Which issue(s) this PR fixes

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

Testing

How to test the changes

Required files to test the changes:

.ocmconfig (credential entry)

- identity:
    type: OCIRegistry # instead of OCIRepository
    hostname: %q
    port: %q
    scheme: http
  credentials:
  - type: Credentials/v1
    properties:
      username: %q
      password: %q

Commands that test the change:

ocm get cv xxx

ocm transfer xxx
Verification
  • I have tested the changes locally by running ocm

Summary by CodeRabbit

  • Breaking Changes

    • Removed legacy v1-to-v2 runtime conversion functionality.
  • Improvements

    • Standardized OCI identity type from OCIRepository to OCIRegistry across configurations and tests.
    • Removed obsolete OCIRepository credential blocks and related explanatory comments from test data.
  • Chores

    • Bumped OCI bindings dependency to v0.0.36.

@coderabbitai

coderabbitai Bot commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Removed legacy v1→v2 runtime conversion functions and migrated test/testdata OCI consumer identity entries from OCIRepository to OCIRegistry; bumped several go.mod OCI binding versions and removed obsolete OCIRepository credential blocks in Kubernetes e2e testdata.

Changes

Cohort / File(s) Summary
Conversion utilities removal
bindings/go/configuration/ocm/v1/runtime/convert_v1.go
Deleted ConvertFromV1 and convertResolvers — removed the legacy v1→v2 runtime conversion layer (~66 lines).
Dependency version updates
cli/go.mod, cli/integration/go.mod, kubernetes/controller/go.mod
Bumped ocm.software/open-component-model/bindings/go/oci from v0.0.35 to v0.0.36.
OCI identity migration — CLI tests & helpers
cli/integration/add_component_version_integration_test.go, cli/integration/download_plugin_integration_test.go, cli/integration/download_resource_integration_test.go, cli/integration/resolver_integration_test.go, cli/integration/signing_integration_test.go, cli/integration/transfer_component_version_integration_test.go, cli/integration/transfer_helm_integration_test.go, cli/integration/transfer_oci_artifact_integration_test.go, cli/integration/internal/credentials.go
Replaced identity.type: OCIRepository with OCIRegistry across test YAML and credential generation; removed one fallback test and its embedded credentials/helper usage.
Testdata cleanup (Kubernetes e2e)
kubernetes/controller/test/e2e/testdata/basic-auth/.ocmconfig, kubernetes/controller/test/e2e/testdata/docker-config-json/.ocmconfig
Removed OCIRepository identity blocks and related explanatory comments; retained OCIRegistry entries and credentials.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • frewilhelm
  • matthiasbruns
  • Skarlso

Poem

🐰 I nibble legacy code till it's gone,
Swapped repository names at early dawn.
Credentials trimmed, configs made bright,
I hop through tests with all things right. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating identity type from OCIRepository to OCIRegistry across integration tests and configurations, which aligns with the majority of the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can generate a title for your PR based on the changes with custom instructions.

Set the reviews.auto_title_instructions setting to generate a title for your PR based on the changes in the PR with custom instructions.

@github-actions github-actions Bot added kind/chore chore, maintenance, etc. size/s Small labels Mar 16, 2026
@jakobmoellerdev jakobmoellerdev force-pushed the identity-fixup-upper branch 2 times, most recently from e6bfaa5 to bd9180b Compare March 16, 2026 10:44
@github-actions github-actions Bot added the size/m Medium label Mar 16, 2026
@jakobmoellerdev jakobmoellerdev marked this pull request as ready for review March 16, 2026 10:59
@jakobmoellerdev jakobmoellerdev requested a review from a team as a code owner March 16, 2026 10:59

@coderabbitai coderabbitai Bot 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.

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 `@cli/integration/download_plugin_integration_test.go`:
- Around line 136-138: The YAML fallback credentials fragment in the test
contains a misspelled key "consdumers" which prevents consumer entries from
being applied; update the key to "consumers" (preserve the existing indentation
and the nested identity/type block) so the config is valid and the test actually
exercises credential consumers.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 77452bb8-316f-4d94-a040-ae8d8132fd81

📥 Commits

Reviewing files that changed from the base of the PR and between f48b5f2 and 8785c0d.

⛔ Files ignored due to path filters (3)
  • cli/go.sum is excluded by !**/*.sum
  • cli/integration/go.sum is excluded by !**/*.sum
  • kubernetes/controller/go.sum is excluded by !**/*.sum
📒 Files selected for processing (15)
  • bindings/go/configuration/ocm/v1/runtime/convert_v1.go
  • cli/go.mod
  • cli/integration/add_component_version_integration_test.go
  • cli/integration/download_plugin_integration_test.go
  • cli/integration/download_resource_integration_test.go
  • cli/integration/go.mod
  • cli/integration/internal/credentials.go
  • cli/integration/resolver_integration_test.go
  • cli/integration/signing_integration_test.go
  • cli/integration/transfer_component_version_integration_test.go
  • cli/integration/transfer_helm_integration_test.go
  • cli/integration/transfer_oci_artifact_integration_test.go
  • kubernetes/controller/go.mod
  • kubernetes/controller/test/e2e/testdata/basic-auth/.ocmconfig
  • kubernetes/controller/test/e2e/testdata/docker-config-json/.ocmconfig
💤 Files with no reviewable changes (3)
  • kubernetes/controller/test/e2e/testdata/basic-auth/.ocmconfig
  • kubernetes/controller/test/e2e/testdata/docker-config-json/.ocmconfig
  • bindings/go/configuration/ocm/v1/runtime/convert_v1.go

Comment thread cli/integration/download_plugin_integration_test.go Outdated
frewilhelm
frewilhelm previously approved these changes Mar 16, 2026
@jakobmoellerdev jakobmoellerdev force-pushed the identity-fixup-upper branch 3 times, most recently from 4121a5e to 5ea97d5 Compare March 16, 2026 11:27
morri-son pushed a commit to open-component-model/ocm-website that referenced this pull request Mar 16, 2026
… with `path` (#759)

<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it

Corrects all documentation references of our OCI credentials to be of
the OCIRegistry type and patches up pathprefix towards path to stay
consistent.

#### Which issue(s) this PR is related to
<!--
Usage: `Related to #<issue number>`, or `Related to (paste link of
issue)`.
-->

Fix open-component-model/ocm-project#916 

requires
open-component-model/open-component-model#1992

#### Type of content
<!--
Which section does this PR target? See CONTRIBUTING.md for guidance.
-->
- [ ] Tutorial (`getting-started/` or `tutorials/`)
- [ ] How-to Guide (`how-to/`)
- [ ] Explanation / Concept (`concepts/`)
- [ ] Reference (`reference/`)
- [x] Other (infrastructure, config, fixes)

#### Checklist

- [x] I have read and followed the [Contributing
Guide](https://github.com/open-component-model/ocm-website/blob/main/CONTRIBUTING.md)
- [x] All commands/code snippets are tested and can be copy-pasted


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Updated credential identity type references across configuration
examples and guides.
* Clarified path matching behavior with glob pattern guidance for
credential configuration.
* Updated legacy credential compatibility guidance and configuration
examples to reflect current system expectations.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Jakob Möller <contact@jakob-moeller.com>
ocmbot Bot pushed a commit to open-component-model/ocm-website that referenced this pull request Mar 16, 2026
… with `path` (#759)

<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it

Corrects all documentation references of our OCI credentials to be of
the OCIRegistry type and patches up pathprefix towards path to stay
consistent.

#### Which issue(s) this PR is related to
<!--
Usage: `Related to #<issue number>`, or `Related to (paste link of
issue)`.
-->

Fix open-component-model/ocm-project#916

requires
open-component-model/open-component-model#1992

#### Type of content
<!--
Which section does this PR target? See CONTRIBUTING.md for guidance.
-->
- [ ] Tutorial (`getting-started/` or `tutorials/`)
- [ ] How-to Guide (`how-to/`)
- [ ] Explanation / Concept (`concepts/`)
- [ ] Reference (`reference/`)
- [x] Other (infrastructure, config, fixes)

#### Checklist

- [x] I have read and followed the [Contributing
Guide](https://github.com/open-component-model/ocm-website/blob/main/CONTRIBUTING.md)
- [x] All commands/code snippets are tested and can be copy-pasted

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Updated credential identity type references across configuration
examples and guides.
* Clarified path matching behavior with glob pattern guidance for
credential configuration.
* Updated legacy credential compatibility guidance and configuration
examples to reflect current system expectations.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Jakob Möller <contact@jakob-moeller.com> 7b47951
…integration tests and configurations

Signed-off-by: Jakob Möller <contact@jakob-moeller.com>
@jakobmoellerdev jakobmoellerdev merged commit e9d476c into open-component-model:main Mar 16, 2026
32 checks passed
frewilhelm added a commit that referenced this pull request Mar 18, 2026
<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it

#1992
removed `ConvertFromV1` because it appeared unused. However, it is
actually used in
https://github.com/open-component-model/open-component-model/blob/651cc58bca135e9ad39c5d86959da50cbfdcfa35/bindings/go/repository/component/resolvers/config.go#L57

Some tests were added too, so it does not appear unused.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Improved legacy v1 resolver configuration conversion with clearer
error handling, explicit priority mapping (with sensible defaults),
preserved resolver ordering, and retention of resolver types.
* **Deprecated**
* v1 resolvers marked deprecated; repository aliases are dropped and a
warning is logged when encountered.
* **Tests**
* Added comprehensive unit tests for nil/invalid inputs, priority
behavior, repository resolution, ordering, and error cases.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/chore chore, maintenance, etc. size/m Medium size/s Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants