Skip to content

Conversation

paulmedynski
Copy link
Contributor

Description

  • Added configurable test jobs timeout, defaulting to 90 minutes.

- Added configurable test jobs timeout, defaulting to 90 minutes.
@paulmedynski paulmedynski added this to the 7.0-preview1 milestone Sep 2, 2025
@paulmedynski paulmedynski added the Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. label Sep 2, 2025
@paulmedynski paulmedynski marked this pull request as ready for review September 2, 2025 12:17
@Copilot Copilot AI review requested due to automatic review settings September 2, 2025 12:17
@paulmedynski paulmedynski requested a review from a team as a code owner September 2, 2025 12:17
Copy link
Contributor

@Copilot 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

This PR adds configurable timeout for test jobs to improve CI/CD pipeline reliability by allowing longer execution times for tests that exceed the default 60-minute timeout.

  • Adds a new testsTimeout parameter with a default value of 90 minutes across all pipeline files
  • Applies the timeout configuration to all test job templates to handle longer-running tests on different OSes and configurations
  • Maintains backward compatibility by providing sensible defaults while allowing customization when needed

Reviewed Changes

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

Show a summary per file
File Description
eng/pipelines/dotnet-sqlclient-signing-pipeline.yml Adds testsTimeout parameter and passes it to the extended template
eng/pipelines/dotnet-sqlclient-ci-project-reference-pipeline.yml Adds testsTimeout parameter and forwards it to the core CI pipeline
eng/pipelines/dotnet-sqlclient-ci-package-reference-pipeline.yml Adds testsTimeout parameter and forwards it to the core CI pipeline
eng/pipelines/dotnet-sqlclient-ci-core.yml Adds testsTimeout parameter and passes it to the test stage template
eng/pipelines/common/templates/stages/ci-run-tests-stage.yml Adds testsTimeout parameter and forwards it to individual test job templates
eng/pipelines/common/templates/jobs/run-tests-package-reference-job.yml Adds timeout parameter and applies it as timeoutInMinutes for the job
eng/pipelines/common/templates/jobs/ci-run-tests-job.yml Adds timeout parameter and applies it as timeoutInMinutes for the job

Copy link

codecov bot commented Sep 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.22%. Comparing base (cf2bdc7) to head (69495bb).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3591      +/-   ##
==========================================
+ Coverage   63.19%   64.22%   +1.02%     
==========================================
  Files         274      275       +1     
  Lines       62478    61518     -960     
==========================================
+ Hits        39486    39509      +23     
+ Misses      22992    22009     -983     
Flag Coverage Δ
addons 90.82% <ø> (ø)
netcore 67.66% <ø> (+0.89%) ⬆️
netfx 67.38% <ø> (+1.20%) ⬆️

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.

@mdaigle mdaigle self-assigned this Sep 2, 2025
- Reduce generated database names to 96 chars to try to fix macOS test failures.
Copy link
Contributor

@benrr101 benrr101 left a comment

Choose a reason for hiding this comment

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

Timeout seems like a bandaid, but hopefully it'll help limp us along.
Max name seems like a good change.

@benrr101 benrr101 merged commit 796bc61 into main Sep 2, 2025
250 checks passed
@benrr101 benrr101 deleted the dev/paul/pipeline-timeouts branch September 2, 2025 21:46
paulmedynski added a commit that referenced this pull request Sep 3, 2025
- Backported part of #3494 and all of #3591:
  - Added configurable test jobs timeout, defaulting to 90 minutes.
  - Reduced generated database names to 96 chars to try to fix macOS test failures.
paulmedynski added a commit that referenced this pull request Sep 3, 2025
- Backported part of #3494 and all of #3591:
  - Added configurable test jobs timeout, defaulting to 90 minutes.
  - Reduced generated database names to 96 chars to try to fix macOS test failures.Increase test jobs timeout (#3591)
@benrr101 benrr101 changed the title Increase test jobs timeout Tests | Increase test jobs timeout, shorten macos max db name Sep 3, 2025
paulmedynski added a commit that referenced this pull request Sep 3, 2025
- Backported part of #3494 and #3591:
  - Added configurable test jobs timeout, defaulting to 90 minutes.
  - Reduced generated database names to 96 chars to try to fix macOS test failures.
paulmedynski added a commit that referenced this pull request Sep 3, 2025
- Backported part of #3494 and #3591:
  - Added configurable test jobs timeout, defaulting to 90 minutes.
  - Reduced generated database names to 96 chars to try to fix macOS test failures.
benrr101 pushed a commit that referenced this pull request Sep 3, 2025
- Backported part of #3494 and all of #3591:
  - Added configurable test jobs timeout, defaulting to 90 minutes.
  - Reduced generated database names to 96 chars to try to fix macOS test failures.
paulmedynski added a commit that referenced this pull request Sep 10, 2025
- Backported part of #3494 and all of #3591:
  - Added configurable test jobs timeout, defaulting to 90 minutes.
  - Reduced generated database names to 96 chars to try to fix macOS test failures.Increase test jobs timeout (#3591)

- Fixed the unique name generators to:
  - Keep max lengths to 30 and 96 characters respectively.
  - Ensure uniqueness at the start of the names.
  - Added link to database identifier syntax.
cheenamalhotra pushed a commit that referenced this pull request Sep 26, 2025
* User Story 38467: Backport mac server name fix

- Backported part of #3494 and all of #3591:
  - Added configurable test jobs timeout, defaulting to 90 minutes.
  - Reduced generated database names to 96 chars to try to fix macOS test failures.Increase test jobs timeout (#3591)

- Fixed the unique name generators to:
  - Keep max lengths to 30 and 96 characters respectively.
  - Ensure uniqueness at the start of the names.
  - Added link to database identifier syntax.

* User Story 38467: Backport mac server name fix

- Added a new test that was erroneously removed in the earlier cherry-pick.
- Added MDS_TEST_CONFIG environment variable to unit test config to override where the confi.json file is read from.
- Updated xUnit to 2.9.3 to avoid transitive System.Net.Http vulnerability warnings.

* Add retry on deadlock for sp_help (#3025)

Add parameter to sp_help

* User Story 38467: Backport mac server name fix

- Fixed cherry-pick of old function name.

* User Story 38467: Backport mac server name fix

- Removed macOS Azure SQL test configuration that uses service principal based auth that our Azure tenant no longer supports.

* User Story 38467: Backport mac server name fix

- Adding console diagnostics to slow enclave tests.

* User Story 38467: Backport mac server name fix

- Adding console diagnostics to slow enclave tests.

* User Story 38467: Backport mac server name fix

- Adding console diagnostics to slow enclave tests.

* Tests | Remove hardcoded credentials from ManualTests (#3204)

* Initial removal of CertificateUtility.CreateCertificate

One test implied that DataTestUtility.AKVUrl would point to an RSA key which aligned with the certificate's private key. Switching this to dynamically generate the key in places.

* Hotfix for Azure Key Vault tests

* Removed hardcoded references to Azure Key Vault key

* Removed hardcoded references to CertificateUtilityWin

These were mostly related to generating CSP keys.

* Code review changes

* Reorder properties and constructors
* Move AEConnectionStringProviderWithCspParameters to its own file
* Tweak to the AKV token acquisition

* Code review

Redundant bracket, alphabetised the ManualTesting csproj

* Update src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/SQLSetupStrategy.cs

Let's try @edwardneal's idea

Co-authored-by: Edward Neal <55035479+edwardneal@users.noreply.github.com>

* Update src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/SQLSetupStrategy.cs

Co-authored-by: Edward Neal <55035479+edwardneal@users.noreply.github.com>

* Fixes as per @edwardneal's suggestions

* Fix as per @edwardneal's suggestion

* Fix missing `new`

Co-authored-by: Edward Neal <55035479+edwardneal@users.noreply.github.com>

* Update src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/SQLSetupStrategyAzureKeyVault.cs

Co-authored-by: Edward Neal <55035479+edwardneal@users.noreply.github.com>

* Update src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/SQLSetupStrategyAzureKeyVault.cs

Co-authored-by: Edward Neal <55035479+edwardneal@users.noreply.github.com>

* Address comment that we don't need a CspParameters object as part of the test arguments
* Move test arguments into property (the class was only used in a single location)
* Cleanup test code
* Tweak default provider discovery code to handle edge cases a bit better

* Address comment regarding readonly member variables
Apply long line chomping

* Addressing the last of the comments.

---------

Co-authored-by: Edward Neal <55035479+edwardneal@users.noreply.github.com>

* - Fixed incorrect unique database object name function that doesn't compile normally.

* Updated TestUtilities project to target the same framework as the test project(s) it is compiling with.

* Removed diagnostic logging now that Enclave tests are passing.

---------

Co-authored-by: Michel Zehnder <MichelZ@users.noreply.github.com>
Co-authored-by: Benjamin Russell <russellben@microsoft.com>
Co-authored-by: Edward Neal <55035479+edwardneal@users.noreply.github.com>
mdaigle added a commit that referenced this pull request Oct 8, 2025
* User Story 38467: Backport mac server name fix

- Backported part of #3494 and #3591:
  - Added configurable test jobs timeout, defaulting to 90 minutes.
  - Reduced generated database names to 96 chars to try to fix macOS test failures.

* User Story 38481: Fix unique db object name issues

- Fixed the unique name generators to:
  - Keep max lengths to 30 and 96 characters respectively.
  - Ensure uniqueness at the start of the names.
  - Added link to database identifier syntax.

* User Story 38481: Fix unique db object name issues

- Removed DateOnly tests that aren't supported on 5.1.

* Add CodeQL suppression for DefaultAzureCredential use in Production (#3542)
  - Adjusted CodeQL suppression to meet the strict requirements of where it may appear relative to the flagged code.
  - Adding catch for macOS socket error to log and ignore.

* - Added back some blocks that were removed by cherry-picks.
- Added console diagnostics to see when Enclave tables are dropped.

* - Fixed typo in code that only gets compiled when building on Windows (eek!)

* Tests | Remove hardcoded credentials from ManualTests (#3204)

* Initial removal of CertificateUtility.CreateCertificate

One test implied that DataTestUtility.AKVUrl would point to an RSA key which aligned with the certificate's private key. Switching this to dynamically generate the key in places.

* Hotfix for Azure Key Vault tests

* Removed hardcoded references to Azure Key Vault key

* Removed hardcoded references to CertificateUtilityWin

These were mostly related to generating CSP keys.

* Code review changes

* Reorder properties and constructors
* Move AEConnectionStringProviderWithCspParameters to its own file
* Tweak to the AKV token acquisition

* Code review

Redundant bracket, alphabetised the ManualTesting csproj

* Update src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/SQLSetupStrategy.cs

Let's try @edwardneal's idea

Co-authored-by: Edward Neal <55035479+edwardneal@users.noreply.github.com>

* Update src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/SQLSetupStrategy.cs

Co-authored-by: Edward Neal <55035479+edwardneal@users.noreply.github.com>

* Fixes as per @edwardneal's suggestions

* Fix as per @edwardneal's suggestion

* Fix missing `new`

Co-authored-by: Edward Neal <55035479+edwardneal@users.noreply.github.com>

* Update src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/SQLSetupStrategyAzureKeyVault.cs

Co-authored-by: Edward Neal <55035479+edwardneal@users.noreply.github.com>

* Update src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/SQLSetupStrategyAzureKeyVault.cs

Co-authored-by: Edward Neal <55035479+edwardneal@users.noreply.github.com>

* Address comment that we don't need a CspParameters object as part of the test arguments
* Move test arguments into property (the class was only used in a single location)
* Cleanup test code
* Tweak default provider discovery code to handle edge cases a bit better

* Address comment regarding readonly member variables
Apply long line chomping

* Addressing the last of the comments.

---------

Co-authored-by: Edward Neal <55035479+edwardneal@users.noreply.github.com>

* Update test utilities target frameworks. Fix compilation issues.

* Construct valid X500 distinguished name.

* Print rsa key type for debugging.

* Clean up net version ifdefs to fix certificate exportability.

---------

Co-authored-by: Benjamin Russell <russellben@microsoft.com>
Co-authored-by: Edward Neal <55035479+edwardneal@users.noreply.github.com>
Co-authored-by: Malcolm Daigle <mdaigle@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants