Skip to content

Commit 7903126

Browse files
committed
Merge main
2 parents bc78fae + 1eabf80 commit 7903126

File tree

489 files changed

+31451
-42324
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

489 files changed

+31451
-42324
lines changed

.config/tsaoptions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"repositoryName": "SqlClient",
88
"codebaseName": "SqlClient",
99
"allTools": true,
10-
"template": "MSDATA_RevolutionR",
10+
"template": "MSDATA_RevolutionR_Overloaded0",
1111
"language": "csharp",
1212
"includePathPatterns": "src/Microsoft.Data.SqlClient/*, src/Microsoft.SqlServer.Server/*, tools/*",
1313
"excludePathPatterns": "src/Microsoft.Data.SqlClient/tests/*"

.github/CODEOWNERS

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#==============================================================================
2+
# This is the global GitHub code owners file for the SqlClient repo. No other
3+
# CODEOWNERS files should exist in the repo.
4+
#
5+
# Code owners documentation is here:
6+
#
7+
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
8+
9+
# The entire repo is owned by the SqlClientDevTeam GitHub team:
10+
#
11+
# https://github.com/orgs/dotnet/teams/sqlclientdevteam
12+
#
13+
# This team must be configured with write access to the repo for code ownership
14+
# rules to apply.
15+
#
16+
# The main branch should also be protected and require all PRs to be approved
17+
# by owners. See:
18+
#
19+
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-pull-request-reviews-before-merging
20+
#
21+
# There should be no other owners specified in the repo.
22+
#
23+
* @dotnet/sqlclientdevteam
24+
25+
#==============================================================================

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
5-
labels: 'Triage Needed'
6-
assignees: ''
4+
title: ""
5+
labels: [":new: Triage Needed", ":bug: Bug!"]
6+
assignees: []
77

88
---
99

@@ -31,9 +31,9 @@ A clear and concise description of what you expected to happen.
3131

3232
### Further technical details
3333
Microsoft.Data.SqlClient version: (found on the nuget or Microsoft.Data.SqlClient.dll)
34-
.NET target: (e.g. Framework 4.7.1, Core 2.2.2)
35-
SQL Server version: (e.g. SQL Server 2017)
36-
Operating system: (e.g. Windows 2019, Ubuntu 18.04, macOS 10.13, Docker container)
34+
.NET target: (e.g. .NET Framework 4.7.2, .NET 6.0)
35+
SQL Server version: (e.g. SQL Server 2022)
36+
Operating system: (e.g. Windows Server 2022, Ubuntu 24.04, macOS 14.7.1, Docker container)
3737

3838
**Additional context**
39-
Add any other context about the problem here.
39+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: SqlClient Community Support / Discussions
4+
url: https://github.com/dotnet/SqlClient/discussions
5+
about: Please ask and answer questions here.
6+
- name: MSRC Vulnerability Reporting / Bug Bounty
7+
url: https://msrc.microsoft.com/create-report
8+
about: Please report security vulnerabilities here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: ''
5-
labels: 'Triage Needed'
6-
assignees: ''
4+
title: ""
5+
labels: [":new: Triage Needed", ":bulb: Enhancement"]
6+
assignees: []
77

88
---
99

@@ -17,4 +17,4 @@ A clear and concise description of what you want to happen.
1717
A clear and concise description of any alternative solutions or features you've considered.
1818

1919
### Additional context
20-
Add any other context about the feature request here.
20+
Add any other context about the feature request here.

.github/ISSUE_TEMPLATE/other.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
---
22
name: Other
33
about: Ask a question or file a different type of issue
4-
title: ''
5-
labels: 'Triage Needed'
6-
assignees: ''
7-
8-
---
9-
4+
title: ""
5+
labels: [":new: Triage Needed"]
6+
assignees: []
107

8+
---

.github/pull_request_template.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## Description
2+
3+
Provide a summary of the changes being introduced. Important topics to cover
4+
include:
5+
6+
- Description of the functionality.
7+
- API changes, backwards compatibility, deprecations, etc.
8+
- Documentation, localization.
9+
- Bug fixes.
10+
- Code hygiene, refactoring, improvements.
11+
- Engineering processes (CI, pipelines, test coverage)
12+
13+
High quality descriptions will lead to a smoother review experience.
14+
15+
## Issues
16+
17+
Link to any relevant issues, bugs, or discussions (e.g., "Closes \#123", "Fixes
18+
issue \#456").
19+
20+
## Testing
21+
22+
Describe the automated tests (unit, integration) you created or modified.
23+
Provide justification for any gap in automated testing. List any manual testing
24+
steps that were performed to ensure the changes work. 
25+
26+
## Guidelines
27+
28+
Please review the contribution guidelines before submitting a pull request:
29+
30+
- [Contributing](/CONTRIBUTING.md)
31+
- [Code of Conduct](/CODE_OF_CONDUCT.md)
32+
- [Best Practices](/policy/coding-best-practices.md)
33+
- [Coding Style](/policy/coding-style.md)
34+
- [Review Process](/policy/review-process.md)

BUILDGUIDE.md

Lines changed: 112 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Once the environment is setup properly, execute the desired set of commands belo
3030
|`RunTests`|Runs the functional and manual tests for the .NET Framework and .NET drivers|
3131
|`RunFunctionalTests`|Runs just the functional tests for the .NET Framework and .NET drivers|
3232
|`RunManualTests`|Runs just the manual tests for the .NET Framework and .NET drivers|
33+
|`BuildAkv`|Builds the Azure Key Vault Provider package for all supported platforms.|
3334

3435

3536
### Parameters
@@ -306,7 +307,7 @@ To run the same:
306307
The program 'dotnet' has exited with code 0 (0x0).
307308
```
308309
309-
5. Now you can write code in [Program.cs](/src/Microsoft.Data.SqlClient/tests/DockerLinuxTest/Program.cs) to debug SqlClient on Linux!
310+
5. Now you can write code in [Program.cs](/src/Microsoft.Data.SqlClient/tests/Docker/DockerLinuxTest/Program.cs) to debug SqlClient on Linux!
310311
311312
### Troubleshooting Docker issues
312313
@@ -338,14 +339,118 @@ dotnet test <test_properties...> --collect:"XPlat Code Coverage"
338339

339340
## Run Performance Tests
340341

341-
### Running Performance test project directly
342+
The performance tests live here:
343+
`src\Microsoft.Data.SqlClient\tests\PerformanceTests\`
342344

343-
Project location from Root: `src\Microsoft.Data.SqlClient\tests\PerformanceTests\Microsoft.Data.SqlClient.PerformanceTests.csproj`
344-
Configure `runnerconfig.json` file with connection string and preferred settings to run Benchmark Jobs.
345+
They can be run from the command line by following the instructions below.
346+
347+
Launch a shell and change into the project directory:
348+
349+
PowerShell:
350+
351+
```pwsh
352+
> cd src\Microsoft.Data.SqlClient\tests\PerformanceTests
353+
```
354+
355+
Bash:
356+
357+
```bash
358+
$ cd src/Microsoft.Data.SqlClient/tests/PerformanceTests
359+
```
360+
361+
### Create Database
362+
363+
Create an empty database for the benchmarks to use. This example assumes
364+
a local SQL server instance using SQL authentication:
345365

346366
```bash
347-
cd src\Microsoft.Data.SqlClient\tests\PerformanceTests
348-
dotnet run -c Release -f net8.0
367+
$ sqlcmd -S localhost -U sa -P password
368+
1> create database [sqlclient-perf-db]
369+
2> go
370+
1> quit
371+
```
372+
373+
The default `runnerconfig.json` expects a database named `sqlclient-perf-db`,
374+
but you may change the config to use any existing database. All tables in
375+
the database will be dropped when running the benchmarks.
376+
377+
### Configure Runner
378+
379+
Configure the benchmarks by editing the `runnerconfig.json` file directly in the
380+
`PerformanceTests` directory with an appropriate connection string and benchmark
381+
settings:
382+
383+
```json
384+
{
385+
"ConnectionString": "Server=tcp:localhost; Integrated Security=true; Initial Catalog=sqlclient-perf-db;",
386+
"UseManagedSniOnWindows": false,
387+
"Benchmarks":
388+
{
389+
"SqlConnectionRunnerConfig":
390+
{
391+
"Enabled": true,
392+
"LaunchCount": 1,
393+
"IterationCount": 50,
394+
"InvocationCount":30,
395+
"WarmupCount": 5,
396+
"RowCount": 0
397+
},
398+
...
399+
}
400+
}
349401
```
350402

351-
_Only "**Release** Configuration" applies to Performance Tests_
403+
Individual benchmarks may be enabled or disabled, and each has several
404+
benchmarking options for fine tuning.
405+
406+
After making edits to `runnerconfig.json` you must perform a build which will
407+
copy the file into the `artifacts` directory alongside the benchmark DLL. By
408+
default, the benchmarks look for `runnerconfig.json` in the same directory as
409+
the DLL.
410+
411+
Optionally, to avoid polluting your git workspace and requring a build after
412+
each config change, copy `runnerconfig.json` to a new file, make your edits
413+
there, and then specify the new file with the RUNNER_CONFIG environment
414+
variable.
415+
416+
PowerShell:
417+
418+
```pwsh
419+
> copy runnerconfig.json $HOME\.configs\runnerconfig.json
420+
421+
# Make edits to $HOME\.configs\runnerconfig.json
422+
423+
# You must set the RUNNER_CONFIG environment variable for the current shell.
424+
> $env:RUNNER_CONFIG="${HOME}\.configs\runnerconfig.json"
425+
```
426+
427+
Bash:
428+
429+
```bash
430+
$ cp runnerconfig.json ~/.configs/runnerconfig.json
431+
432+
# Make edits to ~/.configs/runnerconfig.json
433+
434+
# Optionally export RUNNER_CONFIG.
435+
$ export RUNNER_CONFIG=~/.configs/runnerconfig.json
436+
```
437+
438+
### Run Benchmarks
439+
440+
All benchmarks must be compiled and run in **Release** configuration.
441+
442+
PowerShell:
443+
444+
```pwsh
445+
> dotnet run -c Release -f net9.0
446+
```
447+
448+
Bash:
449+
450+
```bash
451+
# Omit RUNNER_CONFIG if you exported it earlier, or if you're using the
452+
# copy prepared by the build.
453+
$ dotnet run -c Release -f net9.0
454+
455+
$ RUNNER_CONFIG=~/.configs/runnerconfig.json dotnet run -c Release -f net9.0
456+
```

0 commit comments

Comments
 (0)