refactor: rename models/meshmodel to models/registry, add compat shim… - #1066
Open
Ayush-kr-giga wants to merge 2 commits into
Open
refactor: rename models/meshmodel to models/registry, add compat shim…#1066Ayush-kr-giga wants to merge 2 commits into
Ayush-kr-giga wants to merge 2 commits into
Conversation
… for schemas@v1.3.26 Signed-off-by: Ayush-kr-giga <kumarayushsharma2@gmail.com>
|
|
Signed-off-by: Ayush-kr-giga <kumarayushsharma2@gmail.com>
Author
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Renames the
models/meshmodelpackage tomodels/registryin meshkit, mirroring the/api/meshmodel(s)→/api/registryrename already underway inmesherymeshery/meshery#20632 . This is the meshkit portion of the broader multi-repo capabilities registry rename effort.What changed
models/meshmodel/core→models/registry/coremodels/meshmodel/entity→models/registry/entitymodels/meshmodel/registry→models/registry/manager(renamed to avoid aregistry/registrystutter; matches the existingRegistryManagertype)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)MeshModelHostsWithEntitySummary→ alias forRegistryHostsWithEntitySummaryMeshModelRegistrantData→ alias forRegistryRegistrantDatamodels/meshmodel/entitypath (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 importmeshkit/models/meshmodel/entitydirectly, by convention, since those types implement meshkit'sentity.Entityinterface. 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
schemasupdate, this PR adds a small compatibility shim atmodels/meshmodel/entitycontaining pure type aliases (type X = Y) to the real types now inmodels/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.modpin ongithub.com/meshery/schemasis bumped past v1.3.26 to a version that no longer references the oldmeshmodelpath. 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 ./...andgo 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