From 51b7a2fb23495118ce1b960b240b52465e6ddb39 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 6 Jun 2024 13:43:34 +0000 Subject: [PATCH] zilencer: Do not error on old stats which we no longer have. --- zilencer/views.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/zilencer/views.py b/zilencer/views.py index b5e5498eac..3991154dca 100644 --- a/zilencer/views.py +++ b/zilencer/views.py @@ -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 ( - row["property"] not in COUNT_STATS - or row["property"] in BOUNCER_ONLY_REMOTE_COUNT_STAT_PROPERTIES + # 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"]))