Skip to content

Conversation

@rescrv
Copy link
Contributor

@rescrv rescrv commented Jan 7, 2026

Description of changes

Refactor test helper functions to accept a db_name parameter instead of
using hardcoded "test_db" strings:

  • push_log_to_server
  • validate_log_on_server
  • get_enum_offset_on_server
  • update_compact_offset_on_server
  • validate_dirty_log_on_server
  • garbage_collect_unused_logs
  • test_push_pull_logs, test_dirty_logs, test_fork_logs, etc.

Add new k8s mcmr integration test variants that use "topo#dbname" as the
database name pattern to verify the log service works correctly with
topology-prefixed database names used in multi-cluster deployments.

NB: There is no switching of behavior per topo/mcmr; this is scaffold.

Test plan

CI

Migration plan

N/A

Observability plan

N/A

Documentation Changes

N/A

Co-authored-by: AI

…est helpers

Refactor test helper functions to accept a db_name parameter instead of
using hardcoded "test_db" strings:
- push_log_to_server
- validate_log_on_server
- get_enum_offset_on_server
- update_compact_offset_on_server
- validate_dirty_log_on_server
- garbage_collect_unused_logs
- test_push_pull_logs, test_dirty_logs, test_fork_logs, etc.

Add new k8s mcmr integration test variants that use "topo#dbname" as the
database name pattern to verify the log service works correctly with
topology-prefixed database names used in multi-cluster deployments.

NB:  There is no switching of behavior per topo/mcmr; this is scaffold.

Co-authored-by: AI
@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@propel-code-bot
Copy link
Contributor

These adjustments ensure every helper call site now passes the intended database identifier, and the new MCMR variants run alongside the existing database-name scenarios to confirm compatibility with topology-prefixed naming.

Affected Areas

rust/log-service/src/lib.rs (tests module)

This summary was automatically generated by @propel-code-bot

let initial_request = UpdateCollectionLogOffsetRequest {
collection_id: collection_id_str.clone(),
log_offset: 100,
database_name: "test_db".to_string(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Important

[Logic] This test variant is intended to verify behavior with topology-prefixed database names ("topo#dbname"), but it currently uses the hardcoded "test_db" string. Please update all 5 occurrences in this function to use "topo#dbname".

Additionally, since this test significantly duplicates the logic of test_k8s_integration_update_collection_log_offset_never_moves_backwards, consider extracting the common logic into a shared helper function that accepts db_name as a parameter.

Context for Agents
This test variant is intended to verify behavior with topology-prefixed database names (`"topo#dbname"`), but it currently uses the hardcoded `"test_db"` string. Please update all 5 occurrences in this function to use `"topo#dbname"`.

Additionally, since this test significantly duplicates the logic of `test_k8s_integration_update_collection_log_offset_never_moves_backwards`, consider extracting the common logic into a shared helper function that accepts `db_name` as a parameter.

File: rust/log-service/src/lib.rs
Line: 4718

@blacksmith-sh
Copy link
Contributor

blacksmith-sh bot commented Jan 7, 2026

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
garbage_collector/
garbage_collector_component::tests::test_k8s_integration_gc_v2_and_database_hard_delete
View Logs

Fix in Cursor

@rescrv rescrv requested review from Copilot and sanketkedia and removed request for Copilot January 8, 2026 00:05
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.

2 participants