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

Infra changes for Microsoft.WinGet.Client and AppInstallerCLIE2ETests #2746

Merged
merged 5 commits into from
Dec 7, 2022

Conversation

msftrubengu
Copy link
Contributor

@msftrubengu msftrubengu commented Dec 6, 2022

This PR contains several infra changes:

  • Use same stylecops file for Microsoft.WinGet.Client and AppInstallerCLIE2ETests. In the future we should point the same stylecops file for different csproj in this repository.
  • Mark warnings as errors in Microsoft.WinGet.Client for release builds.
  • Because of that, a lot of AppInstallerCLIE2ETests. All of them are because of missing comments, edit the header and follow stylecops standards on where to place things within a class, etc.
  • Create Create-CrescendoFunctions.ps1 to easily create Microsoft.WinGet.Client.psm1 in the future if necessary. It can sadly be fully automated because of the dynamic expression in Microsoft.WinGet.Client.psd1. Not really needed, but nice to have.
  • Move PowerShell module output to outdir\PowerShell\Microsoft.WinGet.Client. Every directory under the PowerShell output directory will be a different WinGet module.
  • Move Microsoft.WinGet.Client PowerShell specific files to a Modules directory. This helps us throw everything there without needing to edit the after targets copy files task with each specific file.
  • Create Initialize-LocalWinGetModules.ps1 as a helper to initialize WinGet's PowerShell modules locally. Used for dev testing.
  • Update-BinVer fails in DevOps agent if git describe fails even though the script is supposed to set the version as 0. I believe is something in the output of git describe that makes the task fail, but I didn't want to go that deep, specially because of the fallback. The other option was to modify the pipeline file to don't execute for manual triggers, but I don't want us to block that possibility. This change allows anyone (mostly) to create new pipeline from their fork and run the entire build with all the tests without needing to create a PR or a topic branch in the repo. It would be nice if at run time it detects the secure files are not there and not immediately failing then don't run the tests that require those files, but that seems to be a DevOps constrain (don't even trigger the pipeline if the files don't exist).
  • Modify pipeline file to remove unnecessary calls to scripts. Now that Visual Studio copies the necessary files at build time, there's no need to run the scripts.

In preparation of #2697

Microsoft Reviewers: Open in CodeFlow

@msftrubengu msftrubengu requested a review from a team as a code owner December 6, 2022 03:21
@github-actions

This comment has been minimized.

</PropertyGroup>

<PropertyGroup Condition="'$(WingetUseProdClsids)' == 'true'">
<DefineConstants>USE_PROD_CLSIDS</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(WingetUseProdClsids)' == 'true'">
<DefineConstants>USE_PROD_CLSIDS</DefineConstants>
</PropertyGroup>
Copy link
Contributor

@yao-msft yao-msft Dec 7, 2022

Choose a reason for hiding this comment

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

nit: this is duplicate #Resolved

</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<WarningsAsErrors />
Copy link
Contributor

@yao-msft yao-msft Dec 7, 2022

Choose a reason for hiding this comment

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

nit: remove #Resolved

"documentationRules": {
"companyName": "Microsoft Corporation",
"copyrightText": " Copyright (c) {companyName}. Licensed under the MIT License.",
"headerDecoration": "-----------------------------------------------------------------------------"
"headerDecoration": "-----------------------------------------------------------------------------",
Copy link
Contributor

@yao-msft yao-msft Dec 7, 2022

Choose a reason for hiding this comment

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

,

nit: from json perspective, this change is actually incorrect #Resolved

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:

@msftrubengu msftrubengu merged commit 6caf796 into microsoft:master Dec 7, 2022
@msftrubengu msftrubengu deleted the infra_changes branch December 9, 2022 18:18
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.

3 participants