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

[CT-1395] [Feature] Make tests fail if model is not found #6133

Closed
3 tasks done
pevidex opened this issue Oct 25, 2022 · 5 comments
Closed
3 tasks done

[CT-1395] [Feature] Make tests fail if model is not found #6133

pevidex opened this issue Oct 25, 2022 · 5 comments
Labels
enhancement New feature or request good_first_issue Straightforward + self-contained changes, good for new contributors! help_wanted Trickier changes, with a clear starting point, good for previous/experienced contributors

Comments

@pevidex
Copy link

pevidex commented Oct 25, 2022

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Currently, tests for tables that are not materialized and are not being referenced by other tables are skipped.
Let's say we have a table called table_1 and a developer changes its name to table_2 and runs dbt test. The tests for table_2 will be skipped with following warning:

The selection criterion 'source:source_name.table_2' does not match any nodes

It would be nice if we could configure the tests to fail instead so we get visibility on possible typos/mistakes.

Describe alternatives you've considered

I'm aware we can use --warn-errors to convert warnings to errors. However, this will be applied to all the warnings in the project which means non-related warnings will start to be thrown as errors when we want to keep them as warnings.

Who will this benefit?

We had an issue where a developer, by mistake, changed the name of one model and the tests started being skipped for that specific model. This will benefit users who need to be notified of this kind of mistakes.

Are you interested in contributing this feature?

Yes

Anything else?

No response

@pevidex pevidex added enhancement New feature or request triage labels Oct 25, 2022
@github-actions github-actions bot changed the title [Feature] Make tests fail if model is not found [CT-1395] [Feature] Make tests fail if model is not found Oct 25, 2022
@lostmygithubaccount
Copy link
Contributor

hi @pevidex, thanks for opening this! if you're willing to contribute this PR we can help you through it

@pevidex
Copy link
Author

pevidex commented Oct 26, 2022

@lostmygithubaccount I intend to contribute and I'll do so in the following days!

@jtcohen6 jtcohen6 added triage and removed triage labels Oct 31, 2022
@jtcohen6
Copy link
Contributor

@lostmygithubaccount @pevidex My inclination is to treat this as a specific use case, that would be best solved by the general-purpose approach proposed in #6165

@jtcohen6
Copy link
Contributor

jtcohen6 commented Nov 3, 2022

Going to close this in favor of solving in a more general-purpose way!

@jtcohen6 jtcohen6 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 3, 2022
@pevidex
Copy link
Author

pevidex commented Nov 3, 2022

My inclination is to treat this as a specific use case, that would be best solved by the general-purpose approach proposed in #6165

Makes sense, if we're adding a new flag for every use case of this kind, we'll end up bloating the tool. A more generic approach sounds better 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good_first_issue Straightforward + self-contained changes, good for new contributors! help_wanted Trickier changes, with a clear starting point, good for previous/experienced contributors
Projects
None yet
Development

No branches or pull requests

3 participants