Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore_patterns in config.yaml does not glob recursively #3507

Open
Bilbottom opened this issue Dec 12, 2024 · 0 comments
Open

ignore_patterns in config.yaml does not glob recursively #3507

Bilbottom opened this issue Dec 12, 2024 · 0 comments
Labels
Bug Something isn't working

Comments

@Bilbottom
Copy link

Warning

This might be a design choice. If it is, please close this 😋

Summary

The ignore_patterns configuration option in the config.yaml file takes a list of glob patterns.

However, the globbing isn't recursive: the pattern /**/ does not match any number of directories.

This might be a design choice, but it took me by surprise, as I'm used to /**/ matching zero or more directories.

Minimal working example

Consider a minimal SQLMesh project with the following structure:

config.yaml
models/
    models.sql
    domain/
        domain.sql
        user/
          user.sql

I've checked how SQLMesh ignores files by running sqlmesh info and checking the Models count in the console.

With ignore_patterns: [], SQLMesh finds 3 models as expected.

With ignore_patterns: ["models/*.sql"], SQLMesh finds 2 models as expected.

However, with ignore_patterns: ["models/**/*.sql"], SQLMesh still finds 2 models, whereas I was expecting it to find 0 models.

@izeigerman izeigerman added the Bug Something isn't working label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants