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

Update AzureAuth to .NET 8 version #412

Merged
merged 14 commits into from
Nov 7, 2024

Conversation

keyuxuan
Copy link
Contributor

@keyuxuan keyuxuan commented Nov 4, 2024

Changes:

  1. Updated AzureAuth to .NET 8 version. I made these changes via the .NET Upgrade Assistant in Visual Studio 2022, which takes care of updating code and breaking changes if need be.

  2. Updated AzureAuth to use the latest Lasso version 10.23.1 which is the version we get after upgrading Lasso to .NET 8.

  3. During testing, we also found out that currently AzureAuth is enabled with trimming, and we have always published the trimmed version of AzureAuth in the past. However, Lasso is not enabled with trimming, nor its dependency McMaster CommandLineUtils. Updating AzureAuth to .NET 8 makes it incompatible with Lasso and CommandLineUtils. So in order to finish updating version for now, we decide to disable trimming in AzureAuth.

  4. Replaced the occurrences of win10-x64 with win-x64 in release yaml file and bin\win\publish.cmd. Will replace the occurrences of win10-x64 in install/install.ps1 after release is done.

  5. We were running into errors when testing with release pipeline:
    It first failed at Build Projects step with errors like:
    "##[error]src\AdoPat.Test\AdoPat.Test.csproj(0,0): Error NU1900: Warning As Error: Error occurred while getting package vulnerability data: Unable to load the service index for source https://office.pkgs.visualstudio.com/DefaultCollection/_packaging/Office/nuget/v3/index.json."

    To fix that, we had to add ADO_TOKEN: $(System.AccessToken) under Build Projects step

    Then release pipeline failed at Guardian Post analysis step with error: BinSkim Error BA2021 https://office.visualstudio.com/OE/_build/results?buildId=32371389&view=results

    We confirmed that this error was not introduced by our changes, because even main branch now would also run into this error https://office.visualstudio.com/OE/_build/results?buildId=32371389&view=results

    This BinSkim Error BA2021 also seems to be a false positive according to Combability with .NET ReadyToRun and Self-Contained microsoft/binskim#970

    After asking in the 1ESPT help channel, they suggested we can add a suppression file for the false positive https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/sdlanalysis/baselines

    So we added a suppression file to the release pipeline

  6. Also updated CHANGELOG to reflect all the changes.

Testing

  1. Tested using the release pipeline to make sure it works

  2. Tested following commands on both mac and windows:

azureauth --help
azureauth aad --help
azureauth ado pat --help
azureauth ado token --help
azureauth ado pat scopes --help
azureauth info --help
azureauth ado token
azureauth ado pat
azureauth aad (with different output and auth modes)

@keyuxuan keyuxuan requested a review from a team as a code owner November 4, 2024 22:42
Haard30
Haard30 previously approved these changes Nov 6, 2024
@keyuxuan keyuxuan merged commit 82a20c1 into main Nov 7, 2024
8 checks passed
@keyuxuan keyuxuan deleted the user/keyuxuan/update-doetnet-in-azureauth branch November 7, 2024 18:41
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.

4 participants