-
Notifications
You must be signed in to change notification settings - Fork 321
[DRAFT] Azure Split - Step 2 - New Files #3904
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
base: dev/paul/azure/step1
Are you sure you want to change the base?
Conversation
- Added the new Abstractions and Azure source files and associated pipeline files. - Setup build.proj targets and default version numbers. - Standardized project CLS compliance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request is Step 2 of the Azure split effort, adding new Abstractions and Azure extension packages to decouple Azure dependencies from the main Microsoft.Data.SqlClient package. The PR introduces two new packages with their source code, tests, documentation, and CI/CD pipeline configurations while standardizing CLS compliance across projects.
Changes:
- Added new Microsoft.Data.SqlClient.Extensions.Abstractions package with base types for authentication and related abstractions
- Added new Microsoft.Data.SqlClient.Extensions.Azure package containing Azure authentication implementations moved from MDS
- Standardized CLS compliance by using AssemblyAttribute declarations instead of embedded assembly attributes
- Added comprehensive CI/CD pipeline support for building and testing both new packages across multiple platforms
Reviewed changes
Copilot reviewed 69 out of 69 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/targets/GenerateThisAssemblyCs.targets | Simplified to unconditionally generate ThisAssembly.cs with configurable namespace |
| tools/props/Versions.props | Added imports for Abstractions and Azure version properties |
| src/Microsoft.Data.SqlClient/tests/tools/TDS/**/*.csproj | Removed ClsCompliant property (standardization) |
| src/Microsoft.Data.SqlClient/**/Microsoft.Data.SqlClient.csproj | Added CLS compliance via AssemblyAttribute |
| src/Microsoft.Data.SqlClient.sln | Added folder structure and projects for Abstractions and Azure packages |
| src/Microsoft.Data.SqlClient.Extensions/Abstractions/** | Complete Abstractions package with source, tests, and documentation |
| src/Microsoft.Data.SqlClient.Extensions/Azure/** | Complete Azure package with source, tests, and documentation |
| eng/pipelines/** | New CI/CD stages, jobs, and variables for building/testing new packages |
| build.proj | Added targets for building Abstractions and Azure packages |
| Directory.Packages.props | Added package version management for new packages |
| BUILDGUIDE.md | Updated documentation with new build targets |
src/Microsoft.Data.SqlClient.Extensions/Azure/src/ActiveDirectoryAuthenticationProvider.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient.Extensions/Azure/src/ActiveDirectoryAuthenticationProvider.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient.Extensions/Azure/src/ActiveDirectoryAuthenticationProvider.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient.Extensions/Azure/src/ActiveDirectoryAuthenticationProvider.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/SqlAuthenticationProviderException.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient.Extensions/Azure/src/ActiveDirectoryAuthenticationProvider.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient.Extensions/Azure/src/ActiveDirectoryAuthenticationProvider.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/SqlAuthenticationProviderInternal.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/SqlAuthenticationProviderInternal.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient.Extensions/Azure/src/ActiveDirectoryAuthenticationProvider.cs
Show resolved
Hide resolved
| parameters: | ||
| referenceType: Package | ||
| buildConfiguration: Release | ||
| cleanFirst: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build.proj Clean target removes all generated files, including the packages/ directory. This is the behaviour we want from a Clean. However, removing packages/ causes restores to fail when we're using our local NuGet.config. This is mostly done in the pipelines, so we must remove the cleans here, which weren't doing anything useful anyway.
| # See the LICENSE file in the project root for more information. # | ||
| ################################################################################# | ||
|
|
||
| # This file is only included in MDS OneBranch Official pipelines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are too many YAML variables and files. This will at least make it easier to reason about which variables affect which pipelines.
|
|
||
| # Build the Abstractions package, and publish it to the pipeline artifacts | ||
| # under the given artifact name. | ||
| - template: /eng/pipelines/stages/build-abstractions-package-ci-stage.yml@self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR adds the new Abstractions and Azure packages to the pipelines, but MDS and its tests don't use them yet.
| // NOTE: The current Microsoft.VSDesigner editor attributes are implemented for System.Data.SqlClient, and are not publicly available. | ||
| // New attributes that are designed to work with Microsoft.Data.SqlClient and are publicly documented should be included in future. | ||
|
|
||
| [assembly: System.CLSCompliant(true)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were setting CLS compliance several ways, so I standardized on the project approach.
| <AssemblyName>Microsoft.SqlServer.TDS.Servers</AssemblyName> | ||
| <ProjectGuid>{978063D3-FBB5-4E10-8C45-67C90BE1B931}</ProjectGuid> | ||
| <TargetFrameworks>netstandard2.0</TargetFrameworks> | ||
| <ClsCompliant>false</ClsCompliant> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no such MSBuild property, so this wasn't doing anything.
| EndProject | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Data.SqlClient.TestCommon", "Microsoft.Data.SqlClient\tests\Common\Microsoft.Data.SqlClient.TestCommon.csproj", "{3FF03FA9-E3C3-49E3-9DCB-C703A5B0278B}" | ||
| EndProject | ||
| Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.Data.SqlClient.Extensions", "Microsoft.Data.SqlClient.Extensions", "{19F1F1E5-3013-7660-661A-2A15F7D606C1}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used dotnet sln add to add the new projects.
| <ThisAssemblyNamespace Condition="'$(ThisAssemblyNamespace)' == ''">System</ThisAssemblyNamespace> | ||
|
|
||
| <ThisAssemblyCsContents> | ||
| [assembly: System.CLSCompliant(true)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's was too sneaky using this target to inject CLS compliance. Moving it to all of the relevant project files makes it clear and obvious.
| </ThisAssemblyCsContents> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Get the last version number we built with (if any) --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was over-engineered - there's no need to attempt to avoid generating this file on every build.
| <PropertyGroup> | ||
|
|
||
| <!-- Put the ThisAssembly class in the System namespace by default. --> | ||
| <ThisAssemblyNamespace Condition="'$(ThisAssemblyNamespace)' == ''">System</ThisAssemblyNamespace> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now shared by 3 projects, and they all need to put this class in a unique namespace.
- Added ThisAssembly generation to Abstractions. - Fixed branch wildcards in PR pipeline and CodeQL workflow triggers.
- Fixed paratemer name typo.
- Fixed cyclic dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 72 out of 72 changed files in this pull request and generated no new comments.
- Inhibited some Azure tests that won't pass yet. - Addressed Copilot comments in the PR.
Description
This PR contains the new Abstractions and Azure package files:
PR series:
Testing