Copilot commented on code in PR #42729:
URL: https://github.com/apache/superset/pull/42729#discussion_r3714832516
##########
superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.tsx:
##########
@@ -239,7 +240,7 @@ export default function DrillDetailPane({
columns: [],
metrics: [],
orderby: [],
- row_limit: ROW_LIMIT,
+ row_limit: exportRowLimit,
Review Comment:
As written, `exportRowLimit` can be `undefined` if the bootstrapped config
does not include `DRILL_DETAIL_EXPORT_ROW_LIMIT` (e.g., during mixed-version
deployments, asset caching/CDN serving newer frontend against older backend, or
custom bootstrap config). That would send `row_limit: undefined` in the export
payload, which can change behavior unexpectedly depending on backend defaults.
Consider providing a safe fallback (e.g., `DRILL_DETAIL_EXPORT_ROW_LIMIT ??
ROW_LIMIT` or `?? 50000`) and/or coercing to a number before placing it into
the request payload.
##########
superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.tsx:
##########
@@ -115,8 +115,9 @@ export default function DrillDetailPane({
state.common.conf.SAMPLES_ROW_LIMIT,
);
- const ROW_LIMIT = useSelector(
- (state: { common: { conf: JsonObject } }) => state.common.conf.ROW_LIMIT,
+ const exportRowLimit = useSelector(
+ (state: { common: { conf: JsonObject } }) =>
+ state.common.conf.DRILL_DETAIL_EXPORT_ROW_LIMIT,
);
Review Comment:
As written, `exportRowLimit` can be `undefined` if the bootstrapped config
does not include `DRILL_DETAIL_EXPORT_ROW_LIMIT` (e.g., during mixed-version
deployments, asset caching/CDN serving newer frontend against older backend, or
custom bootstrap config). That would send `row_limit: undefined` in the export
payload, which can change behavior unexpectedly depending on backend defaults.
Consider providing a safe fallback (e.g., `DRILL_DETAIL_EXPORT_ROW_LIMIT ??
ROW_LIMIT` or `?? 50000`) and/or coercing to a number before placing it into
the request payload.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]