Skip to content

fix(metrics_metadata): skip distribution-typed metrics in update path#633

Merged
riyazsh merged 1 commit into
mainfrom
riyaz/HAMR-392-T54-metrics-metadata-skip-distribution
Jul 15, 2026
Merged

fix(metrics_metadata): skip distribution-typed metrics in update path#633
riyazsh merged 1 commit into
mainfrom
riyaz/HAMR-392-T54-metrics-metadata-skip-distribution

Conversation

@riyazsh

@riyazsh riyazsh commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

The destination rejects PUT /api/v1/metrics/{name} for type=distribution with 400 at the DB layer, so the request cannot succeed. Skip early to avoid burning retries. Case- and whitespace-tolerant match. Fires before the destination-existence probe so no wasted GET.

import_resource is unchanged — the source-side JSON still contains distribution entries for downstream consumers.

Test plan

  • Unit test: distribution-typed metrics raise SkipResource, no destination HTTP calls (parametrized over lowercase / capitalized / uppercase / trailing-space variants).
  • Unit test: non-distribution types (count, rate, gauge, histogram, missing) still probe destination via GET before PUT.
  • Full unit suite: 1022 passed.
  • Ruff clean.
  • No cassette re-record needed — the TestMetricsMetadataResources integration test class is @pytest.mark.skip-ed at tests/integration/resources/test_metrics_metadata.py:12, so the HTTP path is not exercised by CI.

The destination rejects PUT /api/v1/metrics/{name} for type=distribution
with 400 at the DB layer, so the request cannot succeed. Skip early to
avoid burning retries. Case- and whitespace-tolerant match. Fires before
the destination-existence probe. import_resource unchanged.
@riyazsh
riyazsh requested a review from a team as a code owner July 15, 2026 19:09
@riyazsh
riyazsh merged commit 712f182 into main Jul 15, 2026
12 of 13 checks passed
@riyazsh
riyazsh deleted the riyaz/HAMR-392-T54-metrics-metadata-skip-distribution branch July 15, 2026 19:24
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