Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(841)

Issue 11478046: Subordinates should not be deployed with unit ct.

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 2 months ago by matthew.scott
Modified:
11 years, 2 months ago
Reviewers:
rharding, mp+176583, gary.poster
Visibility:
Public.

Description

Subordinates should not be deployed with unit ct. Deploying a subordinate with a unit count causes an error in core. This prevents one from entering a unit count in the charm panel (did not touch ghost inspector, that may also need it) and defaults to 0. This also affects fakebackend. https://code.launchpad.net/~makyo/juju-gui/core-sub-num-units/+merge/176583 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -11 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M app/store/env/fakebackend.js View 1 chunk +7 lines, -8 lines 2 comments Download
M app/templates/charm-pre-configuration.handlebars View 2 chunks +4 lines, -0 lines 2 comments Download
M app/views/charm-panel.js View 1 chunk +2 lines, -2 lines 0 comments Download
M test/test_fakebackend.js View 1 chunk +1 line, -1 line 2 comments Download

Messages

Total messages: 5
matthew.scott
Please take a look.
11 years, 2 months ago (2013-07-24 03:50:48 UTC) #1
matthew.scott
It's way past my bedtime, will gladly rework anything in the morning.
11 years, 2 months ago (2013-07-24 03:52:22 UTC) #2
rharding
LGTM though I think it'd be nice to have new tests to more clearly walk ...
11 years, 2 months ago (2013-07-24 11:56:51 UTC) #3
gary.poster
LGTM with comments. I'm going to either try to get changes done for this and ...
11 years, 2 months ago (2013-07-24 12:23:06 UTC) #4
gary.poster
11 years, 2 months ago (2013-07-24 12:57:43 UTC) #5
https://codereview.appspot.com/11478046/diff/1/app/store/env/fakebackend.js
File app/store/env/fakebackend.js (left):

https://codereview.appspot.com/11478046/diff/1/app/store/env/fakebackend.js#o...
app/store/env/fakebackend.js:613: if (service && service.get('is_subordinate'))
{
On 2013/07/24 12:23:07, gary.poster wrote:
> Ignorable suggestion.
> 
> I'd prefer to have better error messages here, and so keep the rough outline
of
> what we had before.  Therefore, I'd keep the deletions above in lines 603-608,
> and have this section (613-615) instead read as follows:
> 
> if (service.get('is_subordinate')) {
>   if (numUnits !== 0) {
>     return {error: serviceName + ' is a subordinate, cannot add unit(s).'};
>   }
> } else if (numUnits < 0) {
>   return {error: 'Invalid number of units.'};
> }

nm.  this is buggy.  sticking with yours.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b