Skip to content

fix(mssql): read descriptions from the right database, honour encryption per driver, bound query timeouts (#32574) - #33924

Merged
Khairajani merged 1 commit into
2.0from
backport/mssql-connector-hardening-2.0
Sep 24, 2026
Merged

Khairajani merged 1 commit into
2.0from
backport/mssql-connector-hardening-2.0

Conversation

@Khairajani

@Khairajani Khairajani commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #32574 to 2.0.

Connector-local fixes from the MSSQL connector audit: descriptions were read from the previously connected database, encryption was applied only on pyodbc, no driver bounded its queries, unique constraints were dropped for every table, and indexed views were typed as plain views. The original PR has the full description.

Resolved against 2.0, not taken wholesale

The squashed commit carries context from changes 2.0 does not have, so three things were resolved deliberately:

On 2.0 Why
The bundled UI schema copies (ui/src/jsons/ingestionSchemas, ui/public/jsons/connectionSchemas) stay deleted 2.0 does not ship them. The description edit still reaches SSIS and WhereScape through the $ref they already have on mssqlConnection.json.
MSSQL_GET_QUERY_STORE_STATE keeps 2.0's statement The extra column belongs to a different change; taking my side would have backported it silently.
The GetTables/GetViews probe tests, and the replace import they need, are not brought along They come from #32014, which is not on 2.0, so they would test code that does not exist there.

Verified on this branch

  • 145 unit tests across the MSSQL and SSL suites
  • 11 container tests against SQL Server 2022 (reflection + the per-driver encryption matrix)

RetriggerConfidence Score: 4/5

The connector changes appear behaviorally safe to merge, but the explicit Python test-style requirement must be satisfied first.

Findings

  1. P2 New tests use unittest assertions ▶
  2. P2 Pyodbc encryption goes untested ▶
Summary

The backport switches databases before loading MSSQL descriptions, reflects unique constraints and indexed views, adds driver-specific TLS handling and query timeouts, and updates connector documentation and tests.

  • The connector changes have no established blocking behavioral regression.
  • New tests need to follow the repository’s pytest convention, and live pyodbc encryption remains unverified in CI.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  C[MSSQL service configuration] --> S[Driver-specific TLS setup]
  S --> E[Engine with query timeout]
  E --> D[Switch to target database]
  D --> M[Load descriptions]
  D --> R[Reflect constraints and views]
  M --> O[Catalog metadata]
  R --> O
Loading

Reviews (1) · Last reviewed commit: "fix(mssql): read descriptions from the r..."

…ion per driver, bound query timeouts (#32574)

Backport of #32574 to 2.0.

Resolved against 2.0 rather than taken wholesale, because the squashed commit
carries context from changes 2.0 does not have:

- the bundled UI schema copies under ui/src/jsons/ingestionSchemas and
  ui/public/jsons/connectionSchemas are deleted on 2.0, so they stay deleted;
  the description edit reaches SSIS and WhereScape through the $ref they
  already have on mssqlConnection.json
- MSSQL_GET_QUERY_STORE_STATE keeps 2.0's own statement, since the extra
  column belongs to a different change
- the GetTables/GetViews probe tests and the `replace` import they need come
  from #32014, which is not on 2.0, so neither is brought along

145 unit tests pass across the MSSQL and SSL suites.
@Khairajani
Khairajani requested review from a team as code owners September 24, 2026 06:06
@Khairajani
Khairajani requested review from IceS2 and removed request for a team September 24, 2026 06:06
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@gitar-bot

gitar-bot Bot commented Sep 24, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🔴 High risk · MSSQL driver changes alter transport encryption enforcement and query bounds across workflows.

Backport of MSSQL connector fixes to the 2.0 branch: descriptions now read from the correct database, encryption is honoured per driver, and query timeouts are bounded. Three changes were deliberately resolved for 2.0 compatibility (deleted UI schema copies, kept the existing query store state statement, and omitted probe tests from a different PR). Verified against 145 unit tests and 11 container tests. No issues found.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit c9c8c5eed42e1aa03b0ea77907b012247daf6dc5 in Playwright run 35963218721, attempt 1.

✅ 830 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 47m 55s

⏱️ Max setup 4m 6s · max shard execution 18m 12s · max shard-job elapsed before upload 21m 19s · reporting 9s

🌐 206.51 requests/attempt · 2.47 app boots/UI scenario · 25.92% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 25.92% (convergence target: at most 15%).
  • Browser traffic was 206.51 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.47 per UI scenario (2142 boots / 867 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 138 0 0 0 0 0
✅ Shard chromium-02 184 0 0 0 0 0
✅ Shard chromium-03 147 0 0 0 0 0
✅ Shard chromium-04 141 0 0 0 0 0
✅ Shard data-asset-rules-01 65 0 0 0 0 0
✅ Shard domain-isolation-01 16 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
🟡 Shard ingestion-01 33 0 1 0 0 0
✅ Shard ingestion-02 30 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-01 11 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 1 flaky test(s) (passed on retry)
  • Features/IncidentManager.spec.ts › Complete Incident lifecycle with table owner (shard ingestion-01, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@Khairajani Khairajani added safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Sep 24, 2026
@Khairajani Khairajani removed the skip-pr-checks Bypass PR metadata validation check label Sep 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 67%
67.39% (81235/120539) 52.09% (50102/96172) 52.89% (14876/28121)

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@Khairajani
Khairajani merged commit bf0054e into 2.0 Sep 24, 2026
252 of 286 checks passed
@Khairajani
Khairajani deleted the backport/mssql-connector-hardening-2.0 branch September 24, 2026 07:09

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants