Skip to content

Swap mesos_master and control_m test exceptions to agnostic http_exceptions hierarchy#24212

Merged
mwdd146980 merged 2 commits into
mwdd146980/httpx-migration-basefrom
mwdd146980/w1a-http-exceptions
Jun 29, 2026
Merged

Swap mesos_master and control_m test exceptions to agnostic http_exceptions hierarchy#24212
mwdd146980 merged 2 commits into
mwdd146980/httpx-migration-basefrom
mwdd146980/w1a-http-exceptions

Conversation

@mwdd146980

@mwdd146980 mwdd146980 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Moves the mesos_master and control_m test suites off requests.exceptions and onto the backend-agnostic http_exceptions hierarchy, so their assertions no longer name a backend-specific exception type and stay green once these integrations move to httpx2.

requests' HTTPError is a status error, so it maps to HTTPStatusError (the leaf), not the agnostic HTTPError root. Both integrations are safe to swap now because each injects the exception through a mock and production already catches the agnostic type (mesos_master.py:187) or catches Exception and re-raises (control_m/check.py).

Motivation

Part of the requests to httpx2 migration. Decoupling these assertions from requests.exceptions lets the suites pass under either backend, ahead of the per-integration flip.

Verification

  • ddev --no-interactive test mesos_master: 17 passed, 1 e2e skipped.
  • ddev --no-interactive test control_m: 28 passed.
  • ddev test -fs mesos_master control_m: clean.

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

…ptions

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Jun 27, 2026

Copy link
Copy Markdown

Pipelines  Tests  Code Coverage

Fix all issues with BitsAI

⚠️ Warnings

🚦 4 Pipeline jobs failed

PR | test / test-minimum-base-package (linux, ubuntu-22.04, control_m, Control-M (py3.13), py3.13) / minimum-base-package-Control-M (py3.13)-py3.13   View in Datadog   GitHub Actions

PR | test / test-minimum-base-package (linux, ubuntu-22.04, mesos_master, Mesos Master (py3.13-1.7), py3.13-1.7) / minimum-base-package-Mesos Master (py3.13-1.7)-py3.13-1.7   View in Datadog   GitHub Actions

Validate repository | Run Validations / Validate   View in Datadog   GitHub Actions

View all 4 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 87.90% (-0.31%)

Useful? React with 👍 / 👎

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

@mwdd146980 mwdd146980 added the qa/skip-qa Automatically skip this PR for the next QA label Jun 27, 2026
@mwdd146980 mwdd146980 self-assigned this Jun 27, 2026
@mwdd146980

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

from datadog_checks.base.utils.http_exceptions import HTTPTimeoutError

P2 Badge Bump the base dependency for HTTPTimeoutError

This new production import relies on the newer datadog_checks.base.utils.http_exceptions module, but mesos_master/pyproject.toml:31 still allows datadog-checks-base>=37.33.0. In standalone installs that resolve one of those still-allowed older base versions, importing datadog_checks.mesos_master will fail before the check can run; please raise the minimum base dependency alongside this import.

ℹ️ 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 June 27, 2026 02:17
@mwdd146980
mwdd146980 requested a review from a team as a code owner June 27, 2026 02:17

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

Copy link
Copy Markdown

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.

Reviewed commit: 290af0a8a2

ℹ️ 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 thread mesos_master/datadog_checks/mesos_master/mesos_master.py
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dd-octo-sts

dd-octo-sts Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Validation Report

Validation Description Status
dep Verify dependency pins are consistent and Agent-compatible

Run ddev validate all changed --fix to attempt to auto-fix supported validations.

Passed validations (20)
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
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

@mwdd146980
mwdd146980 merged commit 4ee19f0 into mwdd146980/httpx-migration-base Jun 29, 2026
33 of 39 checks passed
@mwdd146980
mwdd146980 deleted the mwdd146980/w1a-http-exceptions branch June 29, 2026 14:52
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.

2 participants