Skip to content

AOT 7: Validate authentication scenarios and publishing in both reference modes - #4817

Draft
paulmedynski wants to merge 1 commit into
dev/paul/aot/phase-1.5from
dev/paul/aot/phase-1.6
Draft

paulmedynski wants to merge 1 commit into
dev/paul/aot/phase-1.5from
dev/paul/aot/phase-1.6

Conversation

@paulmedynski

@paulmedynski paulmedynski commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Integrate authentication compatibility scenarios and trimmed/NativeAOT publishing checks into build orchestration and Linux/Windows CI.

Why?

Authentication behavior must remain consistent across project and package references, supported runtimes, and publishing modes. Executable, isolated consumers verify configuration activation, provider precedence, failure handling, and the published application rather than compilation alone.

How

  • Exercise current/legacy configuration, provider precedence, invalid provider and initializer failures, cached failures, disabled switches, and replacement-driver version mismatches.
  • Support Project and Package reference modes with real local package preparation, distinct family versions, and isolated NuGet caches.
  • Publish and execute trimmed and NativeAOT Linux consumers with compiler/linker warnings treated as errors, checking that Azure discovery assets are absent and explicit registration succeeds.
  • Add aggregate scenario and build-only targets, include fixtures in standard test builds, and cover orchestration arguments.
  • Add independent Linux modern/publishing and Windows .NET Framework CI jobs for both reference modes, and document execution prerequisites.
  • PR validation: trigger Linux Project/Package scenario, trimmed, and NativeAOT runs.
  • PR validation: trigger Windows .NET Framework Project/Package scenario and runtime-version runs.

Copilot AI balanced review requested due to automatic review settings October 9, 2026 18:24
@paulmedynski
paulmedynski added this pull request to stack #4822 October 9, 2026 18:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Cross-platform pipeline and NativeAOT changes are substantial, while Windows CLR and remote CI execution remain unverified.

0 open findings

What changed in this PR

Adds a dedicated authentication validation harness covering configuration, package/reference modes, runtime mismatches, and trimmed/NativeAOT publishing.

Changes:

  • Expands fresh-process authentication scenarios and package-source validation.
  • Adds trim/AOT publishing checks and build orchestration.
  • Introduces Linux and Windows CI coverage for Project and Package modes.

No actionable defects were identified by inspection. Existing review threads were not provided.

File Description
RunAuthenticationTests.ps1 Orchestrates scenarios, package checks, and publishing.
AuthenticationTests/​README.md Documents harness usage and prerequisites.
PublishTest/​PublishTest.csproj Configures trim/AOT fixture references.
PublishTest/​Program.cs Validates trimmed authentication registration.
ConfigurationTest/​Program.cs Expands configuration and failure scenarios.
ConfigurationTest/​ConfigurationTest.csproj Adds Azure references.
bad-unsupported.config Adds unsupported-provider scenario.
bad-provider.config Adds missing-provider scenario.
bad-initializer.config Adds missing-initializer scenario.
Microsoft.Data.SqlClient.slnx Includes the publishing fixture.
Pipeline-Arguments.Tests.ps1 Checks the authentication CI matrix.
Build-Orchestration.Tests.ps1 Verifies harness orchestration and references.
authentication-validation-stage.yml Adds cross-platform authentication jobs.
dotnet-sqlclient-ci-core.yml Integrates the new CI stage.
BUILDGUIDE.md Documents targets and publishing commands.
build.proj Adds complete and build-only authentication targets.
testing.instructions.md Records authentication fixture conventions.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@paulmedynski paulmedynski added the Area\Azure Connectivity Use this to tag issues that are related to Azure connectivity. label Oct 13, 2026
@paulmedynski paulmedynski added this to the 8.0.0-preview1 milestone Oct 13, 2026
@paulmedynski paulmedynski changed the title Validate authentication scenarios and publishing in both reference modes AOT 6: Validate authentication scenarios and publishing in both reference modes Oct 13, 2026
Copilot AI balanced review requested due to automatic review settings October 13, 2026 17:41
@paulmedynski
paulmedynski removed this pull request from stack #4822 October 13, 2026 17:44
@paulmedynski
paulmedynski added this pull request to stack #4839 October 13, 2026 17:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

BuildTests includes authentication fixtures but silently omits their declared net462 target unless explicitly requested.

1 open finding

🧠 Review effort: Balanced

Comment thread build.proj

<!-- BuildTests: Builds the driver test projects for their declared target frameworks. -->
<Target Name="BuildTests" DependsOnTargets="BuildAbstractionsTests;BuildAkvProviderTests;BuildSqlClientTestsUnit;BuildSqlClientTestsFunctional;BuildSqlClientTestsManual;BuildSqlClientTestsPerformance;BuildSqlClientTestsStress;BuildAzureTests" />
<Target Name="BuildTests" DependsOnTargets="BuildAbstractionsTests;BuildAkvProviderTests;BuildSqlClientTestsUnit;BuildSqlClientTestsFunctional;BuildSqlClientTestsManual;BuildSqlClientTestsPerformance;BuildSqlClientTestsStress;BuildAzureTests;BuildAuthenticationTests" />
@paulmedynski paulmedynski changed the title AOT 6: Validate authentication scenarios and publishing in both reference modes AOT 7: Validate authentication scenarios and publishing in both reference modes Oct 13, 2026
Copilot AI balanced review requested due to automatic review settings October 14, 2026 11:36
@paulmedynski
paulmedynski force-pushed the dev/paul/aot/phase-1.6 branch from 7c3e459 to 02d0134 Compare October 14, 2026 11:36
@paulmedynski
paulmedynski removed this pull request from stack #4839 October 14, 2026 11:39
@paulmedynski paulmedynski changed the title AOT 7: Validate authentication scenarios and publishing in both reference modes AOT 5: Validate authentication scenarios and publishing in both reference modes Oct 14, 2026
@paulmedynski
paulmedynski added this pull request to stack #4841 October 14, 2026 11:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The new cross-platform package and NativeAOT CI paths have not yet been compiled or executed remotely, including Windows CLR coverage.

1 open finding

🧠 Review effort: Balanced

paulmedynski added a commit that referenced this pull request Oct 14, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@paulmedynski paulmedynski moved this from To triage to In progress in SqlClient Board Oct 14, 2026
paulmedynski added a commit that referenced this pull request Oct 16, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@paulmedynski
paulmedynski removed this pull request from stack #4841 October 16, 2026 13:39
@paulmedynski
paulmedynski added this pull request to stack #4853 October 16, 2026 13:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Path comparisons in the orchestration tests reject valid Windows paths.

2 open findings

🧠 Review effort: Balanced

'-p:BuildNumber=123.4', '-p:BuildSuffix=probe', '-p:AuthenticationPublish=true'
)
$script = $arguments[([array]::IndexOf($arguments, '-File') + 1)]
[System.IO.Path]::GetFullPath($script) | Should -Be "$repoRoot/src/Microsoft.Data.SqlClient/tests/AuthenticationTests/RunAuthenticationTests.ps1"
@paulmedynski paulmedynski changed the title AOT 5: Validate authentication scenarios and publishing in both reference modes AOT 6: Validate authentication scenarios and publishing in both reference modes Oct 16, 2026
@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (dev/paul/aot/phase-1.5@332f2bc). Learn more about missing BASE report.

Additional details and impacted files
@@                    Coverage Diff                    @@
##             dev/paul/aot/phase-1.5    #4817   +/-   ##
=========================================================
  Coverage                          ?   65.52%           
=========================================================
  Files                             ?      285           
  Lines                             ?    68307           
  Branches                          ?        0           
=========================================================
  Hits                              ?    44761           
  Misses                            ?    23546           
  Partials                          ?        0           
Flag Coverage Δ
PR-SqlClient-Project 65.52% <ø> (?)

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

☔ View full report in Codecov by Harness.
📢 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.

paulmedynski added a commit that referenced this pull request Oct 16, 2026
Keep the process-isolated configuration harness, runner, and build wiring in the authentication scenarios PR.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
paulmedynski added a commit that referenced this pull request Oct 16, 2026
Preserve the final scenario harness, publishing checks, CI wiring and orchestration tests from the original #4817 layer while dropping obsolete intermediate fixture deferrals during restacking.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@paulmedynski
paulmedynski force-pushed the dev/paul/aot/phase-1.6 branch from d6bc218 to e329317 Compare October 16, 2026 18:04
Copilot AI balanced review requested due to automatic review settings October 16, 2026 18:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Windows path comparisons in the orchestration tests still reject correctly generated paths.

2 open findings

🧠 Review effort: Balanced

paulmedynski added a commit that referenced this pull request Oct 19, 2026
Keep the process-isolated configuration harness, runner, and build wiring in the authentication scenarios PR.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
paulmedynski added a commit that referenced this pull request Oct 19, 2026
The replacement-driver fixture is used only by the deferred ConfigurationTest executable; keep runtime-family unit tests in this PR.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
paulmedynski added a commit that referenced this pull request Oct 19, 2026
Move configuration and dependent runtime-version executable fixtures, their runner, solution entries, and build targets to the scenario-validation PR. Retain registry and runtime-version unit coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
paulmedynski added a commit that referenced this pull request Oct 19, 2026
Preserve the final scenario harness, publishing checks, CI wiring and orchestration tests from the original #4817 layer while dropping obsolete intermediate fixture deferrals during restacking.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@paulmedynski
paulmedynski force-pushed the dev/paul/aot/phase-1.6 branch from e329317 to cf582e2 Compare October 19, 2026 17:13
Copilot AI balanced review requested due to automatic review settings October 19, 2026 17:13
@paulmedynski paulmedynski changed the title AOT 6: Validate authentication scenarios and publishing in both reference modes AOT 7: Validate authentication scenarios and publishing in both reference modes Oct 19, 2026
@paulmedynski
paulmedynski removed this pull request from stack #4853 October 19, 2026 17:16
@paulmedynski
paulmedynski added this pull request to stack #4861 October 19, 2026 17:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Successful Windows runtime-replacement and Linux trimmed/NativeAOT validation remains unverified for both reference modes.

2 open issues

Review effort: Balanced

Preserve the final scenario harness, publishing checks, CI wiring and orchestration tests from the original #4817 layer while dropping obsolete intermediate fixture deferrals during restacking.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 19, 2026 19:07
@paulmedynski
paulmedynski force-pushed the dev/paul/aot/phase-1.6 branch from cf582e2 to b8c7e0c Compare October 19, 2026 19:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Verified Linux trimmed/NativeAOT and Windows .NET Framework execution results are still needed for both reference modes.

2 open issues

Review effort: Balanced

This branch has not been deployed

No deployments
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

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants