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

Issue 13706043: Updated how unitName is sent to resolve/retry

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by rharding
Modified:
11 years ago
Reviewers:
benji, mp+185565
Visibility:
Public.

Description

Updated how unitName is sent to resolve/retry The inspector was create an array[array] and thus passing the resovled() method an array as a unitName. The go back end expects a string and it refused to resolve/retry anything. - Update the inspector method to make sure it grabs a single string - Update the tests for the inspector to look for a single string - Add a quick assertion in the go backend to fuss if it doesn't get a string QA: Note: MySQL always fails for me in my local lxc go environment - Bootstrap a go environment in lxc, deploy mysql into it. I setup 3 units. - Wait for the units to go into error state. - Pick one of the units, resolve the unit. - After a bit it should go to running and you can destroy it properly. - Note that you can also watch the WS traffic in chrome dev tools and verify that your request/response was successful. Example broken communication: {"RequestId":31,"Error":"json: cannot unmarshal array into Go value of type string","Response":{}} {"Type":"Client","Request":"Resolved","Params":{"UnitName":["mysql/0"],"Retry":false},"RequestId":32} https://code.launchpad.net/~rharding/juju-gui/go-resolve-retry/+merge/185565 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2

Patch Set 2 : Updated how unitName is sent to resolve/retry #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -5 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M app/store/env/go.js View 2 chunks +4 lines, -1 line 0 comments Download
M app/views/inspector.js View 1 chunk +4 lines, -1 line 0 comments Download
M test/test_inspector_overview.js View 3 chunks +9 lines, -3 lines 0 comments Download

Messages

Total messages: 5
rharding
Please take a look.
11 years ago (2013-09-13 18:14:13 UTC) #1
benji
LGTM, no QA. https://codereview.appspot.com/13706043/diff/1/app/store/env/go.js File app/store/env/go.js (right): https://codereview.appspot.com/13706043/diff/1/app/store/env/go.js#newcode1026 app/store/env/go.js:1026: } If this is such a ...
11 years ago (2013-09-13 18:18:08 UTC) #2
rharding
Replied https://codereview.appspot.com/13706043/diff/1/app/store/env/go.js File app/store/env/go.js (right): https://codereview.appspot.com/13706043/diff/1/app/store/env/go.js#newcode1026 app/store/env/go.js:1026: } On 2013/09/13 18:18:08, benji wrote: > If ...
11 years ago (2013-09-13 18:21:33 UTC) #3
benji
On 2013/09/13 18:21:33, rharding wrote: > Replied > > https://codereview.appspot.com/13706043/diff/1/app/store/env/go.js > File app/store/env/go.js (right): > ...
11 years ago (2013-09-13 18:22:41 UTC) #4
rharding
11 years ago (2013-09-13 18:27:32 UTC) #5
*** Submitted:

Updated how unitName is sent to resolve/retry

The inspector was create an array[array] and thus passing the resovled()
method an array as a unitName. The go back end expects a string and it
refused to resolve/retry anything.

- Update the inspector method to make sure it grabs a single string
- Update the tests for the inspector to look for a single string
- Add a quick assertion in the go backend to fuss if it doesn't get a string


QA:

Note: MySQL always fails for me in my local lxc go environment

- Bootstrap a go environment in lxc, deploy mysql into it. I setup 3 units.
- Wait for the units to go into error state.
- Pick one of the units, resolve the unit.
- After a bit it should go to running and you can destroy it properly.
- Note that you can also watch the WS traffic in chrome dev tools and verify
that your request/response was successful. 

Example broken communication:

{"RequestId":31,"Error":"json: cannot unmarshal array into Go value of type
string","Response":{}}
{"Type":"Client","Request":"Resolved","Params":{"UnitName":["mysql/0"],"Retry":false},"RequestId":32}

R=benji
CC=
https://codereview.appspot.com/13706043
Sign in to reply to this message.

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