Conversation
There was a problem hiding this comment.
Pull request overview
Final cleanup pass for the Azure split work, focusing on small code tidy-ups and pipeline/template adjustments for Azure/AKV/signing/PR validation.
Changes:
- Minor test/source cleanup (namespace alignment, formatting, retry-after millisecond conversion).
- Pipeline/template refactors to consolidate
.NET SDKinstallation and simplify signing/package validation steps. - Updates to PR validation and CodeQL trigger configuration.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft/Data/SqlClient/SqlAuthenticationProviderManagerTests.cs | Aligns unit test namespace/formatting with the rest of the UnitTests tree. |
| src/Microsoft.Data.SqlClient.Extensions/Azure/test/StringExtensions.cs | Adds XML docs for Empty() (currently attached to the wrong symbol). |
| src/Microsoft.Data.SqlClient.Extensions/Azure/src/ActiveDirectoryAuthenticationProvider.cs | Fixes retry-after delta conversion to use total milliseconds; whitespace cleanup. |
| src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/SqlAuthenticationProviderException.cs | Formatting-only change for ternary expression. |
| eng/pipelines/steps/compound-build-akv-step.yml | Removes redundant SDK install step from the AKV compound step. |
| eng/pipelines/sqlclient-pr-project-ref-pipeline.yml | Adjusts PR branch include pattern for dev/*. |
| eng/pipelines/sqlclient-pr-package-ref-pipeline.yml | Adjusts PR branch include pattern for dev/*. |
| eng/pipelines/jobs/test-azure-package-ci-job.yml | YAML formatting cleanup (folded block style) for debug output step. |
| eng/pipelines/jobs/build-akv-official-job.yml | Adds explicit .NET SDK install before AKV build/analyzers. |
| eng/pipelines/dotnet-sqlclient-signing-pipeline.yml | Updates artifact folder naming and simplifies validation job invocation. |
| eng/pipelines/common/templates/steps/code-analyze-step.yml | Changes analyzer MSBuild invocation to explicitly target BuildAllConfigurations. |
| eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml | Removes redundant SDK install from this step template. |
| eng/pipelines/common/templates/jobs/validate-signed-package-job.yml | Simplifies parameters and inlines the artifact download step. |
| eng/pipelines/common/templates/jobs/build-signed-package-job.yml | Switches to pwsh, installs SDK, passes Abstractions version property, and sets build-type output variable (currently broken). |
| .github/workflows/codeql.yml | Updates CodeQL triggers/comments (push trigger now unscoped). |
src/Microsoft.Data.SqlClient.Extensions/Azure/test/StringExtensions.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient.Extensions/Azure/src/ActiveDirectoryAuthenticationProvider.cs
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3917 +/- ##
==========================================
- Coverage 74.53% 67.90% -6.64%
==========================================
Files 266 260 -6
Lines 42915 65724 +22809
==========================================
+ Hits 31987 44627 +12640
- Misses 10928 21097 +10169
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
25590be to
ad7ea2f
Compare
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Connection/SqlConnectionInternal.cs
Outdated
Show resolved
Hide resolved
- Addressed comments from Step 3 PR.
- Addressed Copilot comments from Step 3 PR.
a0c896b to
26031e4
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (3)
eng/pipelines/common/templates/jobs/validate-signed-package-job.yml:13
- The template interface was changed (e.g., removal of
downloadPackageStep/packageTypeparameters), but there are still callers passingdownloadPackageStep(e.g.,eng/pipelines/dotnet-sqlclient-signing-pipeline.yml). This will fail template expansion. Either restore the parameter(s) for backward compatibility or update all callers in this PR to match the new parameter set.
parameters:
- name: packageFolderName
type: string
- name: isPreview
type: boolean
eng/pipelines/common/templates/jobs/validate-signed-package-job.yml:83
$packageTypeis referenced in the signature verification script, but the variable is no longer set (the previous assignment from apackageTypeparameter was removed). This will cause theif ($packageType -eq ...)checks to behave incorrectly or throw. Reintroduce the parameter/variable or remove the branching and always verify the expected artifacts.
- powershell: |
Write-Host "--------------------------------------------------"
Write-Host "This will verify the artifact signature" -ForegroundColor Green
Write-Host "--------------------------------------------------"
if ($packageType -eq 'dll' -or $packageType -eq 'both')
{
nuget verify -All $(pathToDownloadedNuget)\*.nupkg
}
if ($packageType -eq 'pdb' -or $packageType -eq 'both')
{
nuget verify -All $(pathToDownloadedNuget)\*.snupkg
}
eng/pipelines/common/templates/steps/code-analyze-step.yml:39
- Removing
-p:SigningKeyPath=...from the Roslyn analyzers MSBuild command can break builds whenCDP_BUILD_TYPE=Official(projects enable strong-name signing and require the key file). Either ensure the key is downloaded andSigningKeyPathis passed for this step as well, or explicitly disable signing for the analyzer build to keep it independent of secure files.
msBuildCommandline: >-
msbuild
${{parameters.sourceRoot}}\build.proj
-t:BuildAllConfigurations
-p:configuration=Release
-p:GenerateNuget=false
-p:BuildTools=false
src/Microsoft.Data.SqlClient.Extensions/Azure/src/ActiveDirectoryAuthenticationProvider.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Connection/SqlConnectionInternal.cs
Show resolved
Hide resolved
eng/pipelines/common/templates/jobs/build-signed-package-job.yml
Outdated
Show resolved
Hide resolved
eng/pipelines/common/templates/jobs/build-signed-package-job.yml
Outdated
Show resolved
Hide resolved
- Addressed Copilot comments.
|
@paulmedynski any updates on the status of preview 4? |
|
Preview 4 will be pushed back, and likely combined with Preview 5. There is still significant infrastructure/engineering work to do for the new Abstractions and Azure packages. Meeting this week to decide on new dates/milestones/etc. |
|
Thanks for the update |
Directory.Packages.props
Outdated
| @@ -117,6 +116,9 @@ | |||
| <!-- Azure Dependencies --> | |||
|
|
|||
| <!-- None --> | |||
| Get-ChildItem | ||
| -Path "src/Microsoft.Data.SqlClient.Extensions/Azure/test/bin/${{ parameters.buildConfiguration }}" | ||
| -Recurse | ||
| -Path "src/Microsoft.Data.SqlClient.Extensions/Azure/test/bin/${{ parameters.buildConfiguration }}" |
There was a problem hiding this comment.
Lines with different leading whitespace than the previous line aren't folded together!
| msBuildCommandline: >- | ||
| msbuild | ||
| ${{parameters.sourceRoot}}\build.proj | ||
| -t:BuildAllConfigurations |
There was a problem hiding this comment.
Best to be explicit in case we change the default target.
| if (retryAfter.Delta.HasValue) | ||
| { | ||
| retryPeriod = retryAfter.Delta.Value.Milliseconds; | ||
| totalMilliseconds = retryAfter.Delta.Value.TotalMilliseconds; |
There was a problem hiding this comment.
Whoops - the old code was using just the milliseconds portion of the delta.
| var now = DateTimeOffset.UtcNow; | ||
| if (retryAfter.Date.Value > now) | ||
| { | ||
| totalMilliseconds = (retryAfter.Date.Value - now).TotalMilliseconds; |
There was a problem hiding this comment.
The old code was using the timezone offset , not the difference between the Date and now.
| // No, so we throw. | ||
| SqlClientEventSource.Log.TryTraceEvent("<sc.SqlInternalConnectionTds.GetFedAuthToken error:> Attempt: {0}, Timeout: {1}", attempt, ex.FailureCode); | ||
| SqlClientEventSource.Log.TryTraceEvent( | ||
| "<sc.SqlInternalConnectionTds.GetFedAuthToken error:> Attempt: {0}, FailureCode: {1}", |
There was a problem hiding this comment.
The old message never intended to log the timeout value. The "Timeout" was meant to mean "A timeout has occurred", followed by the failure code of the most recent attempt.
I re-worded it to just emit the failure code.
- Addressed comments in the PR.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
eng/pipelines/common/templates/jobs/validate-signed-package-job.yml:84
- The
packageTypeparameter was removed from the template, but PowerShell scripts at lines 76 and 80 still reference the undefined$packageTypevariable. Since the parameter's default was 'both', the scripts should either:
- Remove the conditionals and always verify both dll and pdb (nuget verify for .nupkg and .snupkg), or
- Define a hardcoded variable at the start of the script like
$packageType = 'both'
Without this fix, the nuget verify commands will not execute because $packageType will be null/empty.
- powershell: |
Write-Host "--------------------------------------------------"
Write-Host "This will verify the artifact signature" -ForegroundColor Green
Write-Host "--------------------------------------------------"
if ($packageType -eq 'dll' -or $packageType -eq 'both')
{
nuget verify -All $(pathToDownloadedNuget)\*.nupkg
}
if ($packageType -eq 'pdb' -or $packageType -eq 'both')
{
nuget verify -All $(pathToDownloadedNuget)\*.snupkg
}
displayName: 'Verify nuget signature'
- Addressed Copilot comments.
- Fixed nuget verification steps.
Description
This PR includes any remaining cleanup:
PR series:
Testing