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

Issue 7227045: state: only real relations can be added

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by fwereade
Modified:
11 years, 3 months ago
Reviewers:
dimitern, mp+145169, TheMue
Visibility:
Public.

Description

state: only real relations can be added I'm starting to think InferEndpoints was a mistake: possible relations for a given service can change between InferEndpoints and AddRelation (or, for that matter, between InferEndpoints and EndpointsRelation). So, I *think*, we should probably make the InferEndpoints call internal. That's a followup, anyway, even if we end up deciding it's a smart move; thoughts, anyone? https://code.launchpad.net/~fwereade/juju-core/strict-add-relation/+merge/145169 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : state: only real relations can be added #

Total comments: 5

Patch Set 3 : state: only real relations can be added #

Unified diffs Side-by-side diffs Delta from patch set Stats (+213 lines, -254 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M state/relation_test.go View 3 chunks +4 lines, -9 lines 0 comments Download
M state/service_test.go View 5 chunks +82 lines, -133 lines 0 comments Download
M state/state.go View 1 2 1 chunk +82 lines, -61 lines 0 comments Download
M worker/uniter/context_test.go View 9 chunks +34 lines, -40 lines 0 comments Download
M worker/uniter/relationer_test.go View 5 chunks +9 lines, -11 lines 0 comments Download

Messages

Total messages: 5
fwereade
Please take a look.
11 years, 3 months ago (2013-01-29 05:49:19 UTC) #1
fwereade
On 2013/01/29 05:49:19, fwereade wrote: > Please take a look. To expand on the InferEndpoints ...
11 years, 3 months ago (2013-01-29 06:07:31 UTC) #2
TheMue
LGTM
11 years, 3 months ago (2013-01-31 17:59:28 UTC) #3
dimitern
LGTM, one question. https://codereview.appspot.com/7227045/diff/2001/state/relation_test.go File state/relation_test.go (right): https://codereview.appspot.com/7227045/diff/2001/state/relation_test.go#newcode44 state/relation_test.go:44: Why the check for pre-existing relations ...
11 years, 3 months ago (2013-02-04 16:32:09 UTC) #4
fwereade
11 years, 3 months ago (2013-02-07 17:49:41 UTC) #5
*** Submitted:

state: only real relations can be added

I'm starting to think InferEndpoints was a mistake: possible relations for a
given service can change between InferEndpoints and AddRelation (or, for
that matter, between InferEndpoints and EndpointsRelation). So, I *think*,
we should probably make the InferEndpoints call internal. That's a followup,
anyway, even if we end up deciding it's a smart move; thoughts, anyone?

R=TheMue, dimitern
CC=
https://codereview.appspot.com/7227045

https://codereview.appspot.com/7227045/diff/2001/state/relation_test.go
File state/relation_test.go (right):

https://codereview.appspot.com/7227045/diff/2001/state/relation_test.go#newco...
state/relation_test.go:44: 
On 2013/02/04 16:32:09, dimitern wrote:
> Why the check for pre-existing relations is not relevant anymore?

Because it's already tested, better...

https://codereview.appspot.com/7227045/diff/2001/state/relation_test.go#newco...
state/relation_test.go:119: // Check we cannot re-add the same relation,
regardless of endpoint ordering.
...here.

https://codereview.appspot.com/7227045/diff/2001/state/service_test.go
File state/service_test.go (right):

https://codereview.appspot.com/7227045/diff/2001/state/service_test.go#newcod...
state/service_test.go:422: eps, err :=
s.State.InferEndpoints([]string{"wordpress", "mysql"})
On 2013/02/04 16:32:09, dimitern wrote:
> Isn't the point removing InferEndpoints altogether? Or this is a interim step?

Yeah, nobody's argued it's a bad idea yet, so I'll go ahead and call it a bug.
Sign in to reply to this message.

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