Merge ~jfguedez/charm-juju-lint:bug/1942943 into charm-juju-lint:master

Proposed by Jose Guedez
Status: Merged
Approved by: James Troup
Approved revision: 8bffc340985c7a7dc458759ac77c48c239dd0fde
Merged at revision: ce5f1869df2c9dfc01657fd0a1e025716c677a96
Proposed branch: ~jfguedez/charm-juju-lint:bug/1942943
Merge into: charm-juju-lint:master
Diff against target: 23 lines (+4/-1)
1 file modified
scripts/auto_lint.py (+4/-1)
Reviewer Review Type Date Requested Status
Edin S (community) Approve
BootStack Reviewers Pending
BootStack Reviewers Pending
Review via email: mp+408250@code.launchpad.net

Commit message

Set max_frame_size in libjuju to deal with large models

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
Edin S (exsdev) :
review: Approve
Revision history for this message
James Troup (elmo) wrote :

FWIW, juju-backup-all does ** 32, but I'm fine with this for now.

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

Change successfully merged at revision ce5f1869df2c9dfc01657fd0a1e025716c677a96

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/scripts/auto_lint.py b/scripts/auto_lint.py
index 6446a01..7b0ef06 100755
--- a/scripts/auto_lint.py
+++ b/scripts/auto_lint.py
@@ -34,6 +34,9 @@ LINT_CONFIG_PATH = join(VAR_LIB, "auto-lint-config.json")
34JUJU_STATUS_PATH = join(VAR_LIB, "juju-status.json")34JUJU_STATUS_PATH = join(VAR_LIB, "juju-status.json")
35LINT_RESULTS_PATH = join(VAR_LIB, "lint-results.txt")35LINT_RESULTS_PATH = join(VAR_LIB, "lint-results.txt")
3636
37# Deal with https://github.com/juju/python-libjuju/issues/136, set to 32MB
38MAX_FRAME_SIZE = 2 ** 25
39
3740
38def read_json_file(path):41def read_json_file(path):
39 """Read json file."""42 """Read json file."""
@@ -63,7 +66,7 @@ def verify_auto_lint_config(auto_lint_config):
6366
64async def get_juju_status(auto_lint_config):67async def get_juju_status(auto_lint_config):
65 """Get juju status."""68 """Get juju status."""
66 model = Model()69 model = Model(max_frame_size=MAX_FRAME_SIZE)
67 # As b64decode returns bytes instead of str, we need to convert it70 # As b64decode returns bytes instead of str, we need to convert it
68 # using .decode() on the bytes object.71 # using .decode() on the bytes object.
69 cacert = b64decode(auto_lint_config["controller-cacert"]).decode()72 cacert = b64decode(auto_lint_config["controller-cacert"]).decode()

Subscribers

People subscribed via source and target branches

to all changes: