From dd8b31f77c84bbcc8c7d25a6324eb59cb908b8c2 Mon Sep 17 00:00:00 2001 From: Tim Huang Date: Wed, 4 Sep 2024 23:33:55 +0200 Subject: [PATCH] Update the nightly record if the filter_expression has changed. --- publish2cloud.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/publish2cloud.py b/publish2cloud.py index 3445597..d8c8732 100644 --- a/publish2cloud.py +++ b/publish2cloud.py @@ -170,6 +170,13 @@ def new_data_to_publish_to_remote_settings(config, section, new, version=None): # Check to see if update is needed on Remote Settings record = get_record_remote_settings(record_name) + if version is None: + # We need to check if the filter_expression needs to be updated for the + # nightly records. The filter_expression needs to be updated if the + # latest supported version has changed + if record.get('data')['filter_expression'] != f'env.version|versionCompare("{shared_state.latest_supported_version}.0a1") <= 0': + return True + return not (record and record.get('data')['Checksum'] == new['checksum'])