Open FrankTub opened 1 month ago
Hi @FrankTub , I think this can actually be expected behavior... can you explain why you needed the same test with the same params on the same table / column?
@ellakz , I see I forgot the essential part of my example. I have a where condition in both tests that are opposites. So the example would be:
version: 2
models:
- name: sampleb
meta:
owner: ["someone_who_should_solve_this"]
data_tests:
- dbt_utils.expression_is_true:
name: "blabla"
meta:
description: 'Some more blabla!'
expression: "1 != 1"
where: "state = 'active_lease'"
tags: ['data-quality', 'manual_contract_export']
- dbt_utils.expression_is_true:
name: "blabla3"
meta:
description: 'Some more blabla about blabla3'
expression: "1 != 1"
where: "state != 'active_lease'"
tags: ['data-quality', 'manual_contract_export']
So the name of the test is unique. It should go to the same channel, however I would expect both test results to be there.
Describe the bug
We have several tests on several models. We have tagged these tests like below. For example:
Not in all cases we receive the error where we would expect them to receive (in Microsoft Teams) when we sent the alert with
edr monitor --select tag:invoices
. However, we will still see the failed test result in user interface that is generated as we would expect.To Reproduce
1) Create a model with two tests, with a tag on test level, both should have the same tag. Something like:
2) Create some dummy data in your dbt model
3) Run
dbt test -s sampleb
4) Run
edr monitor --select tag:manual_contract_export
and verify that both outputs should be sent5) Verify that only one of the failed test is sent to your alerting system (Slack/Teams). This is not as expected.
6) Verify in UI that both failed tests exists, which is as expected.
Expected behavior
All failed tests should be sent as alert to (Slack/Teams).
Screenshots
Output of
edr monitor
:Only one alert in Teams (don't think this requires any additional print screen).
Both tests show up in the UI.
Environment (please complete the following information):
0.15.1
0.15.2
dbt-core 1.8.4
+dbt-postgres 1.8.2
Additional context
N/A
Would you be willing to contribute a fix for this issue?
Depends on severity of the issue