Skip to content

Recursive Directory Search for Model Generation #726

Open
@itsBaivab

Description

@itsBaivab

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)
  1. Maintain backward compatibility with existing component generation workflows
  2. 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 and Handbook

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/willfixThis issue will be worked onkind/enhancementImprovement in current feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions