Skip to content

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

Copy link
Copy Markdown
Contributor

Description

Complete the dedicated authentication scenario harness and wire it into standard build orchestration and Linux/Windows CI.

  • Cover current/legacy configuration, initializer activation, configured/application/Azure precedence, invalid provider/initializer/unsupported-provider failures, cached failures, disabled switches and replacement-driver mismatches.
  • Use conditional Project/Package references, standard local package preparation, distinct family versions and isolated caches. Package checks verify the actual local feed, not stale family packages or project references.
  • Publish and execute trimmed and NativeAOT Linux consumers in both reference modes, with compiler/linker warnings as errors. Assert Azure discovery assets are absent and explicit registration succeeds.
  • Include build-only fixture integration and independent Linux modern/publishing and Windows .NET Framework CI jobs.
  • Document commands, prerequisites and the distinction between Linux cross-builds and Windows CLR execution.

Layer 6 of 6 in the seven-PR phase-one authentication stack.

Issues

No issue is automatically closed by this scenario and CI layer.

Testing

Commands ran from the worktree root on Linux x64 with .NET SDK 10.0.401. All commands below beginning with dotnet build used NUGET_PACKAGES=/home/paul/.copilot/session-state/2eb9e30f-a8b8-40d3-ba6a-0f07157aae76/files/pr2-package-cache. Family images used the distinct version 8.0.0-stack.6; external packages were reused without clearing shared caches.

  • dotnet build build.proj -t:TestAuthentication -p:Configuration=Release -p:TestFramework=net10.0 -p:ReferenceType=Project -p:PackageVersionSqlClient=8.0.0-stack.6 -p:AuthenticationPublish=true -v:minimal — passed, all eight scenario processes and both trim/AOT publishes and executions; zero warnings/errors.
  • dotnet build build.proj -t:TestAuthentication -p:Configuration=Release -p:TestFramework=net10.0 -p:ReferenceType=Package -p:PackageVersionSqlClient=8.0.0-stack.6 -p:AuthenticationPublish=true -v:minimal — passed, standard package preparation, all eight genuine Package-mode processes and both trim/AOT publishes and executions; final rerun had zero warnings/errors.
    • Each consumed family package's metadata pointed to the worktree's local package feed. Independently versioned SqlServer.Server/SNI were not treated as synchronized family members.
    • All four publish executions printed PASS: discovery absent; explicit registration succeeds. Runtime asset checks allow harmless documentation/non-runtime package metadata.
    • An earlier cold-cache run emitted two credential-provider cache restore warnings; the final full rerun was clean. Warning gates were not relaxed.
  • dotnet build build.proj -t:BuildAuthenticationTests -p:Configuration=Release -p:TestFramework=net462 -p:ReferenceType=Project -p:PackageVersionSqlClient=8.0.0-stack.6 -v:minimal — passed, fixture cross-build; zero warnings/errors.
  • dotnet build build.proj -t:BuildAuthenticationTests -p:Configuration=Release -p:TestFramework=net462 -p:ReferenceType=Package -p:PackageVersionSqlClient=8.0.0-stack.6 -p:SkipDependencyPack=true -v:minimal — passed, genuine prepared-package fixture cross-build; zero warnings/errors.
  • dotnet build build.proj -t:BuildAuthenticationTests -p:Configuration=Release -p:TestFramework=net10.0 -p:ReferenceType=Project -p:PackageVersionSqlClient=8.0.0-stack.6 -v:minimal — passed, all three fixtures; zero warnings/errors.
  • dotnet build build.proj -t:BuildAuthenticationTests -p:Configuration=Release -p:TestFramework=net10.0 -p:ReferenceType=Package -p:PackageVersionSqlClient=8.0.0-stack.6 -p:SkipDependencyPack=true -v:minimal — passed, all three package fixtures; zero warnings/errors.
  • dotnet build build.proj -t:TestAuthenticationConfiguration -p:Configuration=Debug -p:TestFramework=net10.0 -p:ReferenceType=Project -p:BuildNumber=6.1 -p:BuildSuffix=stack -v:minimal — passed, current/legacy processes with computed package version and Debug forwarding; zero warnings/errors.
  • dotnet build build.proj -t:TestAbstractions -p:Configuration=Release -p:TestFramework=net10.0 -p:ReferenceType=Project -p:PackageVersionSqlClient=8.0.0-stack.6 -v:minimal — passed, 68 tests, none failed/skipped; zero build warnings/errors.
  • mkdir -p .pr6-validation followed by TMPDIR="$PWD/.pr6-validation" TEMP="$PWD/.pr6-validation" TMP="$PWD/.pr6-validation" pwsh -NoProfile -Command '$result = Invoke-Pester -Path eng/pipelines/scripts/tests/Pipeline-Arguments.Tests.ps1,eng/pipelines/scripts/tests/Build-Orchestration.Tests.ps1 -Output Detailed -PassThru; if ($result.FailedCount -ne 0) { exit 1 }' — passed, 119 tests, none failed/skipped. Owned scratch was removed afterward.
  • Both new/updated CI YAML documents parsed with yaml.safe_load; git diff --check — passed.

Windows CLR execution, remote pipeline compilation/execution, the full BuildTests suite, and SQL Server/identity-service integration were not run. Windows CI executes all eight scenarios in both modes when queued; Linux net462 builds are not runtime proof.

The driver localization gate retains the 13 pre-existing untranslated ADP_IsolationLevelResetTimeout findings verified on untouched main in layer 5. No resource, allowlist or gate setting was changed here.

Guidelines

Please review the contribution guidelines before submitting a pull request:

Expand the dedicated harness with configuration precedence, cached failures, switch and runtime mismatch coverage, genuine local package validation, and trimmed/NativeAOT execution. Wire standard build targets and Linux/Windows CI jobs with focused regressions and documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

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

None yet

Projects

Status: To triage

Development

Successfully merging this pull request may close these issues.

2 participants