Closed Bug 1449226 Opened 2 years ago Closed 2 years ago

Add better debug information for GPO

Categories

(Firefox :: Enterprise Policies, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 61
Tracking Status
firefox60 --- fixed
firefox61 --- fixed

People

(Reporter: mkaply, Assigned: mkaply)

Details

Attachments

(1 file)

For debugging GPO issues, it would be handy if we had the JSON that the GPO generated.

So I'm going to add a debug only output of the JSON after parsing the GPO.
Status: NEW → ASSIGNED
Comment on attachment 8964715 [details]
Bug 1449226 - Add better debug information for GPO.

https://reviewboard.mozilla.org/r/233434/#review239470

So, I've been thinking about this.. The issue is that the JSON.stringify() will always run, indepedent if it's going to be logged or not, and that seems a waste to always do this operation.

So, two suggestions:
1 - just keep this patch locally for you
2 - first, check if `log._maxLogLevel == "debug"` to see if this will actually be logged.

Option 2 looks a bit of a hack, but I think it's acceptable, if you think that this will be useful for others.
> So, I've been thinking about this.. The issue is that the JSON.stringify() will always run, indepedent if it's going to be logged or not, and that seems a waste to always do this operation.

Good point. I do think this is really useful, especially for testing, so I'll add the check.
Comment on attachment 8964715 [details]
Bug 1449226 - Add better debug information for GPO.

https://reviewboard.mozilla.org/r/233434/#review239792
Attachment #8964715 - Flags: review?(felipc) → review+
Pushed by mozilla@kaply.com:
https://hg.mozilla.org/integration/autoland/rev/8d070df4285e
Add better debug information for GPO. r=Felipe
https://hg.mozilla.org/mozilla-central/rev/8d070df4285e
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Comment on attachment 8964715 [details]
Bug 1449226 - Add better debug information for GPO.

Approval Request Comment
[Feature/Bug causing the regression]: Improve debugging for GPO
[User impact if declined]: Difficult for test to debug HPO
[Is this code covered by automated tests?]: No
[Has the fix been verified in Nightly?]: Yes
[Needs manual test from QE? If yes, steps to reproduce]: No
[List of other uplifts needed for the feature/fix]: Non
[Is the change risky?]: No
[Why is the change risky/not risky?]: Debug only
[String changes made/needed]:

I know this seems a weird one for uplift, but it's very helpful when we're debugging the GPO code.
Attachment #8964715 - Flags: approval-mozilla-beta?
Comment on attachment 8964715 [details]
Bug 1449226 - Add better debug information for GPO.

Make GPO debugging easier for the policy engine work. Approved for 60.0b11.
Attachment #8964715 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.