From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- .../docker/periodic-updates/scripts/getHSTSPreloadList.js | 8 ++++---- .../docker/periodic-updates/scripts/periodic_file_updates.sh | 12 +++++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'taskcluster/docker/periodic-updates/scripts') diff --git a/taskcluster/docker/periodic-updates/scripts/getHSTSPreloadList.js b/taskcluster/docker/periodic-updates/scripts/getHSTSPreloadList.js index aeaa29bc2d..b695f0dd90 100644 --- a/taskcluster/docker/periodic-updates/scripts/getHSTSPreloadList.js +++ b/taskcluster/docker/periodic-updates/scripts/getHSTSPreloadList.js @@ -160,16 +160,16 @@ function RedirectAndAuthStopper() {} RedirectAndAuthStopper.prototype = { // nsIChannelEventSink - asyncOnChannelRedirect(oldChannel, newChannel, flags, callback) { + asyncOnChannelRedirect() { throw Components.Exception("", Cr.NS_ERROR_ENTITY_CHANGED); }, // nsIAuthPrompt2 - promptAuth(channel, level, authInfo) { + promptAuth() { return false; }, - asyncPromptAuth(channel, callback, context, level, authInfo) { + asyncPromptAuth() { throw Components.Exception("", Cr.NS_ERROR_NOT_IMPLEMENTED); }, @@ -184,7 +184,7 @@ RedirectAndAuthStopper.prototype = { }; function fetchstatus(host) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { let xhr = new XMLHttpRequest(); let uri = "https://" + host.name + "/"; diff --git a/taskcluster/docker/periodic-updates/scripts/periodic_file_updates.sh b/taskcluster/docker/periodic-updates/scripts/periodic_file_updates.sh index f01f5cd9c3..4ab38dd799 100755 --- a/taskcluster/docker/periodic-updates/scripts/periodic_file_updates.sh +++ b/taskcluster/docker/periodic-updates/scripts/periodic_file_updates.sh @@ -318,7 +318,13 @@ function compare_remote_settings_files { remote_records_url="$REMOTE_SETTINGS_SERVER/buckets/${bucket}/collections/${collection}/changeset?_expected=${last_modified}" local_location_output="$REMOTE_SETTINGS_OUTPUT/${bucket}/${collection}.json" mkdir -p "$REMOTE_SETTINGS_OUTPUT/${bucket}" - ${WGET} -qO- "$remote_records_url" | ${JQ} '{"data": .changes, "timestamp": .timestamp}' > "${local_location_output}" + # We sort both the keys and the records in search-config-v2 to make it + # easier to read and to experiment with making changes via the dump file. + if [ "${collection}" = "search-config-v2" ]; then + ${WGET} -qO- "$remote_records_url" | ${JQ} --sort-keys '{"data": .changes | sort_by(.recordType, .identifier), "timestamp": .timestamp}' > "${local_location_output}" + else + ${WGET} -qO- "$remote_records_url" | ${JQ} '{"data": .changes, "timestamp": .timestamp}' > "${local_location_output}" + fi # 5. Download attachments if needed. if [ "${bucket}" = "blocklists" ] && [ "${collection}" = "addons-bloomfilters" ]; then @@ -415,10 +421,10 @@ function compare_mobile_experiments() { ( ${DIFF} fenix-experiments-old.json fenix-experiments-new.json; ${DIFF} focus-experiments-old.json focus-experiments-new.json ) > "${EXPERIMENTER_DIFF_ARTIFACT}" if [ -s "${EXPERIMENTER_DIFF_ARTIFACT}" ]; then + return 0 + else # no change return 1 - else - return 0 fi } -- cgit v1.2.3