Skip to content

Commit d6fae9e

Browse files
committed
Add comments indicating this is a short-term workaround only
1 parent c52b723 commit d6fae9e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

juju/bundle.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,9 @@ async def run(self, context):
329329
:param context: is used for any methods or properties required to
330330
perform a change.
331331
"""
332+
# NB: this should really be handled by the controller when generating the
333+
# bundle change plan, and this short-term workaround may be missing some
334+
# aspects of the logic which the CLI client contains to handle edge cases.
332335
if self.application in context.model.applications:
333336
log.debug('Skipping %s; already in model', self.application)
334337
return self.application
@@ -583,6 +586,9 @@ async def run(self, context):
583586
ep1 = context.resolveRelation(self.endpoint1)
584587
ep2 = context.resolveRelation(self.endpoint2)
585588

589+
# NB: this should really be handled by the controller when generating the
590+
# bundle change plan, and this short-term workaround may be missing some
591+
# aspects of the logic which the CLI client contains to handle edge cases.
586592
existing = [rel for rel in context.model.relations if rel.matches(ep1, ep2)]
587593
if existing:
588594
log.info('Skipping %s <-> %s; already related', ep1, ep2)

0 commit comments

Comments
 (0)