codeant-ai-for-open-source[bot] commented on code in PR #42481:
URL: https://github.com/apache/superset/pull/42481#discussion_r3689551599
##########
superset/reports/models.py:
##########
@@ -77,6 +77,7 @@ class ReportState(StrEnum):
ERROR = "Error"
NOOP = "Not triggered"
GRACE = "On Grace"
+ RETRYING = "Retrying"
Review Comment:
**Suggestion:** The new backend state can now be returned as `last_state:
"Retrying"`, but the frontend `AlertObject.last_state` type still only permits
`Success`, `Working`, `Error`, `Not triggered`, and `On Grace`. This leaves API
responses in a state that the primary alert/report object contract cannot
represent and can cause type errors or invalid state handling in consumers. Add
`Retrying` to the shared response type wherever `ReportState.RETRYING` is
exposed. [api mismatch]
<details>
<summary><b>Severity Level:</b> Minor ๐งน</summary>
```mdx
- โ ๏ธ Typed alert consumers cannot represent active retry state.
- โ ๏ธ API and frontend state contracts diverge during retry execution.
- โ ๏ธ Current status icon handles retrying, limiting immediate UI impact.
```
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=1138069e94fa4252a0dcdab1ecc3e121&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=1138069e94fa4252a0dcdab1ecc3e121&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent ๐ค </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset/reports/models.py
**Line:** 80:80
**Comment:**
*Api Mismatch: The new backend state can now be returned as
`last_state: "Retrying"`, but the frontend `AlertObject.last_state` type still
only permits `Success`, `Working`, `Error`, `Not triggered`, and `On Grace`.
This leaves API responses in a state that the primary alert/report object
contract cannot represent and can cause type errors or invalid state handling
in consumers. Add `Retrying` to the shared response type wherever
`ReportState.RETRYING` is exposed.
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%2F42481&comment_hash=4c82e4de077da4f47ed46b545942387361d058a74f111704482225c2379155f3&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42481&comment_hash=4c82e4de077da4f47ed46b545942387361d058a74f111704482225c2379155f3&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]