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

Support for out of process configuration clients #3363

Merged
merged 49 commits into from
Jun 29, 2023

Conversation

JohnMcPMS
Copy link
Member

@JohnMcPMS JohnMcPMS commented Jun 20, 2023

Change

The goal of this rather large change is to support out-of-process clients to configuration. This enables supported scenarios to not require shipping the entire PowerShell infrastructure, and instead leverage the one that is contained in our package.

The interface changes are breaking, but minimal. The goal is to remove the necessity for a processor to need the configuration module itself, while creating a single entry point that can be used for OOP cases (and many in-proc cases as well).

Validation

New tests are added for configuration via winget.exe, and the existing configuration unit tests were updated to support running both in and out of process (where appropriate).

Microsoft Reviewers: codeflow:open?pullrequest=#3363

JohnMcPMS added 30 commits May 18, 2023 23:30
…is enables scenarios where the resource information is not available from the repository to function.
@JohnMcPMS JohnMcPMS requested a review from a team as a code owner June 20, 2023 00:29
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

msftrubengu
msftrubengu previously approved these changes Jun 29, 2023
isPackaged: false
filter: "TestCategory=InProcess"

- template: templates/e2e-test.template.yml
parameters:
title: "COM API E2E Tests (Out-of-process)"
title: "Microsoft.Management.Deployment E2E Tests (Out-of-process)"
isPackaged: true
Copy link
Contributor

Choose a reason for hiding this comment

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

You could add comtrace pipeline variable that is always false so enabling can be done without changing the code

@@ -28,6 +29,21 @@ public class SetUpFixture
[OneTimeSetUp]
public void Setup()
{
if (TestContext.Parameters.Count == 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

My hero 😍

Factory();
~Factory();

// Determines if the reference count is 0.
Copy link
Contributor

Choose a reason for hiding this comment

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

is not 0?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is a boolean, you get to know both whether it is 0 AND whether it is not 0.

auto serverUser = wil::get_token_information<TOKEN_USER>();
IntegrityLevel serverIntegrityLevel = GetEffectiveIntegrityLevel();

ImpersonateCOMorRPCCaller impersonation;
Copy link
Contributor

Choose a reason for hiding this comment

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

I got confused here... can you add a comment or name this var startImpersonation?

@JohnMcPMS JohnMcPMS merged commit 0c64cb8 into microsoft:master Jun 29, 2023
@JohnMcPMS JohnMcPMS deleted the oop-config branch June 29, 2023 18:27
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