fix: Allow null value_column for map data overlay count metrics#1383
Draft
sentry[bot] wants to merge 1 commit into
Draft
fix: Allow null value_column for map data overlay count metrics#1383sentry[bot] wants to merge 1 commit into
sentry[bot] wants to merge 1 commit into
Conversation
Author
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses a
ValidationErroroccurring 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, theMapDataOverlayPayloadschema (inddpui/api/charts_api.py) declaredvalue_column: stras a required, non-nullable field. When the frontend sentvalue_column: Nonefor such charts, Pydantic validation failed.Changes Made:
ddpui/api/charts_api.py: ModifiedMapDataOverlayPayload.value_columnto beOptional[str] = None, allowingNoneas a valid value.ddpui/api/charts_api.py: Removedvalue_columnfrom the explicitif not all([...])required-field validation check inget_map_data_overlay.ddpui/api/public_api.py: Removedmap_payload.value_columnfrom the explicitif not all([...])required-field validation check inget_public_map_data_overlay(both occurrences).These changes ensure that map charts with count aggregations can successfully retrieve data without validation errors, as
value_columnis not relevant for these types of metrics.Fixes DALGO-BACKEND-27Y