Skip to content

[sqlserver] Add legacy schema collection integration coverage#23550

Draft
lu-zhengda wants to merge 3 commits intomasterfrom
codex/test-legacy-schema-collection
Draft

[sqlserver] Add legacy schema collection integration coverage#23550
lu-zhengda wants to merge 3 commits intomasterfrom
codex/test-legacy-schema-collection

Conversation

@lu-zhengda
Copy link
Copy Markdown
Contributor

@lu-zhengda lu-zhengda commented Apr 30, 2026

What

Adds integration coverage for the legacy SQL Server schema collection path by forcing STATIC_INFO_MAJOR_VERSION to 13 while running SQLServerSchemaCollector.collect_schemas() against the real SQL Server fixture database.

The test captures the emitted DBM schema metadata and asserts that the legacy path returns real table details, including columns, indexes, partition counts, and foreign keys.

Why

The CI matrix does not include a pre-2017 SQL Server instance, so the legacy schema path needs explicit forced-path coverage to catch crashes or regressions in the real collector flow.

@lu-zhengda lu-zhengda force-pushed the codex/test-legacy-schema-collection branch from 806e570 to f99cedc Compare April 30, 2026 18:27
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 98.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.41%. Comparing base (3fb0c5c) to head (a2b3e1a).
⚠️ Report is 15 commits behind head on master.

Additional details and impacted files
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@datadog-official
Copy link
Copy Markdown
Contributor

datadog-official Bot commented Apr 30, 2026

Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

❄️ 1 New flaky test detected

test_collect_schemas_pre_2017_collects_table_details from test_schemas.py   View in Datadog   (Fix with Cursor)
RetryError[<Future at 0x7f630d192350 state=finished raised SubprocessError>]

ℹ️ Info

No other issues found (see more)

🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 91.67%
Overall Coverage: 90.06%

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: a2b3e1a | Docs | Datadog PR Page | Give us feedback!

@lu-zhengda lu-zhengda force-pushed the codex/reuse-pre2017-schema-connection branch from 6022c47 to 55fe11f Compare April 30, 2026 23:19
@lu-zhengda lu-zhengda force-pushed the codex/test-legacy-schema-collection branch from f99cedc to 43e3700 Compare April 30, 2026 23:19
@lu-zhengda lu-zhengda force-pushed the codex/reuse-pre2017-schema-connection branch from 55fe11f to 317aecc Compare May 1, 2026 13:26
@lu-zhengda lu-zhengda force-pushed the codex/test-legacy-schema-collection branch from 43e3700 to cf5e555 Compare May 1, 2026 13:26
@lu-zhengda lu-zhengda force-pushed the codex/reuse-pre2017-schema-connection branch from 317aecc to e0233ef Compare May 1, 2026 13:30
@lu-zhengda lu-zhengda force-pushed the codex/test-legacy-schema-collection branch from cf5e555 to ca88c70 Compare May 1, 2026 13:31
@lu-zhengda lu-zhengda force-pushed the codex/reuse-pre2017-schema-connection branch from e0233ef to 8fd9b3e Compare May 1, 2026 13:52
@lu-zhengda lu-zhengda force-pushed the codex/test-legacy-schema-collection branch from ca88c70 to 916a084 Compare May 1, 2026 13:53
@lu-zhengda lu-zhengda force-pushed the codex/reuse-pre2017-schema-connection branch from 8fd9b3e to beaf61d Compare May 1, 2026 14:16
@lu-zhengda lu-zhengda force-pushed the codex/test-legacy-schema-collection branch from 916a084 to bb26e71 Compare May 1, 2026 14:16
@lu-zhengda lu-zhengda force-pushed the codex/reuse-pre2017-schema-connection branch from beaf61d to 0023dae Compare May 1, 2026 17:56
@lu-zhengda lu-zhengda force-pushed the codex/test-legacy-schema-collection branch from bb26e71 to a2b3e1a Compare May 1, 2026 17:57
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented May 1, 2026

Validation Report

All 20 validations passed.

Show details
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and Codecov settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

@lu-zhengda lu-zhengda force-pushed the codex/reuse-pre2017-schema-connection branch from 9968f22 to 475d23d Compare May 1, 2026 21:43
Base automatically changed from codex/reuse-pre2017-schema-connection to master May 4, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant