Merge ~ziyiwang/charm-bcache-tuning:fix_lint into charm-bcache-tuning:master

Proposed by Celia Wang
Status: Merged
Approved by: Giuseppe Petralia
Approved revision: 345a0e6755394635237974d94f31a565ea96ab7f
Merged at revision: 11f89fe3ec804a1f1617e2b399a5f9500947f00c
Proposed branch: ~ziyiwang/charm-bcache-tuning:fix_lint
Merge into: charm-bcache-tuning:master
Diff against target: 30 lines (+3/-5)
2 files modified
src/reactive/bcache_tuning.py (+2/-5)
src/tests/unit/test_reactive_bcache_tuning.py (+1/-0)
Reviewer Review Type Date Requested Status
Giuseppe Petralia Approve
🤖 prod-jenkaas-bootstack (community) continuous-integration Approve
Zachary Zehring (community) Needs Fixing
Xav Paice (community) Approve
BootStack Reviewers Pending
Review via email: mp+410023@code.launchpad.net

Commit message

Fix lint
Fix unittest after adding "writeback_rate_fp_term_factor"

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
Xav Paice (xavpaice) wrote :

LGTM

review: Approve
Revision history for this message
Zachary Zehring (zzehring) wrote :

Added 1 in-line comment regarding grammar. Once fixed, +1

review: Needs Fixing
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
Giuseppe Petralia (peppepetra) wrote :

lgtm

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 11f89fe3ec804a1f1617e2b399a5f9500947f00c

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/reactive/bcache_tuning.py b/src/reactive/bcache_tuning.py
2index 7e49940..ec090b1 100644
3--- a/src/reactive/bcache_tuning.py
4+++ b/src/reactive/bcache_tuning.py
5@@ -71,11 +71,8 @@ def write_tuning_config():
6 factor = bcache_cfg["writeback_rate_fp_term_factor"]
7
8 if factor < 1:
9- log(
10- "writeback_rate_fp_term_factor should not less than 1",
11- level="WARNING"
12- )
13- factor = 1
14+ log("writeback_rate_fp_term_factor should not be less than 1", level="WARNING")
15+ factor = 1
16
17 bcache_cfg.pop("writeback_rate_fp_term_factor")
18 bcache_cfg["writeback_rate_fp_term_low"] = 1 * factor
19diff --git a/src/tests/unit/test_reactive_bcache_tuning.py b/src/tests/unit/test_reactive_bcache_tuning.py
20index aa5e7e8..85b2a42 100644
21--- a/src/tests/unit/test_reactive_bcache_tuning.py
22+++ b/src/tests/unit/test_reactive_bcache_tuning.py
23@@ -30,6 +30,7 @@ class TestBcacheTuning(unittest.TestCase):
24 "sequential_cutoff": 0,
25 "writeback_percent": 10,
26 "cache_mode": "unmanaged",
27+ "writeback_rate_fp_term_factor": 1,
28 }
29 tune_bcache_bin = "/usr/sbin/tune-bcache"
30 tuning_file_handle = mock.MagicMock()

Subscribers

People subscribed via source and target branches

to all changes: