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
1diff --git a/scripts/auto_lint.py b/scripts/auto_lint.py
2index 6446a01..7b0ef06 100755
3--- a/scripts/auto_lint.py
4+++ b/scripts/auto_lint.py
5@@ -34,6 +34,9 @@ LINT_CONFIG_PATH = join(VAR_LIB, "auto-lint-config.json")
6 JUJU_STATUS_PATH = join(VAR_LIB, "juju-status.json")
7 LINT_RESULTS_PATH = join(VAR_LIB, "lint-results.txt")
8
9+# Deal with https://github.com/juju/python-libjuju/issues/136, set to 32MB
10+MAX_FRAME_SIZE = 2 ** 25
11+
12
13 def read_json_file(path):
14 """Read json file."""
15@@ -63,7 +66,7 @@ def verify_auto_lint_config(auto_lint_config):
16
17 async def get_juju_status(auto_lint_config):
18 """Get juju status."""
19- model = Model()
20+ model = Model(max_frame_size=MAX_FRAME_SIZE)
21 # As b64decode returns bytes instead of str, we need to convert it
22 # using .decode() on the bytes object.
23 cacert = b64decode(auto_lint_config["controller-cacert"]).decode()

Subscribers

People subscribed via source and target branches

to all changes: