Skip to content

Co-own base DBM database modules with agent-integrations - #24846

Open
eric-weaver wants to merge 1 commit into
masterfrom
eric.weaver/dbm-codeowners-base-db-modules
Open

Co-own base DBM database modules with agent-integrations#24846
eric-weaver wants to merge 1 commit into
masterfrom
eric.weaver/dbm-codeowners-base-db-modules

Conversation

@eric-weaver

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds @DataDog/database-monitoring-agent as a co-owner of the datadog_checks_base modules that only the DBM integrations consume, alongside the existing @DataDog/agent-integrations ownership:

Module Consumers
base/checks/db.py (DatabaseCheck) clickhouse, postgres, sqlserver
base/utils/db/health.py clickhouse, mysql, postgres, sqlserver
base/utils/db/schemas.py clickhouse, postgres, sqlserver, sap_hana
base/utils/db/sql_commenter.py mysql, postgres, sqlserver, do_query_actions

Their tests are covered too: tests/base/checks/test_database_check.py, tests/base/utils/db/test_schemas.py, and tests/base/utils/db/test_sql_commenter.py. health.py needs no new test entry because its tests live in tests/base/utils/db/test_util.py, which the existing line already covers.

Motivation

The Database monitoring block already co-owns base/utils/db/utils.py, base/utils/db/sql.py, base/utils/db/statement_metrics.py, and base/utils/db/query_metrics/, but four equally DBM-specific modules were missed and still route reviews solely to @DataDog/agent-integrations. An AST-based import scan across the repo confirms no non-DBM integration imports them, other than sap_hana reusing schema collection and do_query_actions reusing the SQL commenter, and git log shows every one of them was authored and maintained exclusively by DBM engineers.

Deliberately left out of scope:

  • base/utils/aws.py, base/utils/diagnose.py, and base/utils/tracking.py are also DBM-only consumers today, but are general-purpose enough that claiming them isn't clearly right.
  • base/utils/db/timed_cache.py is DBM-authored and db-related but entirely unused — TimedCache has no importer anywhere except its own test — so it's a deletion candidate rather than an ownership question.

The generic QueryManager plumbing (base/utils/db/core.py, query.py, transform.py, types.py) is intentionally untouched, since duckdb, ibm_i, proxysql, rethinkdb, singlestore, teradata, vertica, and voltdb all depend on it.

ddev validate codeowners passes. No agent-shipped files change, so no changelog entry is needed.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add qa/required if this PR needs QA validation, or qa/skip-qa if it does not. Exactly one of the two is required.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Made with Cursor

The DatabaseCheck base class, DBM health reporting, schema collection, and
sql_commenter live in datadog_checks_base but are only consumed by the DBM
integrations, so route their reviews to database-monitoring-agent the way
db/utils.py, db/sql.py, and db/statement_metrics.py already are.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cit-pr-commenter-54b7da

Copy link
Copy Markdown

evalya-impact-summary

evalya impact analysis
Impact analysis: 0 selected, 0 skipped (of 0 test tasks)
Publish tasks:   1 (always emitted)
Diff (1 file):
  .github/CODEOWNERS

Debug a specific task: evalya plan impact --path <path> --task <task>

Learn more about CI impact filtering

@datadog-official datadog-official Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Datadog Autotest: PASS

More details

Resolving every tracked path before and after the change showed ownership changes on exactly the seven intended DBM files, with both teams retained and no wildcard spillover elsewhere.

Was this helpful? React 👍 or 👎

📊 Validated against 10 scenarios · Open Bits AI session

🤖 Datadog Autotest · Commit 99b4b01 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@dd-octo-sts

dd-octo-sts Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Validation Report

All 21 validations passed.

Show details
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and code coverage 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
qa-label Validate the pull request declares whether it needs QA for the next Agent release
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

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.

4 participants