Skip to content

Migrate 10 more integrations to mock_http#23536

Open
mwdd146980 wants to merge 13 commits intomwdd146980/httpx-migration-basefrom
mwdd146980/step5-small-batch
Open

Migrate 10 more integrations to mock_http#23536
mwdd146980 wants to merge 13 commits intomwdd146980/httpx-migration-basefrom
mwdd146980/step5-small-batch

Conversation

@mwdd146980
Copy link
Copy Markdown
Contributor

@mwdd146980 mwdd146980 commented Apr 29, 2026

Motivation

Step 5 of the Test Decoupling Plan. Eliminate direct requests.Session.* patches in test files so tests are decoupled from the HTTP backend. Part of the httpx migration.

Approach

Per-integration migration to the mock_http fixture (introduced in #22676), one commit per integration. PR #22676 precedent followed for assertion rewrites. Drop boilerplate kwargs and assert only the contract being tested.

powerdns_recursor's test_metadata_unit was split into three focused tests with a _make_check() helper. The original sequenced three sub-cases sharing one mock_http.get with asymmetric reset_mock calls. That structure makes it hard to add new sub-cases without breaking existing ones. Migrating the file was a fitting cleanup window since every assertion line was already being touched.

For full details, see the PR 5.1 plan page.

Verification

  • CI passes against mwdd146980/httpx-migration-base (this PR stacks on Feature branch for httpx migration #22676)
  • Reviewer reads commit-by-commit (one integration per commit)
  • Local: ddev test -fs <intg> + ddev --no-interactive test --recreate <intg> per integration

🤖 Generated with Claude Code

@datadog-prod-us1-5
Copy link
Copy Markdown

datadog-prod-us1-5 Bot commented Apr 29, 2026

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

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

@mwdd146980 mwdd146980 force-pushed the mwdd146980/step5-small-batch branch from ed45ae6 to d8f7ab2 Compare April 29, 2026 22:03
@mwdd146980 mwdd146980 force-pushed the mwdd146980/httpx-migration-base branch from 9709aed to 7e8968a Compare April 29, 2026 22:03
Copy link
Copy Markdown
Contributor Author

mwdd146980 commented Apr 29, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@mwdd146980 mwdd146980 changed the base branch from mwdd146980/httpx-migration-base to mwdd146980/step4-conftest-session-patches April 29, 2026 22:06
@mwdd146980 mwdd146980 force-pushed the mwdd146980/step5-small-batch branch from d8f7ab2 to 6ba89ee Compare April 29, 2026 22:10
@mwdd146980 mwdd146980 force-pushed the mwdd146980/step4-conftest-session-patches branch from 362e3dd to 573ae6c Compare April 29, 2026 22:10
@mwdd146980 mwdd146980 force-pushed the mwdd146980/step5-small-batch branch from 6ba89ee to 218ea72 Compare April 29, 2026 22:11
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.25%. Comparing base (610bb2b) to head (b4c8301).

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.

@mwdd146980
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ 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".

@mwdd146980 mwdd146980 marked this pull request as ready for review April 30, 2026 18:58
@mwdd146980 mwdd146980 requested review from a team as code owners April 30, 2026 18:58
@mwdd146980 mwdd146980 changed the title Step 5 PR 5.1: Migrate 10 integrations to mock_http Migrate 10 integrations to mock_http Apr 30, 2026
@mwdd146980 mwdd146980 changed the title Migrate 10 integrations to mock_http Migrate 10 more integrations to mock_http Apr 30, 2026
Base automatically changed from mwdd146980/step4-conftest-session-patches to mwdd146980/httpx-migration-base May 1, 2026 15:59
@mwdd146980 mwdd146980 force-pushed the mwdd146980/step5-small-batch branch from 80a7ee1 to b4c8301 Compare May 1, 2026 17:07
@mwdd146980 mwdd146980 force-pushed the mwdd146980/step5-small-batch branch from b4c8301 to 4a95df5 Compare May 1, 2026 20:54
@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

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