Skip to content

Fix Ubuntu makepfxcert.ps1 problems#3980

Merged
mdaigle merged 1 commit intomainfrom
dev/paul/ubuntu-openssl
Mar 5, 2026
Merged

Fix Ubuntu makepfxcert.ps1 problems#3980
mdaigle merged 1 commit intomainfrom
dev/paul/ubuntu-openssl

Conversation

@paulmedynski
Copy link
Copy Markdown
Contributor

@paulmedynski paulmedynski commented Feb 25, 2026

Description

Code changes:

  • Updated makepfxcert.ps1 to use improved FQCN lookup, and only install OpenSSL module it if isn't installed already.
  • Improved diatnostigs when running powershell scripts as part of certificate tests.
    These changes will help us diagnose what is hanging the script.

In the meantime, I have also updated our 1ES Ubuntu images to install the powershell OpenSSL module, so the script won't have to.

Testing

  • PR pipelines will confirm any regressions.
  • Manual run of CI pipelines will show the new diagnostics, and confirm the 1ES image updates.

- Updated makepfxcert.ps1 to use improved FQCN lookup, and only install OpenSSL module it if isn't installed already.
- Improved diatnostigs when running powershell scripts as part of certificate tests.
@paulmedynski paulmedynski added this to the 7.0.0-preview4 milestone Feb 25, 2026
@paulmedynski paulmedynski requested a review from a team as a code owner February 25, 2026 12:41
Copilot AI review requested due to automatic review settings February 25, 2026 12:41
@paulmedynski paulmedynski added the Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. label Feb 25, 2026
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Feb 25, 2026
Copy link
Copy Markdown
Contributor Author

@paulmedynski paulmedynski left a comment

Choose a reason for hiding this comment

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

Commentary for reviewers.

Comment thread src/Microsoft.Data.SqlClient/tests/ManualTests/makepfxcert.ps1
Copy link
Copy Markdown
Contributor

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 updates the manual certificate-generation flow used by CertificateTestWithTdsServer on Ubuntu/Linux, aiming to reduce hangs and improve diagnostics when running the PowerShell-based certificate scripts in CI.

Changes:

  • Update makepfxcert.ps1 FQDN lookup logic and avoid reinstalling the OpenSSL PowerShell module when already present.
  • Improve PowerShell script execution diagnostics by capturing and labeling stdout/stderr output in the manual test harness.

Reviewed changes

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

File Description
src/Microsoft.Data.SqlClient/tests/ManualTests/makepfxcert.ps1 Adjusts host/FQDN resolution and makes OpenSSL module installation conditional; adds PowerShell tracing.
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionTestWithSSLCert/CertificateTestWithTdsServer.cs Refactors PowerShell invocation to use pwsh on non-Windows and improves captured output formatting.

Comment thread src/Microsoft.Data.SqlClient/tests/ManualTests/makepfxcert.ps1
Comment thread src/Microsoft.Data.SqlClient/tests/ManualTests/makepfxcert.ps1
@paulmedynski paulmedynski moved this from To triage to In review in SqlClient Board Feb 25, 2026
@paulmedynski paulmedynski modified the milestones: 7.0.0-preview4, 7.0.0 Feb 26, 2026
@mdaigle mdaigle merged commit aa2c357 into main Mar 5, 2026
300 checks passed
@mdaigle mdaigle deleted the dev/paul/ubuntu-openssl branch March 5, 2026 21:17
@github-project-automation github-project-automation Bot moved this from In review to Done in SqlClient Board Mar 5, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (a68e00f) to head (15156a0).
⚠️ Report is 32 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #3980       +/-   ##
==========================================
- Coverage   75.22%       0   -75.23%     
==========================================
  Files         266       0      -266     
  Lines       42932       0    -42932     
==========================================
- Hits        32294       0    -32294     
+ Misses      10638       0    -10638     
Flag Coverage Δ
addons ?
netcore ?
netfx ?

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.

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

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants