Closed Bug 1491046 Opened Last year Closed 8 months ago

Add support for arbitrary preferences in policies

Categories

(Firefox :: Enterprise Policies, enhancement, P3)

62 Branch
enhancement

Tracking

()

RESOLVED FIXED
Firefox 68
Tracking Status
firefox68 --- fixed

People

(Reporter: mkaply, Assigned: mkaply)

References

Details

Attachments

(1 file, 1 obsolete file)

There are simply too many preferences to try to accommodate them all via individual preferences, so we're going to add support for some level of arbitrary default and locked preferences.

It will work like this:


"LockedPreferences": {
  "foo": "bar",
  "bar": true,
  "whee", 0
}

Plan is to have a list of allowed preferences.
I'm not working on this right now.
Status: ASSIGNED → NEW
Priority: P1 → P3
Attachment #9009773 - Attachment is obsolete: true

After some thought, I settled on one key, Preferences.

Any preferences set here are always locked. They should only be preferences that are accessible via about:config (not configurable by the user in the UI).

I started with three from bug 1466065.

Pushed by mozilla@kaply.com:
https://hg.mozilla.org/integration/autoland/rev/88a9c30783a6
Allow a whitelist of preferences via policy. r=Felipe,flod

Backed out changeset 88a9c30783a6 (Bug 1491046) for fetch.any.serviceworker.html failures

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=linux%2Cshippable%2Copt%2Cweb%2Cplatform%2Ctests%2Cwith%2Ce10s%2Ctest-linux32-shippable%2Fopt-web-platform-tests-e10s-4%2Cw-e10s%28wpt4%29&fromchange=d13bf5b0872ca507b911ce85dfe6aac071bb4cde&tochange=b7470e0dfb3eafbcae59551058760079400127e2&selectedJob=237729034

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

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

[task 2019-04-02T23:38:11.047Z] 23:38:11 INFO - TEST-START | /fetch/cross-origin-resource-policy/fetch.any.serviceworker.html
[task 2019-04-02T23:38:11.051Z] 23:38:11 INFO - Closing window 6442450945
[task 2019-04-02T23:38:11.450Z] 23:38:11 WARNING - Traceback (most recent call last):
[task 2019-04-02T23:38:11.450Z] 23:38:11 WARNING - File "/builds/worker/workspace/build/tests/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py", line 605, in _run
[task 2019-04-02T23:38:11.450Z] 23:38:11 WARNING - self.result = True, self.func(self.protocol, self.url, self.timeout)
[task 2019-04-02T23:38:11.450Z] 23:38:11 WARNING - File "/builds/worker/workspace/build/tests/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py", line 719, in do_testharness
[task 2019-04-02T23:38:11.450Z] 23:38:11 WARNING - self.script_resume % format_map, async=True)
[task 2019-04-02T23:38:11.450Z] 23:38:11 WARNING - File "/builds/worker/workspace/build/tests/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py", line 61, in execute_script
[task 2019-04-02T23:38:11.450Z] 23:38:11 WARNING - return method(script, new_sandbox=False, sandbox=None)
[task 2019-04-02T23:38:11.450Z] 23:38:11 WARNING - File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 1656, in execute_async_script
[task 2019-04-02T23:38:11.451Z] 23:38:11 WARNING - rv = self._send_message("WebDriver:ExecuteAsyncScript", body, key="value")
[task 2019-04-02T23:38:11.451Z] 23:38:11 WARNING - File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/decorators.py", line 26, in _
[task 2019-04-02T23:38:11.451Z] 23:38:11 WARNING - return func(*args, **kwargs)
[task 2019-04-02T23:38:11.451Z] 23:38:11 WARNING - File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 598, in _send_message
[task 2019-04-02T23:38:11.451Z] 23:38:11 WARNING - self._handle_error(err)
[task 2019-04-02T23:38:11.451Z] 23:38:11 WARNING - File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 618, in _handle_error
[task 2019-04-02T23:38:11.452Z] 23:38:11 WARNING - raise errors.lookup(error)(message, stacktrace=stacktrace)
[task 2019-04-02T23:38:11.452Z] 23:38:11 WARNING - JavascriptException: TypeError: window.__wptrunner_process_next_event is not a function
[task 2019-04-02T23:38:11.452Z] 23:38:11 WARNING - stacktrace:
[task 2019-04-02T23:38:11.454Z] 23:38:11 WARNING - @tests/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py:66:8
[task 2019-04-02T23:38:11.454Z] 23:38:11 WARNING - @tests/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py:67:8
[task 2019-04-02T23:38:11.454Z] 23:38:11 WARNING -
[task 2019-04-02T23:38:11.454Z] 23:38:11 WARNING -
[task 2019-04-02T23:38:11.458Z] 23:38:11 INFO - TEST-UNEXPECTED-ERROR | /fetch/cross-origin-resource-policy/fetch.any.serviceworker.html | TypeError: window.__wptrunner_process_next_event is not a function
[task 2019-04-02T23:38:11.458Z] 23:38:11 INFO - Traceback (most recent call last):
[task 2019-04-02T23:38:11.458Z] 23:38:11 INFO - File "/builds/worker/workspace/build/tests/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py", line 605, in _run
[task 2019-04-02T23:38:11.458Z] 23:38:11 INFO - self.result = True, self.func(self.protocol, self.url, self.timeout)
[task 2019-04-02T23:38:11.458Z] 23:38:11 INFO - File "/builds/worker/workspace/build/tests/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py", line 719, in do_testharness
[task 2019-04-02T23:38:11.458Z] 23:38:11 INFO - self.script_resume % format_map, async=True)
[task 2019-04-02T23:38:11.458Z] 23:38:11 INFO - File "/builds/worker/workspace/build/tests/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py", line 61, in execute_script
[task 2019-04-02T23:38:11.458Z] 23:38:11 INFO - return method(script, new_sandbox=False, sandbox=None)
[task 2019-04-02T23:38:11.458Z] 23:38:11 INFO - File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 1656, in execute_async_script
[task 2019-04-02T23:38:11.458Z] 23:38:11 INFO - rv = self._send_message("WebDriver:ExecuteAsyncScript", body, key="value")
[task 2019-04-02T23:38:11.458Z] 23:38:11 INFO - File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/decorators.py", line 26, in _
[task 2019-04-02T23:38:11.458Z] 23:38:11 INFO - return func(*args, **kwargs)
[task 2019-04-02T23:38:11.458Z] 23:38:11 INFO - File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 598, in _send_message
[task 2019-04-02T23:38:11.458Z] 23:38:11 INFO - self._handle_error(err)
[task 2019-04-02T23:38:11.458Z] 23:38:11 INFO - File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 618, in _handle_error
[task 2019-04-02T23:38:11.458Z] 23:38:11 INFO - raise errors.lookup(error)(message, stacktrace=stacktrace)
[task 2019-04-02T23:38:11.458Z] 23:38:11 INFO - JavascriptException: TypeError: window.__wptrunner_process_next_event is not a function
[task 2019-04-02T23:38:11.459Z] 23:38:11 INFO - stacktrace:
[task 2019-04-02T23:38:11.459Z] 23:38:11 INFO - @tests/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py:66:8
[task 2019-04-02T23:38:11.459Z] 23:38:11 INFO - @tests/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py:67:8
[task 2019-04-02T23:38:11.459Z] 23:38:11 INFO -
[task 2019-04-02T23:38:11.459Z] 23:38:11 INFO - TEST-INFO took 402ms
[task 2019-04-02T23:38:11.496Z] 23:38:11 INFO - PID 13797 | 1554248291481 Marionette INFO Stopped listening on port 2828
[task 2019-04-02T23:38:12.221Z] 23:38:12 INFO - Browser exited with return code 0
[task 2019-04-02T23:38:12.221Z] 23:38:12 INFO - PROCESS LEAKS None
[task 2019-04-02T23:38:12.222Z] 23:38:12 INFO - Closing logging queue

Flags: needinfo?(mozilla)

:mkaply it looks like your changes have turned an intermittent in a perma fail.

That makes no sense. These changes were completely confined to policy...

Flags: needinfo?(mozilla)
Pushed by nerli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6376d3063cdc
Allow a whitelist of preferences via policy. r=Felipe,flod

This happened because 176c43e7780a (that disables Bug 1540914) was merged to autoland only on the 3rd of April here: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=92b682ee0acc9f903480910e1aced6b8baa73ed9. Noemi relanded the bug.

Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
Duplicate of this bug: 1466065
You need to log in before you can comment on or make changes to this bug.