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

Enable mechanism for some control over correlation #2577

Merged
merged 6 commits into from
Oct 10, 2022

Conversation

JohnMcPMS
Copy link
Member

@JohnMcPMS JohnMcPMS commented Oct 5, 2022

Change

The primary change is to enable some control over the correlation functionality so that different situations can behave differently. Specifically, the utility functionality of metadata collection, which is intended to be run in a "clean room" environment, can assume that a single change to ARP represents the target entry.

In addition, this change enables diagnostic information to be output by the metadata collection. This includes the reason that an entry was chosen, and the confidence value for various possible entries if the heuristic matching is attempted.

Finally, the correlation testbed is enhanced to run the metadata collection, allowing it to be tested alongside the inline correlation. The scripts have various improvements, such as a -Wait to leave the sandbox active and forcing the CSV to be output with a UTF8-BOM (Excel requires the BOM in order to open the CSV as UTF8).

Microsoft Reviewers: Open in CodeFlow

@JohnMcPMS JohnMcPMS requested a review from a team as a code owner October 5, 2022 21:39
if ($MetadataCollection)
{
$wingetUtilPath = Join-Path $PSScriptRoot "WinGetUtil.dll"
$installAndCorrelationExpression = -join($installAndCorrelationExpression, ' -meta "', $wingetUtilPath, '" -sys32 "', $System32Path,'"')
Copy link
Contributor

Choose a reason for hiding this comment

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

'

nit: space

// Number of changed ARP entries that match the installed package
size_t CountOfIntersectionOfChangesAndMatches{};

ARPCorrelationResult& operator=(ARPHeuristicsCorrelationResult&& other)
Copy link
Contributor

Choose a reason for hiding this comment

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

ARPCorrelationResult& operator=(ARPHeuristicsCorrelationResult&& other)

will this be misused?

Copy link
Member Author

Choose a reason for hiding this comment

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

Honestly, I was surprised it didn't work out of the box. The goal is to be able to assign just the base portion of the object, which seems very intuitive to me.

Copy link
Contributor

@yao-msft yao-msft left a comment

Choose a reason for hiding this comment

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

:shipit:

@JohnMcPMS JohnMcPMS merged commit 685a06a into microsoft:master Oct 10, 2022
@JohnMcPMS JohnMcPMS deleted the match-weights branch October 10, 2022 21:12
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.

2 participants