Skip to content

fix(inkless:test): raise S3 timeouts and avoid the isolated broker in switch systests - #813

Merged
viktorsomogyi merged 2 commits into
mainfrom
glillo/fix-switch-systest-timeouts
Sep 30, 2026
Merged

viktorsomogyi merged 2 commits into
mainfrom
glillo/fix-switch-systest-timeouts

Conversation

@giuseppelillo

Copy link
Copy Markdown
Contributor

Six InklessClassicToDisklessSwitchTest cases fail on the nightly run for
two reasons unrelated to the switch itself.

#791 set the S3 client defaults to a 2 s call timeout and a 1 s attempt
timeout. The degraded-network tests throttle every broker NIC, including the
path to MinIO, to 2 Mbit/s with 200 ms latency, so WAL uploads outlast 2 s
and fail with ApiCallTimeoutException. The producer retries each failed
produce, so it either never recovers or the consumer reads more records than
were acked. _create_kafka now sets the call timeout to 60 s and the attempt
timeout to 30 s. That fixes test_switch_follower_crash_with_lagged_hw,
test_switch_leader_crash (both variants), test_switch_leader_restart, and
test_switch_rolling_restart, which have failed since #791 merged.

test_switch_follower_network_partition isolates a follower and then runs
kafka-configs.sh from self.nodes[0]. When that node is the isolated
follower, the admin client can't reach its peers, and the describe that
precedes the alter hits its 30 s limit. _switch_topic_to_diskless now takes
a node, and both network-partition tests pass one from the reachable side.
test_switch_leader_network_partition has the same latent bug, since the
leader can also be self.nodes[0].

Test plan

Run the Inkless System Tests workflow on this branch and check that the six
cases pass. test_switched_topic_urp_clears_after_replica_recovery still
fails: that failure is the stranded-follower bug fixed by #760.

Co-authored-by: Cursor cursoragent@cursor.com

Made with Cursor

… switch systests

Six `InklessClassicToDisklessSwitchTest` cases fail on the nightly run for
two reasons unrelated to the switch itself.

#791 set the S3 client defaults to a 2 s call timeout and a 1 s attempt
timeout. The degraded-network tests throttle every broker NIC, including the
path to MinIO, to 2 Mbit/s with 200 ms latency, so WAL uploads outlast 2 s
and fail with `ApiCallTimeoutException`. The producer retries each failed
produce, so it either never recovers or the consumer reads more records than
were acked. `_create_kafka` now sets the call timeout to 60 s and the attempt
timeout to 30 s. That fixes `test_switch_follower_crash_with_lagged_hw`,
`test_switch_leader_crash` (both variants), `test_switch_leader_restart`, and
`test_switch_rolling_restart`, which have failed since #791 merged.

`test_switch_follower_network_partition` isolates a follower and then runs
`kafka-configs.sh` from `self.nodes[0]`. When that node is the isolated
follower, the admin client can't reach its peers, and the describe that
precedes the alter hits its 30 s limit. `_switch_topic_to_diskless` now takes
a `node`, and both network-partition tests pass one from the reachable side.
`test_switch_leader_network_partition` has the same latent bug, since the
leader can also be `self.nodes[0]`.

## Test plan

Run the Inkless System Tests workflow on this branch and check that the six
cases pass. `test_switched_topic_urp_clears_after_replica_recovery` still
fails: that failure is the stranded-follower bug fixed by #760.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The functional changes are scoped and correct; the remaining formatting comment is nonblocking.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

This PR stabilizes classic-to-diskless switch system tests under degraded and partitioned networks.

Changes:

  • Raises test-specific S3 timeouts.
  • Runs switch commands from reachable brokers during network partitions.
File Description
tests/​kafkatest/​tests/​inkless/​inkless_topic_switch_test.py Adjusts S3 timeouts and switch-command node selection.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@giuseppelillo

Copy link
Copy Markdown
Contributor Author

Ran the systest here: https://github.com/aiven/inkless/actions/runs/36687317874/job/109796047928
test_switch_rolling_restart and test_switch_leader_restart still failed but with different errors, which are not covered by this PR.

@viktorsomogyi
viktorsomogyi merged commit bf5295f into main Sep 30, 2026
5 checks passed
@viktorsomogyi
viktorsomogyi deleted the glillo/fix-switch-systest-timeouts branch September 30, 2026 14:10
jeqo pushed a commit that referenced this pull request Oct 19, 2026
… switch systests (#813)

* fix(inkless:test): raise S3 timeouts and avoid the isolated broker in switch systests

Six `InklessClassicToDisklessSwitchTest` cases fail on the nightly run for
two reasons unrelated to the switch itself.

#791 set the S3 client defaults to a 2 s call timeout and a 1 s attempt
timeout. The degraded-network tests throttle every broker NIC, including the
path to MinIO, to 2 Mbit/s with 200 ms latency, so WAL uploads outlast 2 s
and fail with `ApiCallTimeoutException`. The producer retries each failed
produce, so it either never recovers or the consumer reads more records than
were acked. `_create_kafka` now sets the call timeout to 60 s and the attempt
timeout to 30 s. That fixes `test_switch_follower_crash_with_lagged_hw`,
`test_switch_leader_crash` (both variants), `test_switch_leader_restart`, and
`test_switch_rolling_restart`, which have failed since #791 merged.

`test_switch_follower_network_partition` isolates a follower and then runs
`kafka-configs.sh` from `self.nodes[0]`. When that node is the isolated
follower, the admin client can't reach its peers, and the describe that
precedes the alter hits its 30 s limit. `_switch_topic_to_diskless` now takes
a `node`, and both network-partition tests pass one from the reachable side.
`test_switch_leader_network_partition` has the same latent bug, since the
leader can also be `self.nodes[0]`.

## Test plan

Run the Inkless System Tests workflow on this branch and check that the six
cases pass. `test_switched_topic_urp_clears_after_replica_recovery` still
fails: that failure is the stranded-follower bug fixed by #760.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix comment formatting in inkless_topic_switch_test.py

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
jeqo pushed a commit that referenced this pull request Oct 19, 2026
… switch systests (#813)

* fix(inkless:test): raise S3 timeouts and avoid the isolated broker in switch systests

Six `InklessClassicToDisklessSwitchTest` cases fail on the nightly run for
two reasons unrelated to the switch itself.

#791 set the S3 client defaults to a 2 s call timeout and a 1 s attempt
timeout. The degraded-network tests throttle every broker NIC, including the
path to MinIO, to 2 Mbit/s with 200 ms latency, so WAL uploads outlast 2 s
and fail with `ApiCallTimeoutException`. The producer retries each failed
produce, so it either never recovers or the consumer reads more records than
were acked. `_create_kafka` now sets the call timeout to 60 s and the attempt
timeout to 30 s. That fixes `test_switch_follower_crash_with_lagged_hw`,
`test_switch_leader_crash` (both variants), `test_switch_leader_restart`, and
`test_switch_rolling_restart`, which have failed since #791 merged.

`test_switch_follower_network_partition` isolates a follower and then runs
`kafka-configs.sh` from `self.nodes[0]`. When that node is the isolated
follower, the admin client can't reach its peers, and the describe that
precedes the alter hits its 30 s limit. `_switch_topic_to_diskless` now takes
a `node`, and both network-partition tests pass one from the reachable side.
`test_switch_leader_network_partition` has the same latent bug, since the
leader can also be `self.nodes[0]`.

## Test plan

Run the Inkless System Tests workflow on this branch and check that the six
cases pass. `test_switched_topic_urp_clears_after_replica_recovery` still
fails: that failure is the stranded-follower bug fixed by #760.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix comment formatting in inkless_topic_switch_test.py

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
jeqo pushed a commit that referenced this pull request Oct 19, 2026
… switch systests (#813)

* fix(inkless:test): raise S3 timeouts and avoid the isolated broker in switch systests

Six `InklessClassicToDisklessSwitchTest` cases fail on the nightly run for
two reasons unrelated to the switch itself.

#791 set the S3 client defaults to a 2 s call timeout and a 1 s attempt
timeout. The degraded-network tests throttle every broker NIC, including the
path to MinIO, to 2 Mbit/s with 200 ms latency, so WAL uploads outlast 2 s
and fail with `ApiCallTimeoutException`. The producer retries each failed
produce, so it either never recovers or the consumer reads more records than
were acked. `_create_kafka` now sets the call timeout to 60 s and the attempt
timeout to 30 s. That fixes `test_switch_follower_crash_with_lagged_hw`,
`test_switch_leader_crash` (both variants), `test_switch_leader_restart`, and
`test_switch_rolling_restart`, which have failed since #791 merged.

`test_switch_follower_network_partition` isolates a follower and then runs
`kafka-configs.sh` from `self.nodes[0]`. When that node is the isolated
follower, the admin client can't reach its peers, and the describe that
precedes the alter hits its 30 s limit. `_switch_topic_to_diskless` now takes
a `node`, and both network-partition tests pass one from the reachable side.
`test_switch_leader_network_partition` has the same latent bug, since the
leader can also be `self.nodes[0]`.

## Test plan

Run the Inkless System Tests workflow on this branch and check that the six
cases pass. `test_switched_topic_urp_clears_after_replica_recovery` still
fails: that failure is the stranded-follower bug fixed by #760.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix comment formatting in inkless_topic_switch_test.py

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants