Skip to content

refactor: rename models/meshmodel to models/registry, add compat shim… - #1066

Open
Ayush-kr-giga wants to merge 2 commits into
meshery:masterfrom
Ayush-kr-giga:fix/ayush/meshkit-registry-rename
Open

refactor: rename models/meshmodel to models/registry, add compat shim…#1066
Ayush-kr-giga wants to merge 2 commits into
meshery:masterfrom
Ayush-kr-giga:fix/ayush/meshkit-registry-rename

Conversation

@Ayush-kr-giga

Copy link
Copy Markdown

Description

Renames the models/meshmodel package to models/registry in meshkit, mirroring the /api/meshmodel(s)/api/registry rename already underway in meshery meshery/meshery#20632 . This is the meshkit portion of the broader multi-repo capabilities registry rename effort.

What changed

  • models/meshmodel/coremodels/registry/core
  • models/meshmodel/entitymodels/registry/entity
  • models/meshmodel/registrymodels/registry/manager (renamed to avoid a registry/registry stutter; matches the existing RegistryManager type)
  • Updated all internal import paths across meshkit referencing the old models/meshmodel/... paths (utils/utils.go, models/registration/*.go, models/patterns/pattern.go, registry/model.go, registry/component.go, and files within the moved packages themselves)
  • Added deprecated type aliases for two exported types that may be referenced by downstream consumers:
    • MeshModelHostsWithEntitySummary → alias for RegistryHostsWithEntitySummary
    • MeshModelRegistrantData → alias for RegistryRegistrantData
  • Added a compatibility shim package at the old models/meshmodel/entity path (see Notes for Reviewers)

Notes for Reviewers

meshery/schemas@v1.3.26(https://github.com/meshery/schemas/releases) (meshkit's currently pinned dependency) has several helper files (component_helper.go, model_helper.go, category_helper.go, etc.) that import meshkit/models/meshmodel/entity directly, by convention, since those types implement meshkit's entity.Entity interface. Since meshkit is the main module in this build, Go resolves that import against meshkit's own local source tree — so removing the old path outright breaks the build for any consumer on this schemas version.

To keep things compiling without waiting on a schemas update, this PR adds a small compatibility shim at models/meshmodel/entity containing pure type aliases (type X = Y) to the real types now in models/registry/entity. Since these are true aliases and not copies, values are fully interchangeable between the old and new import paths — nothing can drift between them.

This shim should be removed once meshkit's go.mod pin on github.com/meshery/schemas is bumped past v1.3.26 to a version that no longer references the old meshmodel path. Flagging here so it doesn't get left behind by accident — happy to open a follow-up PR for the removal once that dependency bump happens.

go build ./... and go test ./... both pass cleanly on this branch.

Related

Companion work to meshery/meshery#20632 . Part of the multi-repo capabilities registry rename effort.

Signed commits

  • Yes, I signed my commits.

… for schemas@v1.3.26

Signed-off-by: Ayush-kr-giga <kumarayushsharma2@gmail.com>
Comment thread models/meshmodel/entity/types.go Outdated
Comment thread models/meshmodel/entity/types.go
@ishwar170695

Copy link
Copy Markdown

AGENTS.md and docs/agent-instructions/registration.md still reference models/meshmodel/registry. Since this PR renames that package to models/registry/manager, those docs may also need to be updated (either here or in a follow-up PR).

Signed-off-by: Ayush-kr-giga <kumarayushsharma2@gmail.com>
@Ayush-kr-giga

Copy link
Copy Markdown
Author

AGENTS.md and docs/agent-instructions/registration.md still reference models/meshmodel/registry. Since this PR renames that package to models/registry/manager, those docs may also need to be updated (either here or in a follow-up PR).

Updated — AGENTS.md and docs/agent-instructions/registration.md now point to models/registry/manager/ instead of the old models/meshmodel/registry/ path. Thanks for catching that

@fitzergerald fitzergerald added the diffray-review Trigger diffray code review label Jul 21, 2026
@diffray diffray Bot added the diffray-review-failed diffray review status: failed label Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diffray-review Trigger diffray code review diffray-review-failed diffray review status: failed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants