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

Issue 6305067: state: Improved verification of relation endpoints. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 10 months ago by TheMue
Modified:
11 years, 9 months ago
Reviewers:
rog, niemeyer, fwereade, mp+109171
Visibility:
Public.

Description

state: Improved verification of relation endpoints. AddRelation() consists of several writings to ZooKeeper. Now the whole verification is done before the writings start. https://code.launchpad.net/~themue/juju-core/go-state-relation-endpoint-verification/+merge/109171 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -8 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M state/relation.go View 2 chunks +21 lines, -1 line 1 comment Download
M state/state.go View 3 chunks +11 lines, -7 lines 0 comments Download
M state/state_test.go View 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 5
TheMue
Please take a look.
11 years, 10 months ago (2012-06-07 15:35:58 UTC) #1
rog
LGTM, although i'm sure i don't understand all the implications. https://codereview.appspot.com/6305067/diff/1/state/relation.go File state/relation.go (right): https://codereview.appspot.com/6305067/diff/1/state/relation.go#newcode63 ...
11 years, 10 months ago (2012-06-07 16:17:45 UTC) #2
fwereade
I'm not really convinced this helps us much. The only sane way to sanely construct ...
11 years, 10 months ago (2012-06-08 17:13:02 UTC) #3
fwereade
I still doubt this will have great value in practice, but LGTM.
11 years, 10 months ago (2012-06-11 08:22:47 UTC) #4
niemeyer
11 years, 10 months ago (2012-06-13 01:27:36 UTC) #5
On 2012/06/11 08:22:47, fwereade wrote:
> I still doubt this will have great value in practice, but LGTM.

Sorry Frank, I have to agree with William, even though the suggestion to prevent
this from happening was mine in the first place.

My misguided suggestion was based on the fact I had wrong memories regarding the
way we handle "deploy serviceA:foo serviceB:bar" commands. We don't create the
relation endpoint directly, but rather call a method to resolve what we call the
*descriptor* "<service>[:<relname>]". This is the place that must have that
validation to prevent errors from the user from leaking through.

I apologize for wasting your time on this.
Sign in to reply to this message.

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