bito-code-review[bot] commented on code in PR #37304:
URL: https://github.com/apache/superset/pull/37304#discussion_r2722326259
##########
superset/mcp_service/screenshot/webdriver_pool.py:
##########
@@ -124,8 +124,8 @@ def _create_driver(
try:
# SECURITY FIX: Set up timeout protection for driver creation
- old_handler = signal.signal(signal.SIGALRM, _timeout_handler)
- signal.alarm(self.creation_timeout_seconds)
+ old_handler = signal.signal(signal.SIGALRM, _timeout_handler) #
type: ignore[attr-defined]
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Cross-platform timeout issue</b></div>
<div id="fix">
This code uses Unix-only signal.SIGALRM and signal.alarm for WebDriver
creation timeout, causing runtime AttributeError on Windows. Superset supports
Windows and has a cross-platform timeout utility in superset.utils.core that
should be used instead to avoid duplication and ensure compatibility.
</div>
</div>
<details>
<summary><b>Citations</b></summary>
<ul>
<li>
Rule Violated: <a
href="https://github.com/apache/superset/blob/4fa7e86/.cursor/rules/dev-standard.mdc#L27">dev-standard.mdc:27</a>
</li>
</ul>
</details>
<small><i>Code Review Run #34dcf6</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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]