Skip to content

Install dsc v3 package if not found when processing dsc v3 configuration file#5437

Merged
yao-msft merged 4 commits into
microsoft:masterfrom
yao-msft:installdscv3
May 7, 2025
Merged

Install dsc v3 package if not found when processing dsc v3 configuration file#5437
yao-msft merged 4 commits into
microsoft:masterfrom
yao-msft:installdscv3

Conversation

@yao-msft

@yao-msft yao-msft commented May 7, 2025

Copy link
Copy Markdown
Contributor

Validated by removing the "install dsc v3" step in pipeline and e2e tests work.

Microsoft Reviewers: Open in CodeFlow

@github-actions

This comment has been minimized.

@yao-msft yao-msft marked this pull request as ready for review May 7, 2025 04:20
@yao-msft yao-msft requested a review from a team as a code owner May 7, 2025 04:20
winrt::hstring foundExecutablePath = factoryMap.Lookup(ConfigurationRemoting::ToHString(ConfigurationRemoting::PropertyName::FoundDscExecutablePath));
if (foundExecutablePath.empty())
{
AICLI_LOG(Config, Info, << "dsc.exe not found and not provided. Installing dsc package from store.");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Needs a user presentable message sent out as well.

Comment on lines +219 to +220
AICLI_LOG(Config, Error, << "Could not find dsc.exe, it must be provided by the user.");
THROW_WIN32(ERROR_FILE_NOT_FOUND);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

User message and use TERMINATE_CONTEXT instead of throwing directly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The MSStoreInstall workflow task prints installation failed message with error code to the screen. I guess we don't need a duplicate install failed message here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm more concerned about the mitigation message than the "install failed". Inform the user that they can provide the argument for the location of dsc.

@yao-msft yao-msft merged commit 8a8bfa7 into microsoft:master May 7, 2025
9 checks passed
@yao-msft yao-msft deleted the installdscv3 branch May 7, 2025 22:35
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