Skip to content

fix: Allow null value_column for map data overlay count metrics#1383

Draft
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/map-overlay-value-column-validation
Draft

fix: Allow null value_column for map data overlay count metrics#1383
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/map-overlay-value-column-validation

Conversation

@sentry

@sentry sentry Bot commented May 26, 2026

Copy link
Copy Markdown

This PR addresses a ValidationError occurring in the /api/v1/public/dashboards/{token}/charts/{chart_id}/map-data/ endpoint.

Root Cause:
Map charts using count aggregations do not require a specific value_column. However, the MapDataOverlayPayload schema (in ddpui/api/charts_api.py) declared value_column: str as a required, non-nullable field. When the frontend sent value_column: None for such charts, Pydantic validation failed.

Changes Made:

  1. ddpui/api/charts_api.py: Modified MapDataOverlayPayload.value_column to be Optional[str] = None, allowing None as a valid value.
  2. ddpui/api/charts_api.py: Removed value_column from the explicit if not all([...]) required-field validation check in get_map_data_overlay.
  3. ddpui/api/public_api.py: Removed map_payload.value_column from the explicit if not all([...]) required-field validation check in get_public_map_data_overlay (both occurrences).

These changes ensure that map charts with count aggregations can successfully retrieve data without validation errors, as value_column is not relevant for these types of metrics.

Fixes DALGO-BACKEND-27Y

@sentry

sentry Bot commented May 26, 2026

Copy link
Copy Markdown
Author

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 58.66%. Comparing base (75cb6fd) to head (a9b9d64).

Files with missing lines Patch % Lines
ddpui/api/charts_api.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1383   +/-   ##
=======================================
  Coverage   58.66%   58.66%           
=======================================
  Files         132      132           
  Lines       15690    15690           
=======================================
  Hits         9205     9205           
  Misses       6485     6485           

☔ View full report in Codecov by Sentry.
📢 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants