-
Notifications
You must be signed in to change notification settings - Fork 317
Add Debug CI runs #3589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Debug CI runs #3589
Conversation
paulmedynski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding commentary for reviewers.
eng/pipelines/common/templates/jobs/build-signed-package-job.yml
Outdated
Show resolved
Hide resolved
eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml
Show resolved
Hide resolved
eng/pipelines/common/templates/steps/build-and-run-tests-netcore-step.yml
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.TestUtilities/Config.cs
Show resolved
Hide resolved
4494e6f to
a8fc182
Compare
112949c to
8f36c71
Compare
4b25cc6 to
1ebb2d2
Compare
1ebb2d2 to
7b95619
Compare
b503a65 to
3bb1701
Compare
403d0d9 to
9da40ad
Compare
- Changed default build configuration from Release to Debug for CI-SqlClient[-Package] pipelines. - Plumbed 'builConfiguration' template parameter down through all of the pipeline YML files. - Removed the pipeline variable $(Configuration) in favour of buildConfiguration parameter. - Added environment variable override for unit test config file. - Removed triggers and schedules from existing CI pipelines. - Added new pipeline for triggers and schedules that uses Release configuration. - Commented out some failing assertions. - Inhibited the ConnectionPoolTestDebug tests from running since they are flaky. - Commented out more flaky tests. - Doubling the test job timeout for Debug builds. - Fixed a test that incorrectly consumes an exception when it shouldn't. - Added diagnostics to Enclave tests that are failing to help diagnose the issues. - Commented out a failing Debug.Assert(). - Expanded error detection in one test. - Commented out another failing Debug.Assert(). - Fixed exception type check to look for the actual exceptions being thrown. - Updated xUnit config to show complete strings and collections when different. - Updated CI pipelines to be triggered by pushes to main and a schedule only. - Added buildConfiguration all the way down through the test stages/jobs/steps. - Added pipeline URLs to the new PR pipeline YAML files. - Commented out failing test chunk.
9da40ad to
23c261c
Compare
There was a problem hiding this 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 refactors the pipeline configuration system to standardize parameter naming and adds temporary workarounds for failing assertions. The main changes include:
- Renaming
configuration/ConfigurationtobuildConfigurationacross all pipeline files for consistency - Renaming
testsTimeouttotestJobTimeoutand changing its type fromstringtonumber - Adding parameter value constraints (
values: [Debug, Release]) to enforce valid build configurations - Commenting out failing Debug assertions and tests with TODO(GH-3604) markers
- Adding environment variable support for test configuration paths
- Minor formatting and documentation improvements to pipeline files
Reviewed Changes
Copilot reviewed 40 out of 40 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| xunit.runner.json | Adds xUnit configuration options to control output length and live output display |
| Config.cs | Adds support for MDS_TEST_CONFIG environment variable to override config path |
| DataStreamTest.cs | Comments out 4 failing IOException assertions with TODO markers |
| ConnectionPoolTest.Debug.cs | Changes class from static to abstract to prevent xUnit from running tests |
| ApiShould.cs | Fixes exception handling, adds else clause, comments out failing enclave test section |
| VirtualSecureModeEnclaveProvider.cs | Comments out failing Debug.Assert with enhanced error message |
| TdsParser.cs | Comments out 2 SNI error message validation assertions |
| SqlCommand.Reader.cs | Comments out null check assertion for cached async reader |
| AzureAttestationBasedEnclaveProvider.cs | Comments out offset validation assertion |
| AlwaysEncryptedHelperClasses.cs | Comments out uninitialized entry validation assertion |
| DbConnectionInternal.cs | Removes debug-only activation/deactivation counter tracking code |
| Pipeline YAML files (15 files) | Standardizes parameter naming from configuration/Configuration to buildConfiguration, adds value constraints, renames testsTimeout to testJobTimeout, improves documentation and formatting |
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/ApiShould.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/ApiShould.cs
Show resolved
Hide resolved
benrr101
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good to me
NOTE
Most of the pipeline changes in the PR are temporary while we work on the larger pipeline refactoring efforts. The changes to CI-SqlClient and CI-SqlClient-Package to become solely batched and schedule will likely carry over to the new pipelines. The addition of the PR-SqlClient and PR-SqlClient-Package pipelines will remain, but will be re-written as new-and-improved :) The most value we will get from this PR are the fixes to the debug code blocks and Asserts() throughout the codebase, and the stabilization of the tests as a result.
Reviewers
Please focus on the codebase changes more than the pipeline changes. Once merged, I will setup the GitHub checks to trigger the PR-SqlClient and PR-SqlClient-Package pipelines for PR commits, and remove the CI-SqlClient and CI-SqlClient-Package check requirements.
Description
We want to start building and running tests in Debug configuration for some of our pipeline runs. Here is how the pipelines will change:
Unfortunately, Azure Pipelines do not permit dynamic top-level parameters to pipelines, so we can't choose Debug vs Release at trigger time. As a result, the CI-SqlClient and CI-SqlClient-Package pipelines will be used for the batch and scheduled triggers. Two new pipelines, PR-SqlClient and PR-SqlClient-Package will be created to service the PR triggered runs.
However, I can't make these changes yet since Azure Pipelines doen't permit creating new pipelines from YAML files on a branch. The new definition files must be merged to main before the pipelines can be created. So, for now, CI-SqlClient and CI-SqlClient-Package will be updated to use Debug mode so PR triggered tests can run. Once this PR is merged to main, a followup PR will include the shuffling around of YAML files and Azure Pipeline creation/updating.
Changes include:
Testing