Skip to content

fix(python): isolate datadog config defaults#4586

Merged
mobuchowski merged 2 commits into
OpenLineage:mainfrom
hcthakur2004:fix/datadog-config-defaults
Jul 1, 2026
Merged

fix(python): isolate datadog config defaults#4586
mobuchowski merged 2 commits into
OpenLineage:mainfrom
hcthakur2004:fix/datadog-config-defaults

Conversation

@hcthakur2004

Copy link
Copy Markdown
Contributor

Summary

  • replace shared Datadog config dictionary defaults with per-instance factories
  • add regression coverage for retry and async transport rule defaults

Issue

Fixes #4585

Tests

  • uv run pytest tests/test_datadog.py
  • uv run ruff check src/openlineage/client/transport/datadog.py tests/test_datadog.py

Signed-off-by: Harish Chandra Thakur <hcthakur2004@email.com>
@boring-cyborg boring-cyborg Bot added area:client/python openlineage-python area:tests Testing code language:python Uses Python programming language labels Jun 1, 2026
@codecov-commenter

codecov-commenter commented Jun 1, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.87%. Comparing base (169ce36) to head (5437bbc).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4586   +/-   ##
=======================================
  Coverage   73.87%   73.87%           
=======================================
  Files          21       21           
  Lines        2354     2354           
=======================================
  Hits         1739     1739           
  Misses        615      615           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@mobuchowski

Copy link
Copy Markdown
Member

@hcthakur2004 mind making this ready for review so we can merge it?

@hcthakur2004 hcthakur2004 marked this pull request as ready for review June 30, 2026 13:16
@hcthakur2004 hcthakur2004 requested a review from a team as a code owner June 30, 2026 13:16
Copilot AI review requested due to automatic review settings June 30, 2026 13:16
@hcthakur2004

Copy link
Copy Markdown
Contributor Author

@hcthakur2004 mind making this ready for review so we can merge it?

Done, thanks!

Copilot AI 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.

Pull request overview

This PR fixes a Python client bug where DatadogConfig used shared mutable dictionary defaults (retry and async_transport_rules), causing mutations in one config instance to leak into others. It aligns DatadogConfig with safe per-instance default behavior and adds regression tests to prevent reintroduction.

Changes:

  • Replaced mutable attr.field(default=...) dict defaults in DatadogConfig with per-instance factories.
  • Added regression tests ensuring retry and async_transport_rules defaults are not shared between instances.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
client/python/src/openlineage/client/transport/datadog.py Introduces factory functions for retry and async_transport_rules to avoid shared mutable defaults across DatadogConfig instances.
client/python/tests/test_datadog.py Adds regression tests verifying per-instance isolation for default retry config and async transport rules.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mobuchowski mobuchowski merged commit 41735d7 into OpenLineage:main Jul 1, 2026
23 checks passed
hcthakur2004 added a commit to hcthakur2004/OpenLineage that referenced this pull request Jul 5, 2026
Signed-off-by: Harish Chandra Thakur <hcthakur2004@email.com>
Co-authored-by: Harish Chandra Thakur <hcthakur2004@email.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:client/python openlineage-python area:tests Testing code language:python Uses Python programming language

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python Datadog config should not share mutable defaults

4 participants