Closed Bug 1451040 Opened 6 years ago Closed 6 years ago

Update JSON dumps of remote settings regularly

Categories

(Firefox :: Remote Settings Client, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Future
Tracking Status
firefox62 --- fixed

People

(Reporter: leplatrem, Assigned: leplatrem)

References

Details

Attachments

(1 file)

Currently, we have JSON dumps of the blocklist settings in https://searchfox.org/mozilla-central/source/services/blocklists

This provides defaults to use if the server has no data (or hasn't done the fetch yet) and reduces the amount of entries to download on first sync.

We would need to setup a task/bot/? to update those files regularly using the latest content available server. 

Something similar is already done for blocklist.xml: https://searchfox.org/mozilla-central/commit/028cd8342899357d80fafba2d528a0fd5819e316

How could you proceed to setup this?

Thanks!
See Also: → 1451050
Component: Blocklisting → Remote Settings Client
Product: Toolkit → Firefox
Target Milestone: --- → Future
Version: 57 Branch → Trunk
Assignee: nobody → mathieu
Depends on: 1451050
Comment on attachment 8976090 [details]
Bug 1451040 - Download remote settings dumps regularly

Hi Simon!
I saw you were the latest editor on this script :) 
Are you in charge of this taskcluster job?

In Bug 1257565 we'll get rid of blocklist XML in favor of JSON dumps. We want to update them regularly.

Would you be willing to review/test this patch please?

Thanks!

(Also, first we need Bug 1451050 to land, for dumps to be present in services/settings/dumps)
Attachment #8976090 - Flags: feedback?(sfraser)
Comment on attachment 8976090 [details]
Bug 1451040 - Download remote settings dumps regularly

https://reviewboard.mozilla.org/r/244278/#review251332

`./mach lint -l shellcheck` has some linting errors that will need fixing. 
You will also need to edit runme.sh if you'd like the parameters to be used, and `taskcluster/ci/repo-update/kind.yml` to activate it. Thanks!

::: taskcluster/docker/periodic-updates/scripts/periodic_file_updates.sh:445
(Diff revision 2)
>  }
>  
> +# Copies new remote settings dump files in place, and commits them.
> +function commit_remote_settings_files {
> +  cd "${BASEDIR}"
> +  cp -a ${REMOTE_SETINGS_OUTPUT}/* ${REPODIR}${REMOTE_SETTINGS_DIR}

Typo here, SETINGS should be SETTINGS.
Attachment #8976090 - Flags: review-
Comment on attachment 8976090 [details]
Bug 1451040 - Download remote settings dumps regularly

https://reviewboard.mozilla.org/r/244278/#review251838

Looks good, go for it.
Attachment #8976090 - Flags: review?(sfraser) → review+
Keywords: checkin-needed
Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3cdec5d6440d
Download remote settings dumps regularly r=sfraser
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/3cdec5d6440d
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Seeing task failures like https://tools.taskcluster.net/groups/CycLNNp6RfS0GsVlkyVFvQ/tasks/cVi2QecTRuGFBfUVbvqXPg/runs/0/logs/public%2Flogs%2Flive.log 

+ cp -a '/home/worker/data/remote-settings.out/*' mozilla-central/services/settings/dumps
cp: cannot stat '/home/worker/data/remote-settings.out/*': No such file or directory
Flags: needinfo?(mathieu)
How would you explain that we have a number of `mkdir -p` instructions of /home/worker/data/remote-settings.out ?
And that the .diff command does not fail ?

I'm lost :(
Flags: needinfo?(mathieu) → needinfo?(sfraser)
The remote-settings.diff artifact has a lot of text in it, so it looks like the diff correctly reported some content, and returned 0.

Looking at this line:
cp -a "${REMOTE_SETTINGS_OUTPUT}/*" "${REPODIR}${REMOTE_SETTINGS_DIR}"

I think it should be:

"${REMOTE_SETTINGS_OUTPUT}"/* 

That way it's not looking for a literal '*' as a filename
Flags: needinfo?(sfraser)
Depends on: 1465254
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: