Closed Bug 2017105 Opened 6 months ago Closed 2 months ago

Change binary tree of CombinedProviders to one single provider instance

Categories

(Firefox :: Enterprise Policies, task)

task

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: janika, Assigned: janika)

References

Details

Attachments

(1 file)

Quoting :mossop: from https://github.com/mozilla/enterprise-firefox/pull/321#discussion_r2798394143

[...] Instead of having CombinedProvider merge two policies it could instead merge any number of policies. Then instead of a binary tree of policy providers there would just be a single CombinedProfiler holding all the real providers and it would be able to merge them all in a single operation.

Summary: Refactor CombinedProvider → Change binary tree of CombinedProviders to one single provider instance
Blocks: 2049327
No longer blocks: 2015808
Component: Firefox → Enterprise Policies
Product: Enterprise Products → Firefox
Assignee: nobody → jneuberger
  • Add a PoliciesProvider base class holding the shared _policies/_failed state
    and the policies/hasPolicies/failed getters, and have the JSON, Windows GPO,
    and macOS providers extend it.
  • Rework CombinedProvider to hold an ordered list of providers. Providers are
    pushed lowest-to-highest precedence and mergePolicies() combines their
    top-level policies via Object.assign, so a later provider wins on conflicting
    keys. CombinedProvider.failed now reflects whether any provider failed,
    rather than being hardcoded to false.
  • Rename _chooseProvider to _buildProvider: it always builds a single
    CombinedProvider, pushing the JSON provider first and the platform provider
    (if any) last, preserving the existing "platform overrides JSON" behavior.
Pushed by jneuberger@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/b8146b340b10 https://hg.mozilla.org/integration/autoland/rev/2e28970e8cbb Change binary tree of CombinedProviders to one single provider instance r=mkaply,mossop
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
QA Whiteboard: [qa-triage-done-c155/b154]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: