Skip to content

Repair metric tag config metadata type conflicts - #681

Merged
riyazsh merged 1 commit into
mainfrom
riyazsh/metric-tag-config-type-conflict-repair
Aug 28, 2026
Merged

Repair metric tag config metadata type conflicts#681
riyazsh merged 1 commit into
mainfrom
riyazsh/metric-tag-config-type-conflict-repair

Conversation

@riyazsh

@riyazsh riyazsh commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an explicit opt-in sync/migrate flag to repair metric tag configuration metadata type conflicts
  • when enabled, a create/update that fails because destination metrics metadata has a different type sets destination metadata to the source tag configuration metric_type, then retries once
  • keep the default behavior unchanged: metadata type conflicts still propagate unless the repair flag is set

Safety

This mutates destination metrics metadata, so the flag is intentionally off by default. Operators should enable it only after confirming the source tag configuration type is the desired source of truth.

Tests

  • pytest -q tests/unit/test_metric_tag_configurations.py tests/unit/test_metric_tag_config_metadata_type_repair_cli.py tests/unit/test_metrics_metadata.py
  • pytest -q tests/unit -k 'not custom_client_trust_env and not id_file_subprocess_experiment'
  • python -m ruff check --select F,E9 datadog_sync/model/metric_tag_configurations.py datadog_sync/utils/configuration.py datadog_sync/commands/shared/options.py tests/unit/test_metric_tag_configurations.py tests/unit/test_metric_tag_config_metadata_type_repair_cli.py

@riyazsh
riyazsh requested a review from a team as a code owner August 28, 2026 14:50
@riyazsh
riyazsh merged commit 51f5ed5 into main Aug 28, 2026
12 of 13 checks passed
@riyazsh
riyazsh deleted the riyazsh/metric-tag-config-type-conflict-repair branch August 28, 2026 15:43
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