[registry] Completion logs get mixed up during concurrent model generation
- Dominant language
- Go
- Stars
- 223
- Forks
- 225
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 1
Description
### Current Behavior
**Related issue in meshery:** https://github.com/meshery/meshery/issues/11036
When model generation runs for many models at once (via `InvokeGenerationFromSheetWithOptions`), the completion logs on stdout get mixed up.
Example of what users see:
Current model: jx-app-flagger
extracted 11 components for Jenkins Operator (jenkins-operator)
Current model: jx-app-kubeless
extracted 3 components for Jx App Flagger (jx-app-flagger)
The `Current model:` line and the `extracted N components for...` line don't always belong to the same model, which makes the output hard to follow.
This shows up when running `mesheryctl registry generate` because mesheryctl calls into meshkit — but the logging itself happens inside meshkit.
**Where in the code:** `registry/model.go`
- `InvokeGenerationFromSheetWithOptions` — completion logs after component generation (~lines 1013–1014)
- `GenerateDefsForCoreRegistrant` — same pattern for meshery registrant models (~lines 1161–1173)
Meshkit processes up to 20 models in parallel (`semaphore.NewWeighted(20)`). When each model finishes, it logs two separate lines (`Current model:` and `extracted ... components for ...`) from concurrent goroutines with nothing keeping those lines together.
### Expected Behavior
Each model's completion log should stay together and be readable — the model name in `Current model:` should match the model in the `extracted` line right below it.
### Environment
- **Host OS:** Linux (WSL2) — affects any OS running `mesheryctl registry generate`
- **Platform:** N/A (CLI / local generation; Docker or Kubernetes not required)
- **Meshery Server Version:** N/A
- **Meshery Client Version:** mesheryctl (uses meshkit v1.0.16+)
Contributor guide
Assessment
This issue has not been assessed yet.