Skip to content

Azure Split - Step 4 - Cleanup#3917

Open
paulmedynski wants to merge 13 commits intomainfrom
dev/paul/azure/step4
Open

Azure Split - Step 4 - Cleanup#3917
paulmedynski wants to merge 13 commits intomainfrom
dev/paul/azure/step4

Conversation

@paulmedynski
Copy link
Contributor

@paulmedynski paulmedynski commented Jan 27, 2026

Description

This PR includes any remaining cleanup:

  • Addresses some suggestions/comments from the previous 3 PRs.
  • Fixes any issues with the downstream pipelines (CI, MDS Main, Official, AKV).
  • Anything else I've noticed along the way.

PR series:

Testing

  • Normal PR/CI pipeline runs will validate most changes.
  • Manual runs of the ADO.Net pipelines (MDS Main, Official, AKV).
  • Manual inspection of pipeline logs and artifacts will confirm some of the fiddly parts.

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

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 SDK installation 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).

@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 0% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.90%. Comparing base (3ffbba7) to head (203bef0).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...Data/SqlClient/Connection/SqlConnectionInternal.cs 0.00% 21 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (3ffbba7) and HEAD (203bef0). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (3ffbba7) HEAD (203bef0)
addons 1 0
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     
Flag Coverage Δ
addons ?
netcore 68.06% <0.00%> (-6.72%) ⬇️
netfx 66.55% <0.00%> (-7.16%) ⬇️

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.

Copilot AI review requested due to automatic review settings February 9, 2026 18:45
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Base automatically changed from dev/paul/azure/step3 to main February 10, 2026 12:36
Copilot AI review requested due to automatic review settings February 10, 2026 12:50
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 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 / packageType parameters), but there are still callers passing downloadPackageStep (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

  • $packageType is referenced in the signature verification script, but the variable is no longer set (the previous assignment from a packageType parameter was removed). This will cause the if ($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 when CDP_BUILD_TYPE=Official (projects enable strong-name signing and require the key file). Either ensure the key is downloaded and SigningKeyPath is 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

- Addressed Copilot comments.
@paulmedynski paulmedynski added this to the 7.0.0-preview4 milestone Feb 11, 2026
@paulmedynski paulmedynski added the Area\Azure Connectivity Use this to tag issues that are related to Azure connectivity. label Feb 11, 2026
@ErikEJ
Copy link
Contributor

ErikEJ commented Feb 11, 2026

@paulmedynski any updates on the status of preview 4?

@paulmedynski
Copy link
Contributor Author

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.

@ErikEJ
Copy link
Contributor

ErikEJ commented Feb 11, 2026

Thanks for the update

@@ -117,6 +116,9 @@
<!-- Azure Dependencies -->

<!-- None -->
Copy link
Contributor

Choose a reason for hiding this comment

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

✏️ now there is one :)

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 }}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lines with different leading whitespace than the previous line aren't folded together!

msBuildCommandline: >-
msbuild
${{parameters.sourceRoot}}\build.proj
-t:BuildAllConfigurations
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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}",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.
Copilot AI review requested due to automatic review settings February 12, 2026 11:38
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 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 packageType parameter was removed from the template, but PowerShell scripts at lines 76 and 80 still reference the undefined $packageType variable. Since the parameter's default was 'both', the scripts should either:
  1. Remove the conditionals and always verify both dll and pdb (nuget verify for .nupkg and .snupkg), or
  2. 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'

Copilot AI review requested due to automatic review settings February 12, 2026 12:55
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 no new comments.

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

Labels

Area\Azure Connectivity Use this to tag issues that are related to Azure connectivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants