Getting many KeyError errors during spaces checks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Juju Lint |
Fix Released
|
Undecided
|
Gabriel Cocenza |
Bug Description
Running juju-lint on an exported bundle I get more than a dozen of these:
Exception caught during space check; please check space by hand. Traceback (most recent call last):
File "/snap/
self.
File "/snap/
mismatch_
File "/snap/
charm2 = app_to_
KeyError: 'prometheus'
It looks like these are related to CMR relations since all the applications mentioned in the KeyError are applications in a different model.
Full run attached.
Related branches
- Martin Kalcok (community): Approve
- Eric Chen: Approve
-
Diff: 138 lines (+55/-14)3 files modifiedjujulint/check_spaces.py (+15/-6)
jujulint/lint.py (+2/-1)
tests/test_jujulint.py (+38/-7)
Changed in juju-lint: | |
status: | New → Confirmed |
tags: | added: bseng-173 |
Changed in juju-lint: | |
assignee: | nobody → Gabriel Angelo Sgarbi Cocenza (gabrielcocenza) |
status: | Confirmed → In Progress |
Changed in juju-lint: | |
status: | In Progress → Fix Released |
Changed in juju-lint: | |
milestone: | none → 1.0.3 |
The attached patch uses the app_to_ charm_map. get(app) method instead of app_to_ charm_map[ app] and ignores mismatches if one of the spaces is XModel (as set by the existing get_relation_space function).