-
Notifications
You must be signed in to change notification settings - Fork 35
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
Skip building the project for the SQL validation if it isn't needed #831
base: master
Are you sure you want to change the base?
Skip building the project for the SQL validation if it isn't needed #831
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jsnb-devoted. Thanks for splitting this out.
While I totally understand how this makes sense for your use case, I think it probably leads to some complications on our end, particularly for how this works in the hosted application.
Any run of Spectacles is typically scoped to a single project (via the --project
flag). In a world where we don't build the project and just take explores directly from the filters, you could conceivably be testing explores from multiple different projects (whether they import each other or not). This behaviour isn't necessarily problematic in and of itself, but it would probably need to come with a broader rethinking of how we scope each validator at the project level. I'd be open to exploring this, but I think I'd need @joshtemple's input and we would probably need to work at it a little. Happy to do so, but for transparency we likely won't have time to work on it for at least a few weeks.
881d184
to
f5c5b3c
Compare
…m:jsnb-devoted/spectacles into devoted-sql-validation-skip-build-project
Change description
Updates the SQL validation check to skip the
lookml_models
API call if the explores argument is provided to thespectacles sql
command.A non cache hit call to this API takes 20+ minutes to return and in cases where we have made the determination of what explores we want to test -- the API isn't actually necessary.
This change effectively detects whether the
explores
argument has been provided and if the parameters contain any wildcard selections. If the arguments are single explores (my_model/my_explore
) then it skips the API call and builds project with just the provided models/explores.Type of change
Related issues
Checklists
Security
Code review