Skip to content

registry: track meshery server/meshmodel relocation to server/models#1040

Merged
miacycle merged 1 commit into
masterfrom
update-meshmodel-path-to-models
Jun 27, 2026
Merged

registry: track meshery server/meshmodel relocation to server/models#1040
miacycle merged 1 commit into
masterfrom
update-meshmodel-path-to-models

Conversation

@miacycle

Copy link
Copy Markdown
Member

Symptom

registry.ProcessRelationships has a hardcoded fallback default path of ../../meshery/server/meshmodel (registry/relationship.go:115), used when the function is invoked without an explicit path. The meshery server's model data directory is being relocated and renamed from server/meshmodel to server/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/models so relationship generation resolves model versions from the new location when no explicit path is supplied. The normal mesheryctl registry generate flow always passes an explicit path, 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):

  • meshery: source constants (server/models/seed_models.go ModelsPath/PoliciesPath, k8s_components_registration.go, server/cmd/main.go RelationshipsPath), server/policies/*_test.go, mesheryctl registry generate/update flag defaults, Makefile, Dockerfiles, .github/workflows/{model-generator,rego-lint-and-test}.yml, .github/labeler.yml, issue templates, and docs.
  • meshery-extensions: .github/workflows/build-and-release.yml sparse-checkout exclusion (!/server/meshmodel).
  • meshery-cloud / layer5 / meshery.io: no references to meshery's server/meshmodel; unaffected. (meshery-cloud's own meshmodels/ data dir is independent and not part of this rename.)

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>
Copilot AI review requested due to automatic review settings June 27, 2026 01:30
@miacycle miacycle merged commit dfa2a3c into master Jun 27, 2026
3 checks passed
@miacycle miacycle deleted the update-meshmodel-path-to-models branch June 27, 2026 01:30

@gemini-code-assist gemini-code-assist 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.

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.

Copilot AI 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.

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/meshmodel to ../../meshery/server/models.

Comment thread registry/relationship.go
Comment on lines 113 to 116
func ProcessRelationships(relationshipCSVHelper *RelationshipCSVHelper, spreadsheetUpdateChan chan RelationshipCSV, path string) {
if path == "" {
path = "../../meshery/server/meshmodel"
path = "../../meshery/server/models"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants