ShauryaaIBM commented on code in PR #43762:
URL: https://github.com/apache/superset/pull/43762#discussion_r3911136990


##########
superset-frontend/src/features/alerts/AlertReportModal.tsx:
##########
@@ -723,13 +726,11 @@ const AlertReportModal: 
FunctionComponent<AlertReportModalProps> = ({
     force_screenshot: false,

Review Comment:
   Good catch, @sadpandajoe — you are right. The retry fields 
(retry_on_failure, retry_max_attempts, send_failed_reports, 
retry_notify_owners, retry_notify_recipients) were being spread into the API 
payload unconditionally via ...currentAlert, regardless of whether 
AlertReportsRetry was enabled. That meant a silently-discarded retry policy 
could be submitted without the user ever seeing the controls that set it.
   
   Fixed in the latest commit (a08aed89f5): in onSave, all five retry fields 
are now explicitly deleted from data before the API call when 
isFeatureEnabled(FeatureFlag.AlertReportsRetry) is false. When the flag is on, 
the error-handling panel is visible and the user has explicitly configured 
those fields — they are included as before. When the flag is off, the panel is 
hidden and those fields no longer reach the API at all.
   
   All 78 existing AlertReportModal tests continue to pass.



-- 
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]

Reply via email to