API work

2013-10-31 Thread Andrew Wilkins
I've created a bug to do the CLI->API work. If there's something existing, or a more appropriate place to do this, let me know and this can disappear. https://bugs.launchpad.net/juju-core/+bug/1246983 I'm going to look at doing destroy-machine, which looks pretty trivial. Cheers, Andrew -- Juju

Re: [ALPHA but useful] juju quickstart plugin v 0.2

2013-10-31 Thread John Meinel
That sounds great. I look forward to trying it out. John =:-> On Nov 1, 2013 5:44 AM, "Gary Poster" wrote: > Hi all. The GUI team has a tool in alpha that we think is useful now. > It is an opinionated way to start a great Juju experience quickly. > We're looking for users and feedback from ea

Re: State interfaces

2013-10-31 Thread John Meinel
That specific problem (struct A returning concrete struct B objects), definitely came up in our struct vs interface discussions. It might be better to have it as a free function rather than a method on Machine. Like a func UnitsForMachine (machine interface {Tag ()}) [] Unit The problem with inter

Juju core 1.16.2 is released

2013-10-31 Thread Curtis Hovey-Canonical
juju-core 1.16.2 A new stable release of Juju, juju-core 1.16.2, is now available. This release replaces 1.16.0. Getting Juju juju-core 1.16.2 is available in trusty and backported to earlier series in the following PPA https://launchpad.net/~juju/+archive/stable Resolved issues * Azure bo

[ALPHA but useful] juju quickstart plugin v 0.2

2013-10-31 Thread Gary Poster
Hi all. The GUI team has a tool in alpha that we think is useful now. It is an opinionated way to start a great Juju experience quickly. We're looking for users and feedback from early releases. = What does it do now? = If you run the plugin from the commandline, it will bootstrap an environment

Re: State interfaces

2013-10-31 Thread Andrew Wilkins
On Thu, Oct 31, 2013 at 8:57 PM, John Arbash Meinel wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 2013-10-31 16:21, Andrew Wilkins wrote: > > Does anybody object to converting the public entity structs in > > state to interfaces? i.e. State, Machine, Unit, etc. > > > > I'd like t

Re: State interfaces

2013-10-31 Thread Tim Penhey
On 01/11/13 08:49, Nate Finch wrote: > Preferably, if you find yourself needing an interface that only has A, > make an interface that only has A, and have your function use that > interface. :) > > But that is a neat trick for when the above isn't possible for whatever > reason. Well, sometimes

Re: State interfaces

2013-10-31 Thread Nate Finch
Preferably, if you find yourself needing an interface that only has A, make an interface that only has A, and have your function use that interface. :) But that is a neat trick for when the above isn't possible for whatever reason. On Thu, Oct 31, 2013 at 3:43 PM, Tim Penhey wrote: > -BEGIN

Re: State interfaces

2013-10-31 Thread Tim Penhey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/11/13 01:57, John Arbash Meinel wrote: > On 2013-10-31 16:21, Andrew Wilkins wrote: >> Does anybody object to converting the public entity structs in >> state to interfaces? i.e. State, Machine, Unit, etc. > >> I'd like to write some tests for

Re: State interfaces

2013-10-31 Thread Nate Finch
Defining small interfaces is the best way to make your code testable without making it unwieldy. The nice thing about Go interfaces is that you don't have to make an interface that covers all your bases, since there's very little friction to creating interfaces for your specific use case. Often t

Re: State interfaces

2013-10-31 Thread roger peppe
On 31 October 2013 05:21, Andrew Wilkins wrote: > Does anybody object to converting the public entity structs in state to > interfaces? i.e. State, Machine, Unit, etc. > > I'd like to write some tests for new code that depends on state. Setting up > mongo and so on is overkill. and should be releg

Re: State interfaces

2013-10-31 Thread Nate Finch
+1 On Thu, Oct 31, 2013 at 8:57 AM, John Arbash Meinel wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 2013-10-31 16:21, Andrew Wilkins wrote: > > Does anybody object to converting the public entity structs in > > state to interfaces? i.e. State, Machine, Unit, etc. > > > > I'd l

Re: State interfaces

2013-10-31 Thread John Arbash Meinel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2013-10-31 16:21, Andrew Wilkins wrote: > Does anybody object to converting the public entity structs in > state to interfaces? i.e. State, Machine, Unit, etc. > > I'd like to write some tests for new code that depends on state. > Setting up mong

State interfaces

2013-10-31 Thread Andrew Wilkins
Does anybody object to converting the public entity structs in state to interfaces? i.e. State, Machine, Unit, etc. I'd like to write some tests for new code that depends on state. Setting up mongo and so on is overkill. and should be relegated to integration testing. Cheers, Andrew -- Juju-dev

Re: Notes from Scale testing

2013-10-31 Thread John Arbash Meinel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2013-10-31 12:34, William Reade wrote: > > On Thu, Oct 31, 2013 at 12:37 AM, William Reade > mailto:william.re...@canonical.com>> > wrote: > > The service watch fires on any change to the document, and adding > a unit increments the service's uni

Re: Notes from Scale testing

2013-10-31 Thread John Arbash Meinel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2013-10-31 12:25, William Reade wrote: > On Wed, Oct 30, 2013 at 8:15 AM, John Arbash Meinel > mailto:j...@arbash-meinel.com>> wrote: > >>> Just to be clear for other readers (wasn't clear to me without >>> checking the src) this isn't the agent

Re: Notes from Scale testing

2013-10-31 Thread William Reade
On Thu, Oct 31, 2013 at 12:37 AM, William Reade wrote: > The service watch fires on any change to the document, and adding a unit > increments the service's unitcount field. The easy fix is to wrap the > service watcher so that it discards irrelevant changes; the hard fix > (schema change!) is to

Re: Notes from Scale testing

2013-10-31 Thread William Reade
On Wed, Oct 30, 2013 at 8:15 AM, John Arbash Meinel wrote: > >> Just to be clear for other readers (wasn't clear to me without > >> checking the src) this isn't the agent resolving the api server > >> address from provider-state which would mean provider credentials > >> available to each agent,

Re: Notes from Scale testing

2013-10-31 Thread William Reade
On Wed, Oct 30, 2013 at 9:26 AM, Gustavo Niemeyer wrote: > On Wed, Oct 30, 2013 at 7:57 AM, John Arbash Meinel > wrote: > >> Where is N^2 coming from? > > > > If you add N units one-by-one each new add triggers all existing units > > to wake up and ask for the Life and CharmURL of the service aga

Scale Testing: Now with profiling!

2013-10-31 Thread John Arbash Meinel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 So I managed to instrument a jujud with both CPU and Mem profiling dumps. I then brought up 1000 units and did some poking around. The results were actually pretty enlightening. 1) Guess what the #1 CPU time was. I know I was surprised: Total: 25469