Skip to content

Commit 4ec4096

Browse files
authored
Make rate-of-change log at info, as we want to know it in prod. (#43)
1 parent 88a2b88 commit 4ec4096

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

partitionmanager/table_append_partition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ def _plan_partition_changes(
528528
rate_relevant_partitions
529529
)
530530

531-
log.debug(
531+
log.info(
532532
f"Rates of change calculated as {rates} per day from "
533533
f"{len(rate_relevant_partitions)} partitions"
534534
)

partitionmanager/table_append_partition_test.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,10 +537,12 @@ def test_plan_partition_changes_imminent(self):
537537
self.assertEqual(
538538
logctx.output,
539539
[
540+
"INFO:plan_partition_changes:table:Rates of change calculated as "
541+
"[25.043478260869566] per day from 2 partitions",
540542
"INFO:plan_partition_changes:table:Start-of-fill predicted at "
541543
"2021-01-03 which is not 2021-01-02. This change will be marked "
542544
"as important to ensure that p_20210102: (200) is moved to "
543-
"2021-01-03"
545+
"2021-01-03",
544546
],
545547
)
546548

@@ -579,10 +581,12 @@ def test_plan_partition_changes_wildly_off_dates(self):
579581
self.assertEqual(
580582
logctx.output,
581583
[
584+
"INFO:plan_partition_changes:table:Rates of change calculated as [50.0] per "
585+
"day from 2 partitions",
582586
"INFO:plan_partition_changes:table:Start-of-fill predicted at "
583587
"2021-01-02 which is not 2021-01-04. This change will be marked "
584588
"as important to ensure that p_20210104: (200) is moved to "
585-
"2021-01-02"
589+
"2021-01-02",
586590
],
587591
)
588592

0 commit comments

Comments
 (0)