Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Make the GUI aware of the new Subordinate info. #558

Merged
merged 3 commits into from Sep 17, 2014

Conversation

frankban
Copy link
Member

After a recent change in juju-core, the subordinate
info is available through the mega-watcher for
services and units. This branch enables the GUI to
fully support this where possible.

Also fixed the code so that uses of "subordinate" vs
"is_subordinate" are consistent.

After a recent change in juju-core, the subordinate
info is available through the mega-watcher for
services and units. This branch enables the GUI to
fully support this where possible.

Also fixed the code so that uses of "subordinate" vs
"is_subordinate" are consistent.
@frankban
Copy link
Member Author

QA:

  • in sandbox mode and in a real env, use the mv flag;
  • deploy a subordinate charm, e.g. storage or puppet;
  • check that the inspector (both for the ghost and the deployed service)
    does not expose the ability to scale up the service;
  • in machine view, the service unit does not appear;
  • deploy another non-subordinate unit, and check you can still place and
    scale up the non-subordinate unit.

It's not easy to exercize the new juju-core mega-watcher stream, but code includes tests for that, so I don't think QAing that is important right now.

Thank you!

@jujugui
Copy link
Contributor

jujugui commented Sep 16, 2014

Test PASSed.
Refer to this link for build results: http://ci.jujugui.org:8080/job/juju-gui/1864/

@@ -943,7 +944,8 @@ YUI.add('juju-env-sandbox', function(Y) {
Ports: 'open_ports',
Status: 'agent_state',
StatusInfo: 'agent_state_info',
StatusData: 'agent_state_data'
StatusData: 'agent_state_data',
Subordinate: 'subordinate'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This clearly predates your branch, but do you know why all the keys in this object are capitalized? Everywhere else we use camelCase.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this maps fields in the juju-core stream (capitalized) to internal JS model fields.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks.

@jcsackett
Copy link
Contributor

Code looks good, though I have a few questions. I am QAing now.

@jcsackett
Copy link
Contributor

Sandbox QA notes:

  • I deployed puppet; the scale up wasn't available, as expected. The inspector as a side effect looks a little goofy, but we can circle back with UX. Deploying worked as expected.
  • In machine view, I could scale up puppet--the adding units stuff was available there. I don't know if it's supposed to be. If the goal is to block scaling up entirely, I think we need a follow up branch to address machine view. I do not feel this blocks this branch's QA--merely that there might be further work.
  • Non-subordinate services had scale up as expected, and could properly be scaled up.

@jcsackett
Copy link
Contributor

QA ec2 notes:

On ec2, I observed exactly the same behavior as in sandbox.

QA OK, with provisos of possible follow up work.

Thanks @frankban! 👍

@frankban
Copy link
Member Author

Thanks for the review and QA JC. Yeah the scale up in mv needs to be fixed, but was out of scope for this branch.

@jujugui
Copy link
Contributor

jujugui commented Sep 17, 2014

Test PASSed.
Refer to this link for build results: http://ci.jujugui.org:8080/job/juju-gui/1878/

@@ -191,7 +191,11 @@ YUI.add('juju-delta-handlers', function(Y) {
agent_state_data: change.StatusData,
public_address: change.PublicAddress,
private_address: change.PrivateAddress,
open_ports: utils.convertOpenPorts(change.Ports)
open_ports: utils.convertOpenPorts(change.Ports),
// Since less recent versions of juju-core do not include the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add the version of Juju that this will become available?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@hatched
Copy link
Contributor

hatched commented Sep 17, 2014

👍 with some comments. Thanks for jumping on this fix so fast!

@jujugui
Copy link
Contributor

jujugui commented Sep 17, 2014

Test PASSed.
Refer to this link for build results: http://ci.jujugui.org:8080/job/juju-gui/1879/

@frankban
Copy link
Member Author

Thanks for the reviews!
:shipit:

@frankban
Copy link
Member Author

Retrying, failure seems spurious.
:shipit:

@jujugui
Copy link
Contributor

jujugui commented Sep 17, 2014

Status: merge request accepted. Url: http://ci.jujugui.org:8080/job/juju-gui-merge

jujugui added a commit that referenced this pull request Sep 17, 2014
Make the GUI aware of the new Subordinate info.

After a recent change in juju-core, the subordinate
info is available through the mega-watcher for
services and units. This branch enables the GUI to
fully support this where possible.

Also fixed the code so that uses of "subordinate" vs
"is_subordinate" are consistent.
@jujugui jujugui merged commit 00d9ba7 into juju:develop Sep 17, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants