Skip to content

Commit

Permalink
Merge pull request #209 from artines1/nightly-list-update
Browse files Browse the repository at this point in the history
Update the nightly record if the filter_expression has changed.
  • Loading branch information
artines1 authored Sep 5, 2024
2 parents c4a5a24 + dd8b31f commit 425c45d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions publish2cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])


Expand Down

0 comments on commit 425c45d

Please sign in to comment.