meshery / meshery/meshkit

Recursive Directory Search for Model Generation

Open
#726 5 comments 0 reactions 1 assignee Claimed by @ShigrafS View on GitHub
issue/willfix kind/enhancement
Dominant language
Go
Stars
223
Forks
225
Avg merge
7d 1h
Merged PRs (30d)
1

Description

### Current Behavior

The component generation logic in Meshery processes only files directly in the specified directory when generating models. For repositories with complex directory structures, this requires precise path specification to each set of component definition files, increasing configuration fragility and maintenance burden.
### Desired Behavior

Update the component generation logic to recursively search all files under a specified directory. This would allow users to simply point to any level of a git repository, and Meshery would automatically discover all relevant component definition files regardless of their location in the directory tree.

### Implementation

The enhancement should:
1. Modify the model/component generation logic in the MeshKit repository to support recursive directory traversal
2. Add configuration options to:
- Enable/disable recursive search (default: enabled)
- Set maximum depth for recursion (default: unlimited)
- Filter for specific file patterns (default: *.yaml, *.yml, *.json)
3. Maintain backward compatibility with existing component generation workflows
4. Update relevant CLI commands and API endpoints to support this enhanced functionality

### Acceptance Tests

1. Ability to register components from a deeply nested directory structure by specifying only the root directory
Successfully generate models from complex repositories where component definitions are distributed across multiple subdirectories
2. Performance remains acceptable when processing large repositories with many files
3. Clear error messages when issues occur during recursive directory processing
4. Documentation updated to reflect new functionality

### Mockups

---
### Contributor [Guides](https://docs.meshery.io/project/contributing) and [Handbook](https://layer5.io/community/handbook)
- 🛠 [Meshery Build & Release Strategy](https://docs.meshery.io/project/contributing/build-and-release)
- 📚 [Instructions for contributing to documentation](https://github.com/meshery/meshery/blob/master/CONTRIBUTING.md#documentation-contribution-flow)
- Meshery documentation [site](https://docs.meshery.io/) and [source](https://github.com/meshery/meshery/tree/master/docs)
- 🎨 Wireframes and designs for Meshery UI in [Figma](https://www.figma.com/file/SMP3zxOjZztdOLtgN4dS2W/Meshery-UI)
- 🙋🏾🙋🏼 Questions: [Discussion Forum](http://discuss.meshery.io) and [Community Slack](https://slack.meshery.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.