codeant-ai-for-open-source[bot] commented on code in PR #43903:
URL: https://github.com/apache/superset/pull/43903#discussion_r3939718562


##########
docs/admin_docs/configuration/alerts-reports.mdx:
##########
@@ -472,6 +472,58 @@ ALERT_REPORTS_ENABLE_LINK_REDIRECT = False
 The feature uses `WEBDRIVER_BASEURL_USER_FRIENDLY` (or `WEBDRIVER_BASEURL`)
 to determine which hosts are internal.
 
+## Retry on Failure
+
+This feature is gated behind the `ALERT_REPORTS_RETRY` feature flag, which is
+disabled by default:
+
+```python
+FEATURE_FLAGS = {
+    "ALERT_REPORTS_RETRY": True,
+}
+```
+
+With the flag enabled, reports (not alerts) can be configured to
+automatically retry when delivery fails โ€” for example a transient SMTP or
+Slack error โ€” instead of moving straight to an `Error` state. This is
+configured per report in the **Error Handling** section of the report modal:

Review Comment:
   **Suggestion:** The retry handler wraps the entire `send()` call, so 
rendering and export failures also retry; this description incorrectly limits 
failures to delivery. [api mismatch]
   
   **Assessment:** ๐ŸŸ  `Major` ยท ๐Ÿ” `Occurrence: Sometimes`
   
   [![Use CodeAnt 
Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
 [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=803c02f86b9641fc8eca3e0282ed82f3&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=803c02f86b9641fc8eca3e0282ed82f3&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   <details>
   <summary><b>Prompt for AI Agent ๐Ÿค– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** docs/admin_docs/configuration/alerts-reports.mdx
   **Line:** 486:489
   **Comment:**
        *Api Mismatch: The retry handler wraps the entire `send()` call, so 
rendering and export failures also retry; this description incorrectly limits 
failures to delivery.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43903&comment_hash=210d78e3ebda53c899951e727a0500699cf440db5e628904edbc555e52ff15f6&reaction=like'>๐Ÿ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43903&comment_hash=210d78e3ebda53c899951e727a0500699cf440db5e628904edbc555e52ff15f6&reaction=dislike'>๐Ÿ‘Ž</a>



##########
docs/admin_docs/configuration/alerts-reports.mdx:
##########
@@ -472,6 +472,58 @@ ALERT_REPORTS_ENABLE_LINK_REDIRECT = False
 The feature uses `WEBDRIVER_BASEURL_USER_FRIENDLY` (or `WEBDRIVER_BASEURL`)
 to determine which hosts are internal.
 
+## Retry on Failure
+
+This feature is gated behind the `ALERT_REPORTS_RETRY` feature flag, which is
+disabled by default:
+
+```python
+FEATURE_FLAGS = {
+    "ALERT_REPORTS_RETRY": True,
+}
+```
+
+With the flag enabled, reports (not alerts) can be configured to
+automatically retry when delivery fails โ€” for example a transient SMTP or
+Slack error โ€” instead of moving straight to an `Error` state. This is
+configured per report in the **Error Handling** section of the report modal:
+
+- **Enable Retries** โ€“ turn on automatic retries for this report.
+- **Maximum Retry Attempts** โ€“ how many times to retry before giving up (1โ€“10, 
default 3).
+- **Send Failed Reports** โ€“ send a final failure notification to the report's 
recipients once all retries fail (default off).
+- **Failure Notifications** โ€“ choose whether **Owners** and/or **Report 
Recipients** get a notification after a failed retry attempt (not the initial 
failure). Owners are notified by email; report recipients are notified on their 
configured channel (email, Slack, etc).
+
+While a retry is pending, the report's status shows as **Retrying**
+(`RETRYING` in `ReportState`) rather than `Error`. Each retry uses
+exponential backoff โ€” the delay doubles after every attempt, up to a
+configurable cap:
+
+```python
+# Delay before the first retry, in seconds. Each subsequent retry doubles
+# this value, up to ALERT_REPORTS_RETRY_MAX_DELAY_SECONDS.
+ALERT_REPORTS_RETRY_BASE_DELAY_SECONDS = 60
+
+# Maximum delay between retries, in seconds.
+ALERT_REPORTS_RETRY_MAX_DELAY_SECONDS = 3600

Review Comment:
   **Suggestion:** These settings are read without validation; zero or negative 
values produce immediate or invalid countdowns, while a cap below the base 
breaks the advertised backoff. [logic error]
   
   **Assessment:** ๐ŸŸ  `Major` ยท ๐Ÿ” `Occurrence: Rarely`
   
   [![Use CodeAnt 
Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
 [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=8cc1426210d9477f803d59e2c4b76f85&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=8cc1426210d9477f803d59e2c4b76f85&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   <details>
   <summary><b>Prompt for AI Agent ๐Ÿค– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** docs/admin_docs/configuration/alerts-reports.mdx
   **Line:** 502:507
   **Comment:**
        *Logic Error: These settings are read without validation; zero or 
negative values produce immediate or invalid countdowns, while a cap below the 
base breaks the advertised backoff.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43903&comment_hash=46aff146e1745ab58baebcfe6da68c547f0d1a2e1952fdb128ea068503403564&reaction=like'>๐Ÿ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43903&comment_hash=46aff146e1745ab58baebcfe6da68c547f0d1a2e1952fdb128ea068503403564&reaction=dislike'>๐Ÿ‘Ž</a>



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