registry: track meshery server/meshmodel relocation to server/models#1040
Conversation
The default fallback path in ProcessRelationships pointed at the meshery server's old model data directory (server/meshmodel), which is being relocated and renamed to server/models. Update the fallback so relationship generation resolves model versions from the new location when no explicit path is supplied. Signed-off-by: Ahmed Jamil <197998703+CodeAhmedJamil@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request updates the default path in the ProcessRelationships function within registry/relationship.go from ../../meshery/server/meshmodel to ../../meshery/server/models. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Pull request overview
Updates MeshKit’s registry relationship processing fallback path to track Meshery server’s on-disk model directory relocation, ensuring relationship version resolution still works when ProcessRelationships is called without an explicit path.
Changes:
- Update the default fallback directory from
../../meshery/server/meshmodelto../../meshery/server/models.
| func ProcessRelationships(relationshipCSVHelper *RelationshipCSVHelper, spreadsheetUpdateChan chan RelationshipCSV, path string) { | ||
| if path == "" { | ||
| path = "../../meshery/server/meshmodel" | ||
| path = "../../meshery/server/models" | ||
| } |
Symptom
registry.ProcessRelationshipshas a hardcoded fallback default path of../../meshery/server/meshmodel(registry/relationship.go:115), used when the function is invoked without an explicitpath. The meshery server's model data directory is being relocated and renamed fromserver/meshmodeltoserver/models, leaving this fallback pointing at a directory that will no longer exist.Root cause
The default targets the old on-disk model-definitions directory in the meshery repo. When
path == "", relationship version resolution (os.ReadDir(filepath.Join(path, relationship.Model))) would read from the stale location and fail.Fix
Update the fallback to
../../meshery/server/modelsso relationship generation resolves model versions from the new location when no explicit path is supplied. The normalmesheryctl registry generateflow always passes an explicitpath, so this only affects callers that rely on the default - but it should track the new canonical location.Scope note - this is the only MeshKit reference to the data directory
The many
github.com/meshery/meshkit/models/meshmodel/...import paths are MeshKit's own Go package and are unrelated to the meshery server directory rename - they are unaffected. This fallback string is the sole filesystem reference in MeshKit to the relocated directory.Watch for - coordinated changes in sibling repos
This rename requires coordinated updates elsewhere (flagged for visibility, not included here):
server/models/seed_models.goModelsPath/PoliciesPath,k8s_components_registration.go,server/cmd/main.goRelationshipsPath),server/policies/*_test.go,mesheryctl registry generate/updateflag defaults,Makefile, Dockerfiles,.github/workflows/{model-generator,rego-lint-and-test}.yml,.github/labeler.yml, issue templates, and docs..github/workflows/build-and-release.ymlsparse-checkout exclusion (!/server/meshmodel).server/meshmodel; unaffected. (meshery-cloud's ownmeshmodels/data dir is independent and not part of this rename.)