Skip building the project for the SQL validation if it isn't needed#831
Skip building the project for the SQL validation if it isn't needed#831jsnb-devoted wants to merge 35 commits intospectacles-ci:masterfrom
Conversation
DylanBaker
left a comment
There was a problem hiding this comment.
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_modelsAPI call if the explores argument is provided to thespectacles sqlcommand.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
exploresargument 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