bito-code-review[bot] commented on code in PR #42816:
URL: https://github.com/apache/superset/pull/42816#discussion_r3724485231
##########
tests/unit_tests/utils/webdriver_test.py:
##########
@@ -1856,8 +1856,8 @@ def test_unready_diagnostics_logged_early_and_at_failure(
diagnostics,
)
failure_args = mock_logger.warning.call_args.args
- assert failure_args[9] == diagnostics
- assert failure_args[10] == diagnostics
+ assert failure_args[16] == diagnostics
+ assert failure_args[17] == diagnostics
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Out-of-bounds array access</b></div>
<div id="fix">
Array access `failure_args[17]` will raise `IndexError` at runtime because
the logger.warning call only has 17 arguments (indices 0–16).
</div>
</div>
<small><i>Code Review Run #6153b4</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
##########
tests/unit_tests/utils/webdriver_test.py:
##########
@@ -918,9 +918,9 @@ def test_spinner_timeout_logs_warning_and_raises(
assert "terminal_reason=readiness_timeout" in warning_call.args[0]
assert warning_call.args[1] == "http://example.com"
assert warning_call.args[3] == 1 # mounted holders
- assert warning_call.args[4] == 0 # ready holders
- assert warning_call.args[7] == 60
- assert warning_call.args[9] == [{"chartId": "42", "state":
"nothing_mounted"}]
+ assert warning_call.args[9] == 1 # unready holders
+ assert warning_call.args[16] == [{"chartId": "42", "state":
"nothing_mounted"}]
+ assert warning_call.args[17] == [{"chartId": "42", "state":
"nothing_mounted"}]
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Out-of-bounds array access</b></div>
<div id="fix">
Array access `warning_call.args[17]` will raise `IndexError` at runtime
because the new logger.warning call in webdriver.py only passes 17 arguments
(indices 0–16).
</div>
</div>
<small><i>Code Review Run #6153b4</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]