Repository navigation
Conversation
Route SQL, certificate, and documented Pester module installs through the public feed's PowerShell Gallery upstream. Validate repository registrations and preserve standalone test-output provisioning. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The sole documented Pester setup command fails against the new feed, blocking VersionChecks on clean machines, while the passing regression run used an existing installation and did not verify this bootstrap path.
1 open issue
What changed in this PR
Routes PowerShell module installation through the public SqlClient Azure Artifacts feed, centralizing repository registration without a PSGallery fallback.
Changes:
- Adds a shared registration helper that preserves matching registrations and rejects conflicts.
- Migrates SqlServer and OpenSSL installation sites while preserving existing version pins and reuse behavior.
- Adds registration and deployment tests, and updates developer setup documentation.
| File | Description |
|---|---|
src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj |
Copies the registration helper into test output. |
src/Microsoft.Data.SqlClient/tests/ManualTests/makepfxcert.ps1 |
Uses the governed feed and propagates module provisioning failures. |
eng/scripts/Register-SqlClientPSRepository.ps1 |
Adds shared feed registration and conflict validation. |
eng/scripts/Configure-NetOnlyAccount.ps1 |
Routes pinned SqlServer installation through the helper. |
eng/pipelines/scripts/tests/Register-SqlClientPSRepository.Tests.ps1 |
Tests registration, failure propagation, wiring, and deployment layouts. |
eng/pipelines/scripts/tests/README.md |
Updates Pester setup and test inventory. |
eng/pipelines/scripts/tests/Configure-NetOnlyAccount.Tests.ps1 |
Verifies governed sourcing and stops provisioning on lookup failure. |
eng/pipelines/onebranch/scripts/tests/README.md |
Updates Pester installation to use the governed feed. |
eng/pipelines/ci/kerberos/linux-setup-step.yml |
Uses the helper for SqlServer installation. |
doc/connection-pooling-impersonation.md |
Documents the new net-only provisioning module source. |
BUILDGUIDE.md |
Updates Pester setup and explains feed registration behavior. |
Review effort: Balanced
Derive the feed endpoint from NuGet.config and pass repository names to module consumers. Register once per test job and remove registration and helper deployment from certificate setup. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The required feed reportedly returns HTTP 500 for Pester 5.7.1, while Azure pipeline and Unix certificate provisioning remain unvalidated and require maintainer confirmation and affected-agent execution.
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Supplemental review guidance could not be verified under the review’s trust requirements because only worktree paths were available, without a trusted base SHA or protected copy.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
Restore the queued helper alongside pipeline definitions and cover old package commits with a Git fixture. Document importing Pester once per test session. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
5 open issues
TheInstall-Modulecall is now fail-fast (-ErrorAction Stop), butImport-Module SqlServeris… · New This adds a new template parameter without a default, which forces every consumer of… · New This XPath match is case-sensitive on@key. IfNuGet.configever uses a different casing (e.g.,… · New The repository SourceLocation comparison is case-sensitive (-cne) and string-based, which can… · New This script now uses[System.Environment]::OSVersion.Platform -eq \"Unix\"for the OpenSSL… · New
1 resolved since last review
Review effort: Lite
There was a problem hiding this comment.
🟡 Changes recommended
Managed Instance setup fails when an upstream package commit has an older config without PowerShellRepository, because assigning the missing property throws; the property must be added safely and the older-config case covered by a regression test.
1 open issue
5 resolved since last review
This script now uses[System.Environment]::OSVersion.Platform -eq \"Unix\"for the OpenSSL… The repository SourceLocation comparison is case-sensitive (-cne) and string-based, which can… This XPath match is case-sensitive on@key. IfNuGet.configever uses a different casing (e.g.,… This adds a new template parameter without a default, which forces every consumer of… TheInstall-Modulecall is now fail-fast (-ErrorAction Stop), butImport-Module SqlServeris…
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The Windows Pester bootstrap and current installer template still require real-agent validation, as the reported Azure preview exercised a different template and publisher requirements remain unverified.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ests Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4932 +/- ##
==========================================
+ Coverage 67.68% 70.37% +2.68%
==========================================
Files 311 305 -6
Lines 45249 69577 +24328
==========================================
+ Hits 30629 48964 +18335
- Misses 14620 20613 +5993
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>


Description
Route PowerShell module installs through the existing public SqlClient Azure Artifacts feed and its PowerShell Gallery upstream, using anonymous access and a reusable installation step.
PowerShell.configbesideNuGet.configas the single PowerShell feed-address configuration. It contains the explicit NuGet v2sourceLocation; the registration helper reads it directly.NuGet.configremains unchanged.Register-SqlClientPSRepository.ps1registers the configured source anonymously, preserves matching registrations/trust policy, rejects source/provider conflicts and invalid configuration, and never falls back to PSGallery.install-powershell-module-step.yml, not a separate installer script. The step calls the registration helper and immediately uses its returned name forInstall-Module. It preserves exact version selection, optional installed-module reuse, current-user scope, and explicit clobbering options. Literal module inputs are escaped centrally and runtime macro inputs are rejected.AllowClobber, preserving the existing local/default-instance/set-3 gates. Linux local-server manual jobs including set 1 install OpenSSL; Linux Kerberos jobs install unpinned SqlServer.Install-Modulebefore invoking these scripts; commands are documented in BUILDGUIDE and the related test/account guides.PowerShell.configso the compiled installation step can find its runtime dependencies. Driver source remains aligned with the packages.No public API, package-version, feed-service configuration, or NuGet.config content changes. Private-feed authentication remains deferred to the separate retirement migration. Registration, installation, and consumption run as the same user. Previously conditional installations still reuse existing modules; previously unpinned installations remain unpinned.
Issues
Requested maintainer follow-up after adding PowerShell Gallery as an upstream, including a separate root PowerShell configuration and a reusable step owning registration and installation. Independent of merged SecureString fix #4923; no issue closure.
Testing
Latest validation at
78586d5c8:Coverage includes configuration validation, registration reuse/conflicts, actual inline installation code with mocked module commands, pinned/unpinned availability checks, install options and failure propagation, job-initialization ordering and gates, no installation inside consumer scripts, and account lifecycle/credential disposal/cleanup. A temporary Git repository reproduces checkout of an older commit lacking the registration helper/config and verifies that restoration brings them back without replacing driver source. An initial run exposed a quoting error in the test helper's Azure-expression expansion; correcting that helper produced the passing run above.
Actual full Azure pipeline preview, using existing pipeline 2197 (PR-SqlClient-Project) with this branch and
78586d5c8d86b1a95d4cc55adbbe9ff65879b412asself, without a YAML override:Earlier direct template previews also accepted pinned/unpinned inputs and rejected runtime
$(Injected)module values. Regression tests exercise quote/semicolon/backtick/dollar/newline values as literal data before validation.Actual anonymous feed verification, after introducing the separate config:
During the migration, the same anonymous
Find-Module SqlServer -RequiredVersion 22.4.5.1 -Repository $name -ErrorAction Stopcomparison using PowerShellGet 2.2.5 registered both endpoints successfully, but lookup failed againstnuget/v3/index.jsonand succeeded againstnuget/v2. This is measured behavior for that toolchain, not universal incompatibility of every PowerShell client with NuGet v3. Temporary registrations were removed. EarlierFind-Module/Save-Modulechecks against v2 also passed for SqlServer 22.4.5.1, OpenSSL 1.0.0, and saved Pester 6.2.0; downloaded manifests were validated/imported and the earlier regression suite ran successfully with the freshly downloaded Pester. Temporary downloads were cleaned up.Earlier dual-framework build:
Additional earlier compatibility check:
That packaging-fixture run was not repeated. The previous HEAD's required CI checks passed after targeted retries of unchanged Azure EventSource/transaction-pooling tests; current-HEAD CI results are tracked by the checks panel. SQL/Kerberos integration runs, native Unix certificate generation, and official release pipelines were not run locally. Installer network failures are covered through mocks; actual governed-source discovery/download and Azure expansion are covered separately above. No modules were installed into the developer module directory, and no accounts, SQL logins, or certificates were provisioned locally.
Guidelines
Please review the contribution guidelines before submitting a pull request: