<@U088WCP3B4P> when running command like below ``...
# ask-elementary-ai
f
@kapa.ai when running command like below
Copy code
edr monitor --profiles-dir /tmp/production_data_quality_alerts.dq_alert_accounting_20251029113247 --filters tags:accounting --teams-webhook $TEAMS_WEBHOOK --profile-target default --days-back 1 --maximum-columns-in-alert-samples 25 --report-url $REPORT_URL
We sometimes run into an error, but can't reproduce it every time. The error:
Copy code
[2025-10-29, 11:39:47 UTC] {custom_operator.py:120} WARNING - on 1: ERROR:elementary.monitor.data_monitoring.alerts.data_monitoring_alerts:Could not send the alert - <class 'elementary.monitor.alerts.test_alert.TestAlertModel'>.
[2025-10-29, 11:39:47 UTC] {custom_operator.py:120} WARNING - on 2: ERROR:elementary.monitor.data_monitoring.alerts.data_monitoring_alerts:Could not send the alert - some_json_data
[2025-10-29, 11:39:47 UTC] {custom_operator.py:120} WARNING - INFO:elementary.monitor.fetchers.alerts.alerts:Update sent alerts
[2025-10-29, 11:39:47 UTC] {custom_operator.py:120} WARNING - DEBUG:elementary.clients.dbt.command_line_dbt_runner:Running dbt command run -s elementary_cli.update_alerts.update_sent_alerts --project-dir /usr/local/airflow/production_dbt_venv/lib/python3.11/site-packages/elementary/monitor/dbt_project --profiles-dir /tmp/production_data_quality_alerts.dq_alert_accounting_20251029113831 --target default --vars {"alert_ids": ["49016812-8833-45e3-9184-428cc8bfcbf7.test.beequip_etl_dbt.assert_net_receivable_less_or_equal_to_gross_receivable.9fa0cba7fb", "49016812-8833-45e3-9184-428cc8bfcbf7.test.beequip_etl_dbt.assert_balance_equals_cumulatives.5e73eef4f8"], "sent_at": "2025-10-29 11:39:32"}
[2025-10-29, 11:39:47 UTC] {custom_operator.py:133} ERROR - Command failed with exit code 1
How can we work around this error?
k
A message from kapa.ai
New message text here
f
@kapa.ai, we are running this on version
0.20.0
and use adapter
dbt-snowflake
. I verified and the return code is only raised to 1 after the sending of the alerts is already done. It is raised when trying to update the sent alerts. So I would guess this is a bug and I should open a github issue right?
k
A message from kapa.ai
Based on the knowledge sources, your analysis is correct: the error occurs after the alerts are sent, specifically when Elementary tries to update the sent alerts in the database. This pattern has been observed in other environments and adapters (e.g., Redshift), often due to issues with dbt command execution or database permissions, but there is no explicit mention of this exact issue with
dbt-snowflake
and Elementary version
0.20.0
in the provided sources. Since you are on a recent version and using a supported adapter, and the error is reproducible only at the update step (not during alert sending), it does suggest a potential bug or an edge case not yet documented. The knowledge sources recommend opening a GitHub issue when encountering such unexplained or potentially new bugs, especially if you can provide logs and a clear reproduction path [[dbt-redshift update issue](https://slack.com/archives/C02CTC89LAX/p1684173645049519)]. Recommendation: Yes, you should open a GitHub issue with all relevant details (logs, command, environment, and a description that the error occurs after successful alert sending, during the update of sent alerts). This will help the maintainers investigate and address the problem. If you need to expedite a workaround, also check that your Snowflake user has full update permissions on the alerts table, as permission issues have caused similar symptoms in other adapters [[dbt-redshift update issue](https://slack.com/archives/C02CTC89LAX/p1684173645049519)]. If you have more detailed logs or error messages, including those in your GitHub issue will be very helpful for the maintainers.