Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DevDiagnostics - Move the enablement of local watson collection to a separate process #3835

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

timkur
Copy link
Contributor

@timkur timkur commented Sep 11, 2024

Summary of the pull request

The original implementation to enable local WER collection for an app involved having to relaunch DevDiagnostics elevated. This lead to some clumsy UX...

image

This cleans up the UX a bit, and to enable/disable local WER collection, will launch a separate app that will require a UAC.

image

It's not perfect yet, and definitely looking to Design to help clean this up further.

References and relevant issues

Detailed description of the pull request / Additional comments

To help facilitate some code sharing between the standalone exe and DevDiagnostics, I ended up creating a shared WERUtils.cs that was used to read/enable/disable local cab collection.

Validation steps performed

Enabled/disabled WER collection. Confirmed Narrator works for the updates (I end up having Narrator read the tooltip for the button when the user selects it).

PR checklist


namespace DevHome.DevDiagnostics.Helpers;

internal sealed class WERUtils
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No exception handling in this class, nor in its caller...?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, if it fails, something bad has happened... not much we can do to recover.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but log before we failfast?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure where/what I would log. If I'm unable to read the registry, the exception will bubble up to either DevDiagnostics or EnableLocalCabCollection and result in a Watson crash.

Same goes with the writing.... it would fail if this is called from a medium IL context, but should work elevated. If I'm wrong, there will be a Watson crash to track the failure.

Copy link
Contributor

@jaholme jaholme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@timkur timkur merged commit e3a7e1e into main Sep 11, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local WER collection toggle vs Change button is confusing
3 participants