Skip to content

Conversation

@eric-weaver
Copy link
Contributor

Reverts #21729

We need to revert this schem collection refactor. These optimized schema collection queries break schema collection on many older Mysql / MariaDB versions due to introduction of newer functions. Pulling this out of 7.74 release in order to gracefully support falling back to this existing collection method on unsupportable versions in a future agent release

sethsamuel
sethsamuel previously approved these changes Dec 11, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +414 to +417
mock.patch('datadog_checks.mysql.databases_data.DatabasesData._get_tables', return_value=[1, 2]),
):
with pytest.raises(StopIteration):
databases_data._fetch_database_data("dummy_cursor", time.time(), "my_db")

Choose a reason for hiding this comment

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

P1 Badge test_fetch_throws fails before expected StopIteration

When time.time is patched to return a huge elapsed duration, _fetch_database_data immediately calls send_truncated_msg, which indexes self._data_submitter.db_info[db_name]. In this test no call to store_db_infos populates that mapping, so the call raises a KeyError before the StopIteration the test asserts, causing the new unit test to fail deterministically. Seed the db metadata (e.g., via store_db_infos([{"name": "my_db"}])) or adjust the assertion to match the actual exception.

Useful? React with 👍 / 👎.

@eric-weaver eric-weaver requested review from a team as code owners December 11, 2025 17:04
@temporal-github-worker-1 temporal-github-worker-1 bot dismissed sethsamuel’s stale review December 11, 2025 17:04

Review from sethsamuel is dismissed. Related teams and files:

  • database-monitoring
    • mysql/CHANGELOG.md
  • database-monitoring-agent
    • mysql/changelog.d/22103.fixed
@codecov
Copy link

codecov bot commented Dec 11, 2025

Codecov Report

❌ Patch coverage is 95.22388% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.16%. Comparing base (0dd77c6) to head (f6860d1).
⚠️ Report is 1 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.

@eric-weaver eric-weaver added this pull request to the merge queue Dec 11, 2025
Merged via the queue into master with commit 8b4e2b7 Dec 11, 2025
87 of 90 checks passed
@eric-weaver eric-weaver deleted the revert-21729-seth.samuel/DBMON-5801-move-my-sql-to-new-schema-collector branch December 11, 2025 17:19
datadog-agent-integrations-bot bot pushed a commit that referenced this pull request Dec 11, 2025
* Revert "Migrate MySQL to new schema collector (#21729)"

This reverts commit 569fb2a.

* Add changelog

(cherry picked from commit 8b4e2b7)
eric-weaver added a commit that referenced this pull request Dec 15, 2025
HadhemiDD pushed a commit that referenced this pull request Dec 16, 2025
* Revert "Migrate MySQL to new schema collector (#21729)"

This reverts commit 569fb2a.

* Add changelog

(cherry picked from commit 8b4e2b7)

Co-authored-by: Eric Weaver <[email protected]>
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.

3 participants