Repository navigation
Conversation
Code Review Agent Run #c33740Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #43206 +/- ##
==========================================
- Coverage 80.13% 80.13% -0.01%
==========================================
Files 2923 2923
Lines 172286 172288 +2
Branches 39995 39995
==========================================
Hits 138063 138063
- Misses 31637 31639 +2
Partials 2586 2586
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Code Review Agent Run #082792Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
c6daedd to
e05aaae
Compare
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Code Review Agent Run #d99df0Actionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
e05aaae to
1fa8ea1
Compare
Code Review Agent Run #cd94caActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR). Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
rusackas
left a comment
There was a problem hiding this comment.
Thanks for tracking this down, and for the test that keeps the option schemas honest going forward. LGTM!
SUMMARY
Two post-processing option schemas document fields that the operations they
describe do not accept. Because
optionsis passed through unvalidated, aclient that follows the OpenAPI spec gets an HTTP 500.
QueryObject.exec_post_processingdispatches with:and
ChartDataPostProcessingOperationSchema.optionsis a barefields.Dict.The per-operation schemas are therefore documentation only — nothing validates
against them — so a field they publish but the function does not accept becomes
TypeError: <op>() got an unexpected keyword argument.ChartDataSortOptionsSchemais entirely out of sync withsort(). Itdocuments a
columnsdict — markedrequired=True— plusaggregates:while the function signature is:
So sending exactly what the spec marks as required fails, and the three real
parameters are undocumented:
The frontend
sortOperatoralready sends{is_sort_index, ascending}or{by, ascending}, confirming which side is correct.ChartDataProphetOptionsSchemadocumentsmonthly_seasonality, whichprophet()does not take — it takesdaily_seasonality, which was undocumented,along with
index:The frontend
prophetOperatorsendsdaily_seasonalityandindex, and neversends
monthly_seasonality.This PR corrects both schemas to match their functions, and adds a test that
walks every
ChartData*OptionsSchema, resolves the operation it describes, andasserts each declared field is a real parameter — so the two cannot drift apart
again silently.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — the change is to the OpenAPI schema definitions.
TESTING INSTRUCTIONS
test_post_processing_option_schemas_match_their_functionsis added. Restoringeither pre-fix field makes it fail with:
To see the spec change, start Superset and open
/swagger/v1, then compare theChartDataSortOptionsandChartDataProphetOptionsdefinitions.ADDITIONAL INFORMATION
CHECKLIST