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-323] [Bug] Generic test names collide when same args but different config is used #4830

Closed
1 task done
judahrand opened this issue Mar 6, 2022 · 3 comments
Closed
1 task done
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@judahrand
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

If for example there are two different tests which are the same a part from their configs only the first will run due to a naming collision. An example of this might be:

- not_null:
    where: color = 'red'
- not_null:
    where: color = 'blue'

Expected Behavior

Both tests should name and have different names.

Steps To Reproduce

Run the integration tests in #4829 without the commit which fixes the issue.

Relevant log output

No response

Environment

- OS:
- Python:
- dbt:

What database are you using dbt with?

No response

Additional Context

No response

@judahrand judahrand added bug Something isn't working triage labels Mar 6, 2022
@github-actions github-actions bot changed the title [Bug] Generic test names collide when same args but different config is used [CT-323] [Bug] Generic test names collide when same args but different config is used Mar 6, 2022
@emmyoop
Copy link
Member

emmyoop commented Mar 11, 2022

Thanks for opening up this issue @judahrand. It's actually a duplicate of #4102. There's an excellent write up of our thinking on this and a workaround for the time being.

I do have one clarifying question from your write up - are you experiencing tests getting silently skipped due to the overlapping names or do you experience an error letting you know about the name collision? As part of that answer, can you share what version of dbt-core you're using?

Unfortunately I won't be able to accept the PR you submitted but I really appreciate you taking the time to dig in to the problem!

@emmyoop emmyoop removed the triage label Mar 11, 2022
@judahrand
Copy link
Author

are you experiencing tests getting silently skipped due to the overlapping names

Yes, tests being silently skipped (at least on 0.21.1).

@emmyoop
Copy link
Member

emmyoop commented Mar 11, 2022

Ah, yes, that's expected then. In 1.0 we start to throw exceptions so that the tests no longer silently fail. While it doesn't fix the root of the issue, it does make what's happening more clear so that no tests potentially fail "silently".

I'm going to close this issue as a duplicate for now but I encourage you to contribute to the conversation over in #4102 if you have anything you would like to add!

@emmyoop emmyoop closed this as completed Mar 11, 2022
@emmyoop emmyoop added the duplicate This issue or pull request already exists label Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants