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

chore(playwrighttesting): update public classes, methods and constants as per APIView review #47652

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Sid200026
Copy link
Member

  • Usage of ILogger provided by Microsoft.Extensions.Logging
  • Usage of Extensible Enums
  • Refactor class constructors
  • Sync and async methods for Initialize
  • Convert TestReportingClientOptions to internal class
  • Renamed Os to OS

@@ -192,6 +192,7 @@
<ItemGroup Condition="$(MSBuildProjectName.StartsWith('Azure.Developer.MicrosoftPlaywrightTesting'))">
<PackageReference Update="Microsoft.TestPlatform.ObjectModel" Version="17.10.0" />
<PackageReference Update="NUnit" Version="3.13.2" />
<PackageReference Update="Microsoft.Extensions.Logging" Version="2.0.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.

This was added as per recommendation in APIView review to use Microsoft.Extensions.Logging's ILogger interface. Added the dependency under this condition since it's used only in Extension libraries.

@azure-sdk
Copy link
Collaborator

azure-sdk commented Dec 24, 2024

API change check

APIView has identified API level changes in this PR and created following API reviews.

Azure.Developer.MicrosoftPlaywrightTesting.NUnit
Azure.Developer.MicrosoftPlaywrightTesting.TestLogger

@@ -192,6 +192,7 @@
<ItemGroup Condition="$(MSBuildProjectName.StartsWith('Azure.Developer.MicrosoftPlaywrightTesting'))">
<PackageReference Update="Microsoft.TestPlatform.ObjectModel" Version="17.10.0" />
<PackageReference Update="NUnit" Version="3.13.2" />
<PackageReference Update="Microsoft.Extensions.Logging" Version="2.0.0" />
Copy link
Member

Choose a reason for hiding this comment

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

This should be 8.x unless there's a reason to not do so. We're in the process of bumping all of the Azure SDK dependencies to the 8.x line.

Copy link
Member Author

Choose a reason for hiding this comment

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

Microsoft.Extensions.Logging 8.x uses Microsoft.Bcl.AsyncInterfaces 8.x, while in Packages.Data.props, Microsoft.Bcl.AsyncInterfaces is set to 6.x -

<PackageReference Update="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />

This causes a version mismatch in net6.0

C:\Program Files\dotnet\sdk\8.0.404\Microsoft.Common.CurrentVersion.targets(2412,5): warning MSB3277: Found conflicts b
etween different versions of "Microsoft.Bcl.AsyncInterfaces" that could not be resolved. [Dev\azure
-sdk-for-net\sdk\playwrighttesting\Azure.Developer.MicrosoftPlaywrightTesting.TestLogger\tests\Azure.Developer.Microsof
tPlaywrightTesting.TestLogger.Tests.csproj::TargetFramework=net6.0]

Copy link
Member

@jsquire jsquire Dec 31, 2024

Choose a reason for hiding this comment

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

The Async Interfaces package is in the process of being bumped to the 8.x line centrally, along with the remainder of our dependencies. Please either wait for that to complete or bump the necessary dependencies for Playwright. I'd rather not see us use an older set here that will need to be migrated separately.

A direct reference to the Async Interfaces packages locally should resolve the conflict in the interim.

Copy link
Member

Choose a reason for hiding this comment

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

This causes a version mismatch in net6.0

.NET 6 reached end-of-life and is no longer a supported platform. Our test matrices are also in the process of being upgraded to remove 6 and include 9.

Copy link
Member Author

Choose a reason for hiding this comment

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

A direct reference to the Async Interfaces packages locally should resolve the conflict in the interim.

Do we add Microsoft.Bcl.AsyncInterfaces in the csproj with version as 8.x?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just rechecked the dotnet build logs, the above were warnings rather than errors.

Copy link
Member

Choose a reason for hiding this comment

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

Do we add Microsoft.Bcl.AsyncInterfaces in the csproj with version as 8.x?

You would add the package reference in your .csproj and add a version of 8.x in your Playwright section of the central packages file. That central version will get cleaned up when we complete the repo-wide central version bumps.

Copy link
Member Author

Choose a reason for hiding this comment

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

To resolve the issue with net6.0, have added the below dependencies in the central package file under the Playwright section.

    <PackageReference Update="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
    <PackageReference Update="System.Diagnostics.DiagnosticSource" Version="8.0.0" />

Also added reference to these packages in our base SDK's .csproj.

Copy link
Member

@ShreyaAnand ShreyaAnand left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants