Skip to content

Categorize Entra integrated test as interactive - #4510

Draft
paulmedynski wants to merge 3 commits into
mainfrom
dev/paul/sspi-azure
Draft

Categorize Entra integrated test as interactive#4510
paulmedynski wants to merge 3 commits into
mainfrom
dev/paul/sspi-azure

Conversation

@paulmedynski

@paulmedynski paulmedynski commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description

Categorizes ADIntegratedUsingSSPI as interactive using the Azure test project's existing trait convention. The standard category!=interactive filters now exclude the test from non-interactive runs.

The failed PR build exposed a casing mismatch: the repository filters use lowercase interactive, while the two Azure interactive tests used Interactive. Both trait values are now normalized to lowercase for reliable hosted-agent filtering.

The test requires a signed-in Windows user identity that can acquire a Microsoft Entra token and is authorized on an Entra-enabled SQL target. SupportsIntegratedSecurity only establishes Windows Integrated Security readiness and is not a proxy for that environment.

The durable Entra Integrated CI environment remains tracked separately; this change classifies the current execution requirement rather than closing that coverage gap.

Copilot AI review requested due to automatic review settings August 7, 2026 16:00
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Aug 7, 2026
@paulmedynski
paulmedynski marked this pull request as ready for review August 7, 2026 16:01
@paulmedynski
paulmedynski requested a review from a team as a code owner August 7, 2026 16:01
@paulmedynski paulmedynski added this to the 7.1.0-preview3 milestone Aug 7, 2026
@paulmedynski paulmedynski moved this from To triage to In review in SqlClient Board Aug 7, 2026
@paulmedynski paulmedynski added the Area\Tests Issues that are targeted to tests or test projects label Aug 7, 2026
@paulmedynski
paulmedynski enabled auto-merge (squash) August 7, 2026 16:01

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.

Pull request overview

Updates the inline commentary above the ADIntegratedUsingSSPI test to more accurately explain why the test was previously skipped in certain CI jobs and why it fails when it does run (missing Entra-integrated user context in CI). This fits within the SqlClient Extensions Azure test suite by clarifying expected CI limitations without changing behavior.

Changes:

  • Replaces the prior brief explanation with a more detailed, pipeline-configuration-focused explanation of the skip/failure conditions.
  • Retains the existing ActiveIssue annotation and associated failure-output context.

// This test was skipped in the 6.0/6.1 CI jobs because SupportsIntegratedSecurity
// was passed as a runtime variable to a compile-time pipeline expression. After that
// configuration was fixed, the test began running and exposed that the CI environment
// does not provide the Entra-integrated user context required by Active Directory Integrated:

@cheenamalhotra cheenamalhotra Aug 7, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We don't have env to run this test, and it was correctly controlled by the SupportsIntegratedSecurity property. It should be possible to run this manually in a supported Windows env by setting this config to true.

Why not fix the test source code such that it continues to skip as before?

@paulmedynski paulmedynski Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It was being skipped because SupportsIntegratedSecurity was always false due to a bug. By the time I fixed that bug, I had already marked the test as ActiveIssue. Now that we know we don't have a CI environment suitable for running this test, we can re-classify it as "Must be run by a human", which we already have a trait called "Interactive" for. I will update the trait. From what I can tell SupportsIntegratedSecurity is meant to gate Windows Integrated auth secnarios. This test needs Entra integration, which is a separate beast entirely.

@cheenamalhotra cheenamalhotra Aug 7, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No, Active Directory Integrated authentication can be triggered by SSPI (windows auth) workflow when targeting Azure SQL, this is a supported driver scenario. That's why this test is called "ADIntegratedUsingSSPI".'

https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/winauth-azuread-overview?view=azuresql

@cheenamalhotra cheenamalhotra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a manual test. It should be skipped as before using the same config.

@github-project-automation github-project-automation Bot moved this from In review to Waiting for customer in SqlClient Board Aug 7, 2026
Copilot AI review requested due to automatic review settings August 7, 2026 18:20
@paulmedynski paulmedynski changed the title Clarify Entra integrated test failure Categorize Entra integrated test as interactive Aug 7, 2026

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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

src/Microsoft.Data.SqlClient.Extensions/Azure/test/AADConnectionTest.cs:90

  • PR description says the test comment change retains the ActiveIssue annotation, but the diff removes [ActiveIssue(...)] entirely. If the work item link is still meant to be tracked on the test, re-add the attribute (it can coexist with the Interactive category) or update the PR description to match the new approach.
    // This test requires a signed-in user identity configured for Entra Integrated
    // authentication and is excluded from non-interactive test runs by default.
    [Trait("Category", "Interactive")]

Copilot AI review requested due to automatic review settings August 7, 2026 19:36

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

}

[Fact]
[Trait("Category", "Interactive")]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For consistency with the casing of our other traits.

[ActiveIssue("https://sqlclientdrivers.visualstudio.com/ADO.Net/_workitems/edit/45941")]
// This test requires a signed-in user identity configured for Entra Integrated
// authentication and is excluded from non-interactive test runs by default.
[Trait("Category", "interactive")]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

build.proj skips interactive tests by default, so this will not run in CI.

@paulmedynski
paulmedynski marked this pull request as draft August 7, 2026 19:47
auto-merge was automatically disabled August 7, 2026 19:47

Pull request was converted to draft

@paulmedynski paulmedynski moved this from Waiting for customer to In progress in SqlClient Board Aug 7, 2026
@paulmedynski

paulmedynski commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Putting back into Draft while I track down which SSPI/Integrated Security tests can run in CI, and which cannot. PR #3887 enabled SupportsIntegratedSecurity for a bunch of test jobs, and then this test broke. However, I believe there were other tests that started running after the fix that didn't break, so I don't think we want to disabled SupportsIntegratedSecurity universally like it was prior to the PR fix. I see in that PR that a few other tests were marked as failing, so perhaps they are like this one - use SSPI but cannot run in CI.

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.83%. Comparing base (deabcc2) to head (ec17b6f).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4510      +/-   ##
==========================================
- Coverage   64.71%   62.83%   -1.89%     
==========================================
  Files         288      283       -5     
  Lines       44088    67041   +22953     
==========================================
+ Hits        28532    42124   +13592     
- Misses      15556    24917    +9361     
Flag Coverage Δ
CI-SqlClient ?
PR-SqlClient-Project 62.83% <ø> (?)

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.

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

Labels

Area\Tests Issues that are targeted to tests or test projects

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

4 participants