Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tests/rptest/tests/timequery_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def _create_and_produce(
"redpanda.remote.read": "true",
"redpanda.remote.write": "true",
"retention.local.target.bytes": local_retention,
# See comment about disabling `retention.ms` below.
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

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

The inline comment references disabling retention.ms, but the code is setting retention.local.target.ms. Please update the comment to reflect the local retention setting to avoid confusion. For example: 'Disable time-based local retention for tiered storage by setting retention.local.target.ms to -1.'

Suggested change
# See comment about disabling `retention.ms` below.
# Disable time-based local retention for tiered storage by setting retention.local.target.ms to -1.

Copilot uses AI. Check for mistakes.
"retention.local.target.ms": -1,
}.items():
self.client().alter_topic_config(topic.name, k, v)
desc = self.client().describe_topic_configs(topic.name)
Expand Down Expand Up @@ -357,6 +359,11 @@ def set_up_cluster(self, cloud_storage: bool, batch_cache: bool, spillover: bool
else:
self.redpanda.add_extra_rp_conf({"log_segment_size": self.log_segment_size})

# `test_timequery_with_local_gc` attempts to set the `log_segment_size` lower than the minimum
# value of 1_MiB- disable bounded property checks to allow this.
self.redpanda.set_environment(
{"__REDPANDA_TEST_DISABLE_BOUNDED_PROPERTY_CHECKS": "ON"}
)
Comment on lines +364 to +366
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ahh the warning was on bootup, not from something later like alter topic config. i think the later will fail, but indeed this just seems to warn silently on bootup.

self.redpanda.start()

def _do_test_timequery(
Expand Down Expand Up @@ -801,7 +808,7 @@ def create_read_replica_topic(self) -> None:
}
rpk_rr_cluster.create_topic(self.topic_name, config=conf)
except:
self.logger.warn(f"Failed to create a read-replica topic")
self.logger.warn("Failed to create a read-replica topic")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ruff linter unnecessary f-string removal

Comment on lines 810 to +811
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

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

Avoid a bare except, which swallows KeyboardInterrupt/SystemExit and makes debugging harder. Catch Exception explicitly and log the exception details.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

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

logger.warn is deprecated; use logger.warning instead. Consider including exc_info to capture the exception context.

Suggested change
self.logger.warn("Failed to create a read-replica topic")
self.logger.warning("Failed to create a read-replica topic", exc_info=True)

Copilot uses AI. Check for mistakes.
return False
return True

Expand Down