Skip to content

Merge | Pack Mds Target, Wire PR/CI Pipelines to Build2.proj#4033

Open
benrr101 wants to merge 26 commits intomainfrom
dev/russellben/common/pack2
Open

Merge | Pack Mds Target, Wire PR/CI Pipelines to Build2.proj#4033
benrr101 wants to merge 26 commits intomainfrom
dev/russellben/common/pack2

Conversation

@benrr101
Copy link
Contributor

@benrr101 benrr101 commented Mar 11, 2026

Description

This PR adds a PackMds target to Build2.proj that conveniently packages the MDS projects into a NuGet package. This PR also reworks the CI/PR pipelines to use the build2.proj targets to build, test, and package the MDS project.

Commentary has been added in-line.

Testing

Ran PR validation while still in draft mode and verifies that it generates good output. There are a lot of things to go through to verify that everything is behaving correctly, but it seems good.

@benrr101 benrr101 requested a review from a team as a code owner March 11, 2026 18:25
Copilot AI review requested due to automatic review settings March 11, 2026 18:25
@github-project-automation github-project-automation bot moved this to To triage in SqlClient Board Mar 11, 2026
@benrr101 benrr101 marked this pull request as draft March 11, 2026 18:25

This comment was marked as outdated.

Copilot AI review requested due to automatic review settings March 11, 2026 21:18

This comment was marked as outdated.

Copilot AI review requested due to automatic review settings March 11, 2026 22:32

This comment was marked as outdated.

Copilot AI review requested due to automatic review settings March 12, 2026 04:30
Copilot AI review requested due to automatic review settings March 12, 2026 19:05
Copy link
Contributor

Copilot AI left a 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 23 out of 23 changed files in this pull request and generated 2 comments.

Comment on lines +386 to +389
<Error Text="PackageVersionAbstractions must be set!"
Condition="'$(PackageVersionAbstractions)' == ''" />
<Error Text="PackageVersionLogging must be set!"
Condition="'$(PackageVersionLogging)' == ''" />
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

PackMds currently fails unless the wrapper properties (PackageVersionAbstractions/Logging/Mds) are explicitly set. However, AbstractionsPackageVersion/LoggingPackageVersion can be resolved by the imported *Versions.props / *Versions.props files even when the wrapper properties are empty, and the nuspec substitution ultimately needs AbstractionsPackageVersion/LoggingPackageVersion. Consider validating the resolved AbstractionsPackageVersion/LoggingPackageVersion (and/or defaulting the wrapper properties to those resolved values) so PackMds works with default versioning and the behavior matches the parameter docs.

Suggested change
<Error Text="PackageVersionAbstractions must be set!"
Condition="'$(PackageVersionAbstractions)' == ''" />
<Error Text="PackageVersionLogging must be set!"
Condition="'$(PackageVersionLogging)' == ''" />
<!-- Default wrapper properties from resolved versions when not explicitly provided -->
<PropertyGroup>
<PackageVersionAbstractions Condition="'$(PackageVersionAbstractions)' == '' and '$(AbstractionsPackageVersion)' != ''">$(AbstractionsPackageVersion)</PackageVersionAbstractions>
<PackageVersionLogging Condition="'$(PackageVersionLogging)' == '' and '$(LoggingPackageVersion)' != ''">$(LoggingPackageVersion)</PackageVersionLogging>
</PropertyGroup>
<!-- Validate that a version is available either via wrapper or resolved property -->
<Error Text="Abstractions package version could not be resolved. Set PackageVersionAbstractions or ensure AbstractionsPackageVersion is defined."
Condition="'$(PackageVersionAbstractions)' == '' and '$(AbstractionsPackageVersion)' == ''" />
<Error Text="Logging package version could not be resolved. Set PackageVersionLogging or ensure LoggingPackageVersion is defined."
Condition="'$(PackageVersionLogging)' == '' and '$(LoggingPackageVersion)' == ''" />

Copilot uses AI. Check for mistakes.
@paulmedynski paulmedynski moved this from To triage to In review in SqlClient Board Mar 12, 2026
@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.09%. Comparing base (14b96a2) to head (efbdbb2).
⚠️ Report is 17 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (14b96a2) and HEAD (efbdbb2). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (14b96a2) HEAD (efbdbb2)
CI-SqlClient 1 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4033      +/-   ##
==========================================
- Coverage   74.62%   68.09%   -6.54%     
==========================================
  Files         280      275       -5     
  Lines       43814    66924   +23110     
==========================================
+ Hits        32698    45570   +12872     
- Misses      11116    21354   +10238     
Flag Coverage Δ
CI-SqlClient ?
PR-SqlClient-Project 68.09% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@paulmedynski paulmedynski left a comment

Choose a reason for hiding this comment

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

Looks great - keep truckin'! Just a couple of comments.

<ProjectReference Include="..\Microsoft.Cci.Extensions\Microsoft.Cci.Extensions.csproj" />

<PackageReference Include="McMaster.Extensions.CommandLineUtils" />
<PackageReference Include="System.Diagnostics.TextWriterTraceListener" />
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the 3rd PR I've seen this diff in lately, so they're definitely not needed 😄

@github-project-automation github-project-automation bot moved this from In review to In progress in SqlClient Board Mar 12, 2026
@paulmedynski paulmedynski added this to the 7.0.0 milestone Mar 13, 2026
@paulmedynski paulmedynski self-assigned this Mar 13, 2026
mdaigle
mdaigle previously approved these changes Mar 13, 2026
# Conflicts:
#	build2.proj
#	eng/pipelines/onebranch/steps/code-analyze-step.yml
@benrr101 benrr101 requested a review from paulmedynski March 13, 2026 21:14
@benrr101 benrr101 dismissed paulmedynski’s stale review March 13, 2026 22:34

He's on vacation and said it's ok

@cheenamalhotra cheenamalhotra modified the milestones: 7.0.0, 7.1.0-preview1 Mar 16, 2026
Copilot AI review requested due to automatic review settings March 16, 2026 17:27
Copy link
Contributor

Copilot AI left a 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 21 out of 21 changed files in this pull request and generated 6 comments.

@benrr101 benrr101 changed the title Merge | Pack Mds Target, Wire Up Pipelines to Build2.proj Merge | Pack Mds Target, Wire PR/CI Pipelines to Build2.proj Mar 16, 2026
Copilot AI review requested due to automatic review settings March 18, 2026 18:10
Copy link
Contributor

Copilot AI left a 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 19 out of 19 changed files in this pull request and generated 4 comments.

Comment on lines +7 to +28
This is the version that is used as the version for the NuGet package. If it is not
overridden, the above default version will be used with the build number and a string suffix
appended (to indicate the version is pre-production).

NOTE/@TODO: Since the PackMds target in build2.proj directly calls nuget.exe, it will not
pick up this property.
-->
<MdsPackageVersion Condition="'$(MdsPackageVersion)' == ''">$(MdsVersionDefault).$(BuildNumber)-dev</MdsPackageVersion>

<!--
This is the version that is used as the AssemblyVersion and FileVersion fields in the
assembly's manifest. If it is not overridden, it will default to the above default version
with the build number appended.
As a convenience feature, if a package version but not an assembly version is supplied, the
package version will have any suffix trimmed to generate valid assembly version.

NOTE: It is possible that the build number can be in the format xxxx.y which *may* overflow
the 16-bit integer for the revision part of the assembly version. For that reason, we simply
discard everything after the first part of the build number for the assembly version.
-->
<MdsAssemblyVersion Condition="'$(MdsAssemblyVersion)' == '' AND '$(MdsPackageVersion)' == ''">$(MdsVersionDefault).$(BuildNumber.Split('.')[0])</MdsAssemblyVersion>
<MdsAssemblyVersion Condition="'$(MdsAssemblyVersion)' == '' AND '$(MdsPackageVersion)' != ''">$(MdsPackageVersion.Split('-')[0])</MdsAssemblyVersion>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I don't think all this is necessary. We just need to flip the order of assigning the assembly version and the package version defaults.

Comment on lines +189 to +193
<!-- lib/netstandard2.0 - These are PlatformNotSupportedException assemblies -->
<file src="..\..\artifacts\Microsoft.Data.SqlClient.notsupported\$ReferenceType$-$Configuration$\netstandard2.0\Microsoft.Data.SqlClient.dll" target="lib\netstandard2.0\" exclude="" />
<file src="..\..\artifacts\Microsoft.Data.SqlClient.notsupported\$ReferenceType$-$Configuration$\netstandard2.0\Microsoft.Data.SqlClient.pdb" target="lib\netstandard2.0\" exclude="" />
<file src="..\..\artifacts\Microsoft.Data.SqlClient.ref\$ReferenceType$-$Configuration$\netstandard2.0\Microsoft.Data.SqlClient.xml" target="lib\netstandard2.0\" exclude="" />

Comment on lines +292 to +299
<!-- Versioning arguments -->
$(BuildNumberArgument)
$(PacakgeVersionArgument)

<!-- Reference Type Arguments -->
$(ReferenceTypeArgument)
$(PackageVersionAbstractionsArgument)
$(PackageVersionLoggingArgument)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Common Project 🚮 Things that relate to the common project project

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

5 participants