Hello good people. Out of a sudden we started to r...
# community-support
e
Hello good people. Out of a sudden we started to receive the following errors when trying to send elementary alerts to Slack
Copy code
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for PendingAlertSchema
updated_at
  none is not an allowed value (type=type_error.none.not_allowed)
Everything was fine for months and then this started to happen.
It is happening again: https://elementary-community.slack.com/archives/C02CTC89LAX/p1708200785293749 Yet full refresh of elementary tables doesn't help.
Copy code
select * from elementary.alerts_v2 where updated_at is null;
We always get records in this table with
updated_at
column set to null.
Broken records are always of type
source_freshness
e
Hi @Eugene Sobolev, did this happen after you upgraded to 0.14.0?
e
Hello @Ella Katz. Nope it started earlier. We got this error: https://elementary-community.slack.com/archives/C02CTC89LAX/p1699638115712809 And the upgrade to 0.14.0 was an attempt to fix it.
The issue had disappeared for a while. Then it came back. There is something fishy with the combination of dbt source freshness + edr monitor commands.
The most weird thing is that it started after a manual
dbt source freshness
run that I executed on my local machine. I though maybe there was some kind of a race condition or something.
I found the initial record that caused the problem
Copy code
analytics=# select * from elementary.alerts_source_freshness where alert_id = '0d853f1a-aff2-4d56-bef0-0b6fa591776e.source.analytics.booking.booking__annihilation_old';
-[ RECORD 1 ]---------------+--------------------------------------------------------------------------------------------------
alert_id                    | 0d853f1a-aff2-4d56-bef0-0b6fa591776e.source.analytics.booking.booking__annihilation_old
max_loaded_at               |
snapshotted_at              |
detected_at                 | 2024-02-16 13:21:51
max_loaded_at_time_ago_in_s |
status                      | runtime error
error                       | Database Error in source booking__annihilation_old (models/staging/booking/_booking__sources.yml)+
                            |   column "event_ts_minsk_time" does not exist in booking__annihilation_old
unique_id                   | source.analytics.booking.booking__annihilation_old
database_name               | analytics
schema_name                 | sources
source_name                 | booking
identifier                  | booking__annihilation_old
freshness_error_after       | {"count": null, "period": null}
freshness_warn_after        | {"count": null, "period": null}
freshness_filter            |
tags                        | []
meta                        | {}
owner                       | []
package_name                | analytics
path                        | models/staging/booking/_booking__sources.yml
alert_sent                  | f
suppression_status          | pending
sent_at                     |
e
Hi @Eugene Sobolev! We found the bug and will deploy a fix soon, this is caused by source freshness alerts
🔥 1
e
Terrific!
e
Hi @Eugene Sobolev, not sure when the version with the fix will be released but until then feel free to install elementary from this commit hash:
d0c78f691498ea0f26dd746fe3542e9904f4e086
e
Thank you Ella
p
Hi @Eugene Sobolev and @Ella Katz! I have the same issue, I tries to install the elementary from the above commit, but the installation fails. Did you manage to solve the problem, any updates related to the fix? thank you
e
Hi, a new version of the CLI and the package was released today - 0.14.1- you can simply install that now 🙂
p
Thanks for the reply - it seems that it works
e
Great! Glad to hear 🙂