Closed Bug 1523272 Opened 9 months ago Closed 8 months ago

Use ClearDataService to clear site data in SiteDataManager.jsm

Categories

(Firefox :: Preferences, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: johannh, Assigned: johannh)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

This is one of the last remaining "DIY" data cleaners in Firefox.

These tests used to mock out the SiteDataManager to test only the UI for things
like removing site data or sorting. This bug breaks that possibility, because
the SiteDataManager no longer uses its internal data to remove site data but
delegates the logic to ClearSiteDataService.

I don't think it's a loss, that mocking was always a little weird.

Pushed by jhofmann@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7250b9f956b6
Use ClearDataService to clear site data in SiteDataManager.jsm. r=baku
https://hg.mozilla.org/integration/autoland/rev/8fbf00832008
Add unit tests for the SiteDataManager. r=baku
https://hg.mozilla.org/integration/autoland/rev/ddf39b3e96df
Remove mock code from about:preferences siteData tests. r=baku

So adding multiple pieces of site data with a few seconds of delay is surprisingly hard to get right. I'm going to remove the sort-by-date assertions and file a follow-up bug. This is really a lot of effort for an otherwise quite straightforward assertion (sorting the thing still works) and I don't think it should block landing.

Flags: needinfo?(jhofmann)
Pushed by jhofmann@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bf2ec5cdc33b
Use ClearDataService to clear site data in SiteDataManager.jsm. r=baku
https://hg.mozilla.org/integration/autoland/rev/bbd8f0b2e3b2
Add unit tests for the SiteDataManager. r=baku
https://hg.mozilla.org/integration/autoland/rev/80d103201d1d
Remove mock code from about:preferences siteData tests. r=baku

Backed out 3 changesets (Bug 1523272) for ES Linut failure.

Push with failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=80d103201d1da15230b393da7c7a35735336c0dc&selectedJob=228423141

Backout link: https://hg.mozilla.org/integration/autoland/rev/8d5ede86ee6e538ef5154a64d8bc20eff4e057e0

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=228423141&repo=autoland&lineNumber=287

[task 2019-02-14T16:02:32.218Z] New python executable in /builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/_virtualenvs/init/bin/python2.7
[task 2019-02-14T16:02:32.218Z] Also creating executable in /builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/_virtualenvs/init/bin/python
[task 2019-02-14T16:02:33.837Z] Installing setuptools, pip, wheel...done.
[task 2019-02-14T16:02:34.996Z] running build_ext
[task 2019-02-14T16:02:34.996Z] building 'psutil._psutil_linux' extension
[task 2019-02-14T16:02:34.996Z] creating build
[task 2019-02-14T16:02:34.996Z] creating build/temp.linux-x86_64-2.7
[task 2019-02-14T16:02:34.996Z] creating build/temp.linux-x86_64-2.7/psutil
[task 2019-02-14T16:02:34.996Z] x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_common.o
[task 2019-02-14T16:02:34.996Z] x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_posix.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o
[task 2019-02-14T16:02:34.996Z] x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_linux.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o
[task 2019-02-14T16:02:34.996Z] creating build/lib.linux-x86_64-2.7
[task 2019-02-14T16:02:34.996Z] creating build/lib.linux-x86_64-2.7/psutil
[task 2019-02-14T16:02:34.996Z] x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/psutil/_psutil_common.o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o -o build/lib.linux-x86_64-2.7/psutil/_psutil_linux.so
[task 2019-02-14T16:02:34.996Z] building 'psutil._psutil_posix' extension
[task 2019-02-14T16:02:34.997Z] x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_common.o
[task 2019-02-14T16:02:34.997Z] x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_posix.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o
[task 2019-02-14T16:02:34.997Z] x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/psutil/_psutil_common.o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o -o build/lib.linux-x86_64-2.7/psutil/_psutil_posix.so
[task 2019-02-14T16:02:34.997Z] copying build/lib.linux-x86_64-2.7/psutil/_psutil_linux.so -> psutil
[task 2019-02-14T16:02:34.997Z] copying build/lib.linux-x86_64-2.7/psutil/_psutil_posix.so -> psutil
[task 2019-02-14T16:02:34.997Z]
[task 2019-02-14T16:02:34.997Z] Error processing command. Ignoring because optional. (optional:packages.txt:comm/build/virtualenv_packages.txt)
[task 2019-02-14T16:08:05.688Z] TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/browser/components/preferences/in-content/tests/siteData/browser_siteData3.js:148:7 | 'lastAccessedCol' is assigned a value but never used. (no-unused-vars)
[taskcluster 2019-02-14 16:08:06.354Z] === Task Finished ===
[taskcluster 2019-02-14 16:08:06.354Z] Unsuccessful task run with exit code: 1 completed in 661.016 seconds

Flags: needinfo?(jhofmann)
Flags: needinfo?(jhofmann)
Pushed by jhofmann@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5f30ff274306
Use ClearDataService to clear site data in SiteDataManager.jsm. r=baku
https://hg.mozilla.org/integration/autoland/rev/4858888463e0
Add unit tests for the SiteDataManager. r=baku
https://hg.mozilla.org/integration/autoland/rev/143b9e605ff0
Remove mock code from about:preferences siteData tests. r=baku
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
Depends on: 1532203
No longer depends on: 1532203
Regressions: 1532203
You need to log in before you can comment on or make changes to this bug.