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

Issue 14695043: Redo Service Placement

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by bcsaller
Modified:
10 years, 6 months ago
Reviewers:
mp+191119, gary.poster, matthew.scott
Visibility:
Public.

Description

Redo Service Placement This changes a number of aspects of how service placement is handled. There may still be some edge cases and QA will need to be extensive as this has moved through phases where various parts worked and didn't. I believe this version to be good however. Position annotations remain on service models now rather than being deleted when applied. We favor this to having vars such as hasBeenPositioned, positionedFromGhost and service model x/y (which mixed into BoundingBoxes). These various complications are mostly gone and the handling of updating position annotations falls to a single method on the topology. (Though to be fair that is still called from more than one place). Further simplification might be possible by unifying the node creation and node update paths wrt annotations. This didn't however fit in the time provided. This also includes a basic fix for always pulling positions from the client during an export. https://code.launchpad.net/~bcsaller/juju-gui/exportXY/+merge/191119 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 30

Patch Set 2 : Redo Service Placement #

Total comments: 13

Patch Set 3 : Redo Service Placement #

Patch Set 4 : Redo Service Placement #

Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -216 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M app/models/models.js View 1 2 2 chunks +7 lines, -21 lines 0 comments Download
M app/store/env/fakebackend.js View 1 1 chunk +3 lines, -3 lines 0 comments Download
M app/views/ghost-inspector.js View 1 4 chunks +21 lines, -42 lines 0 comments Download
M app/views/topology/relation.js View 1 2 chunks +5 lines, -6 lines 0 comments Download
M app/views/topology/service.js View 1 12 chunks +77 lines, -130 lines 0 comments Download
M app/views/topology/topology.js View 1 2 3 2 chunks +46 lines, -0 lines 0 comments Download
M app/views/utils.js View 1 1 chunk +1 line, -1 line 0 comments Download
M test/test_conflict_ux.js View 1 2 chunks +2 lines, -1 line 0 comments Download
M test/test_environment_view.js View 1 2 3 chunks +0 lines, -8 lines 0 comments Download
M test/test_fakebackend.js View 1 chunk +5 lines, -1 line 0 comments Download
M test/test_inspector_constraints.js View 1 1 chunk +1 line, -0 lines 0 comments Download
M test/test_inspector_overview.js View 1 1 chunk +1 line, -0 lines 0 comments Download
M test/test_inspector_settings.js View 1 1 chunk +1 line, -0 lines 0 comments Download
M test/test_model.js View 1 2 chunks +3 lines, -2 lines 0 comments Download
M test/test_service_module.js View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11
bcsaller
Please take a look.
10 years, 6 months ago (2013-10-15 08:26:10 UTC) #1
gary.poster
On 2013/10/15 08:26:10, bcsaller wrote: > Please take a look. Doing qa first. A lot ...
10 years, 6 months ago (2013-10-15 12:37:24 UTC) #2
benjamin.saller
I believe you when you say that it didn't happen in QA at the midway ...
10 years, 6 months ago (2013-10-15 14:44:32 UTC) #3
gary.poster
Hey Ben. I just saw your reply to my qa, which touches on some of ...
10 years, 6 months ago (2013-10-15 15:34:16 UTC) #4
benjamin.saller
Thanks, new version pushing now https://codereview.appspot.com/14695043/diff/1/app/views/ghost-inspector.js File app/views/ghost-inspector.js (right): https://codereview.appspot.com/14695043/diff/1/app/views/ghost-inspector.js#newcode64 app/views/ghost-inspector.js:64: annotations['gui-y'] = ghostAttributes.coordinates[1]; On ...
10 years, 6 months ago (2013-10-15 19:40:11 UTC) #5
bcsaller
Please take a look.
10 years, 6 months ago (2013-10-15 20:40:58 UTC) #6
gary.poster
Awesome! LGTM and qa good, with trivial. Thank you! https://codereview.appspot.com/14695043/diff/9001/app/models/models.js File app/models/models.js (right): https://codereview.appspot.com/14695043/diff/9001/app/models/models.js#newcode1139 app/models/models.js:1139: ...
10 years, 6 months ago (2013-10-15 22:16:55 UTC) #7
matthew.scott
LGTMly code, QAing quickly. https://codereview.appspot.com/14695043/diff/9001/app/views/topology/topology.js File app/views/topology/topology.js (right): https://codereview.appspot.com/14695043/diff/9001/app/views/topology/topology.js#newcode212 app/views/topology/topology.js:212: @param {ms} window. On 2013/10/15 ...
10 years, 6 months ago (2013-10-15 22:29:56 UTC) #8
benjamin.saller
Thanks again, sorry for so many rounds. https://codereview.appspot.com/14695043/diff/9001/app/models/models.js File app/models/models.js (right): https://codereview.appspot.com/14695043/diff/9001/app/models/models.js#newcode1139 app/models/models.js:1139: * @param ...
10 years, 6 months ago (2013-10-15 22:41:06 UTC) #9
benjamin.saller
Thanks to you both. https://codereview.appspot.com/14695043/diff/9001/test/test_environment_view.js File test/test_environment_view.js (right): https://codereview.appspot.com/14695043/diff/9001/test/test_environment_view.js#newcode625 test/test_environment_view.js:625: /*view.topo.servicePointOutside = function() { On ...
10 years, 6 months ago (2013-10-15 22:46:12 UTC) #10
bcsaller
10 years, 6 months ago (2013-10-15 22:59:04 UTC) #11
*** Submitted:

Redo Service Placement

This changes a number of aspects of how service placement is handled. There
may still be some edge cases and QA will need to be extensive as this 
has moved through phases where various parts worked and didn't. I believe 
this version to be good however.

Position annotations remain on service models now rather than being deleted
when applied. We favor this to having vars such as hasBeenPositioned,
positionedFromGhost and service model x/y (which mixed into BoundingBoxes). 
These various complications are mostly gone and the handling of updating 
position annotations falls to a single method on the topology. (Though to be
fair that is still called from more than one place). 

Further simplification might be possible by unifying the node creation and
node update paths wrt annotations. This didn't however fit in the time
provided.

This also includes a basic fix for always pulling positions from the client
during an export.

R=gary.poster, benjamin.saller, matthew.scott
CC=
https://codereview.appspot.com/14695043
Sign in to reply to this message.

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