Unnecessary ForModel use when retrieving controller addresses

Bug #1698703 reported by Menno Finlay-Smits
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Menno Finlay-Smits

Bug Description

The State.controllerAddresses() unnecessarily uses ForModel which is highly inefficient and unnecessary in this case. GetCollectionFor can be used in this case instead.

Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :

Lowering priority of this as it appears that this code only gets called by tests.

no longer affects: juju/2.2
Changed in juju:
importance: High → Medium
status: Triaged → In Progress
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1698703] Re: Unnecessary ForModel use when retrieving controller addresses

Sounds like a time bomb of someone just waiting to update something and use
a test as a starting point / finding a function that sounds like it does
just what they want.

John
=:->

On Jun 19, 2017 05:30, "Menno Finlay-Smits" <email address hidden>
wrote:

> Lowering priority of this as it appears that this code only gets called
> by tests.
>
> ** No longer affects: juju/2.2
>
> ** Changed in: juju
> Importance: High => Medium
>
> ** Changed in: juju
> Status: Triaged => In Progress
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1698703
>
> Title:
> Unnecessary ForModel use when retrieving controller addresses
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1698703/+subscriptions
>

Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :

> Sounds like a time bomb of someone just waiting to update
> something and use a test as a starting point / finding a
> function that sounds like it does just what they want.

For sure - I will put up a fix shortly. I dropped the priority to highlight it's not as critical as some of the other ForModel misuses (and not important for 2.2.1).

Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.