zilencer: Do not error on old stats which we no longer have.

This commit is contained in:
Alex Vandiver 2024-06-06 13:43:34 +00:00 committed by Alex Vandiver
parent 53c1c4d98f
commit 51b7a2fb23
1 changed files with 11 additions and 3 deletions

View File

@ -759,9 +759,17 @@ def validate_incoming_table_data(
) -> None:
last_id = get_last_id_from_server(server, model)
for row in rows:
if is_count_stat and (
# We are silent about stats not in COUNT_STATS which are
# in LOGGING_COUNT_STAT_PROPERTIES_NOT_SENT_TO_BOUNCER --
# these are stats we stopped recording, but old versions
# may still have and report.
if (
is_count_stat
and (
row["property"] not in COUNT_STATS
or row["property"] in BOUNCER_ONLY_REMOTE_COUNT_STAT_PROPERTIES
)
and row["property"] not in LOGGING_COUNT_STAT_PROPERTIES_NOT_SENT_TO_BOUNCER
):
raise JsonableError(_("Invalid property {property}").format(property=row["property"]))