Skip to content

feat: rename ocm-resource-repository subsystem to access in describe types#2083

Merged
jakobmoellerdev merged 2 commits into
open-component-model:mainfrom
jakobmoellerdev:fixup-source-transformer
Mar 27, 2026
Merged

feat: rename ocm-resource-repository subsystem to access in describe types#2083
jakobmoellerdev merged 2 commits into
open-component-model:mainfrom
jakobmoellerdev:fixup-source-transformer

Conversation

@jakobmoellerdev

Copy link
Copy Markdown
Member

What this PR does / why we need it

Renames the subsystem from "ocm-resource-repository" to "access" with a description that reflects access methods rather than repositories.

Which issue(s) this PR fixes

fixes up the weirdly named type subsystem for resource accesses

Testing

Verification
  • I have tested the changes locally by running ocm

…types

Renames the subsystem from "ocm-resource-repository" to "access" with
a description that reflects access methods rather than repositories.

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

coderabbitai Bot commented Mar 27, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

A consistent subsystem renaming across the codebase, changing the identifier from "ocm-resource-repository" to "access" along with updated descriptions. Changes propagate through command help text, tests, documentation, and core subsystem registration without altering underlying functionality.

Changes

Cohort / File(s) Summary
Subsystem Core
cli/internal/subsystem/core.go
Renamed subsystem identifier from "ocm-resource-repository" to "access" and updated description to reflect access methods for retrieving OCM resources.
Describe Command
cli/cmd/describe/types/cmd.go, cli/cmd/describe/types/cmd_test.go
Updated help text in command definition and added test assertion to verify "access" appears in subsystem listing output.
Documentation
cli/docs/reference/ocm_describe_types.md, cli/docs/reference/ocm_get_types.md
Updated "Common subsystems" documentation sections to reflect the new access subsystem name and description.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A subsystem renamed, from repo to access bright,
Through files and docs, the changes unite,
From ocm to new paths, retrieval takes flight,
With test and with text, everything right! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% 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
Title check ✅ Passed The title accurately describes the main change: renaming the 'ocm-resource-repository' subsystem to 'access' in describe types, which is the primary focus across all modified files.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose of renaming the subsystem and the rationale for the change.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@github-actions github-actions Bot added kind/feature new feature, enhancement, improvement, extension size/s Small labels Mar 27, 2026
@jakobmoellerdev jakobmoellerdev marked this pull request as ready for review March 27, 2026 12:24
@jakobmoellerdev jakobmoellerdev requested a review from a team as a code owner March 27, 2026 12:24

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

🧹 Nitpick comments (1)
cli/internal/subsystem/core.go (1)

23-26: Consider renaming the variable for clarity.

The variable ocmResourceRepository now creates a subsystem named "access", which is misleading. Consider renaming it to accessSubsystem or just access to match the subsystem name.

♻️ Proposed refactor
-	ocmResourceRepository := NewSubsystem(
+	access := NewSubsystem(
 		"access",
 		"Access methods define how OCM resources are accessed and retrieved from their origin.",
 	)

Then update all references to ocmResourceRepository in this file (lines 44, 55) to use access.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cli/internal/subsystem/core.go` around lines 23 - 26, The variable name
ocmResourceRepository is misleading because it constructs NewSubsystem("access",
...); rename ocmResourceRepository to access (or accessSubsystem) and update all
references in this file to the new identifier; specifically change the
declaration that calls NewSubsystem("access", "Access methods...") and replace
subsequent uses of ocmResourceRepository (e.g., where it’s passed/registered)
with access to keep the name consistent with the subsystem.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@cli/internal/subsystem/core.go`:
- Around line 23-26: The variable name ocmResourceRepository is misleading
because it constructs NewSubsystem("access", ...); rename ocmResourceRepository
to access (or accessSubsystem) and update all references in this file to the new
identifier; specifically change the declaration that calls
NewSubsystem("access", "Access methods...") and replace subsequent uses of
ocmResourceRepository (e.g., where it’s passed/registered) with access to keep
the name consistent with the subsystem.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 01daa515-7eeb-4c1f-a5df-bf5a99885c23

📥 Commits

Reviewing files that changed from the base of the PR and between 18fca4d and 62a407d.

📒 Files selected for processing (5)
  • cli/cmd/describe/types/cmd.go
  • cli/cmd/describe/types/cmd_test.go
  • cli/docs/reference/ocm_describe_types.md
  • cli/docs/reference/ocm_get_types.md
  • cli/internal/subsystem/core.go

@jakobmoellerdev jakobmoellerdev enabled auto-merge (squash) March 27, 2026 13:28
@jakobmoellerdev jakobmoellerdev merged commit c79f824 into open-component-model:main Mar 27, 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/s Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants