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

Issue 7385049: uniter: skip unknown rel. endpoints (Closed)

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

Description

uniter: skip unknown rel. endpoints Ignore relations with unknown (not implemented by the charm) when handling upgrades. The uniter is now requesting all relation events on upgrade, so they won't be missed. This also fixes LP bug #1101140 (uniter does not skip unimplemented relations). https://code.launchpad.net/~dimitern/juju-core/002-bug-1101140-ignore-unknown-relations/+merge/149921 Requires: https://code.launchpad.net/~dimitern/juju-core/001-upgrade-charm-filter-restart-watchers/+merge/149910 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 1

Patch Set 2 : uniter: ignore unknown endpoints #

Patch Set 3 : uniter: ignore unknown endpoints #

Total comments: 13

Patch Set 4 : uniter: skip unknown rel. endpoints #

Total comments: 14

Patch Set 5 : uniter: skip unknown rel. endpoints #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -31 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M worker/uniter/filter.go View 1 5 chunks +7 lines, -7 lines 0 comments Download
M worker/uniter/modes.go View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M worker/uniter/relationer.go View 1 2 3 4 3 chunks +5 lines, -4 lines 0 comments Download
M worker/uniter/relationer_test.go View 1 2 3 4 5 chunks +19 lines, -10 lines 0 comments Download
M worker/uniter/uniter.go View 1 2 3 4 2 chunks +12 lines, -0 lines 0 comments Download
M worker/uniter/uniter_test.go View 1 2 3 11 chunks +63 lines, -10 lines 0 comments Download

Messages

Total messages: 6
fwereade
Tests! But look into the prereq first anyway :). https://codereview.appspot.com/7385049/diff/1/worker/uniter/uniter.go File worker/uniter/uniter.go (right): https://codereview.appspot.com/7385049/diff/1/worker/uniter/uniter.go#newcode441 worker/uniter/uniter.go:441: ...
11 years, 2 months ago (2013-02-22 10:32:28 UTC) #1
dimitern
Please take a look.
11 years, 2 months ago (2013-02-25 10:04:19 UTC) #2
fwereade
Thanks -- LGTM assuming the below. https://codereview.appspot.com/7385049/diff/7001/worker/uniter/modes.go File worker/uniter/modes.go (right): https://codereview.appspot.com/7385049/diff/7001/worker/uniter/modes.go#newcode145 worker/uniter/modes.go:145: // handle the ...
11 years, 2 months ago (2013-02-25 10:31:57 UTC) #3
dimitern
Please take a look. https://codereview.appspot.com/7385049/diff/7001/worker/uniter/modes.go File worker/uniter/modes.go (right): https://codereview.appspot.com/7385049/diff/7001/worker/uniter/modes.go#newcode145 worker/uniter/modes.go:145: // handle the relations for ...
11 years, 2 months ago (2013-02-25 11:00:05 UTC) #4
TheMue
Mostly LGTM, only minor comments. https://codereview.appspot.com/7385049/diff/2002/worker/uniter/relationer.go File worker/uniter/relationer.go (right): https://codereview.appspot.com/7385049/diff/2002/worker/uniter/relationer.go#newcode54 worker/uniter/relationer.go:54: // No need to ...
11 years, 2 months ago (2013-02-25 11:20:47 UTC) #5
dimitern
11 years, 2 months ago (2013-02-25 11:59:08 UTC) #6
*** Submitted:

uniter: skip unknown rel. endpoints

Ignore relations with unknown (not implemented by
the charm) when handling upgrades.
The uniter is now requesting all relation events
on upgrade, so they won't be missed.

This also fixes LP bug #1101140 (uniter does not
skip unimplemented relations).

R=fwereade, TheMue
CC=
https://codereview.appspot.com/7385049

https://codereview.appspot.com/7385049/diff/2002/worker/uniter/relationer.go
File worker/uniter/relationer.go (right):

https://codereview.appspot.com/7385049/diff/2002/worker/uniter/relationer.go#...
worker/uniter/relationer.go:54: // No need to check the r.dir exists yet
On 2013/02/25 11:20:47, TheMue wrote:
> IMHO not needed comment, only relates to removed code part.

Done.

https://codereview.appspot.com/7385049/diff/2002/worker/uniter/relationer.go#...
worker/uniter/relationer.go:124: // We are about to use the dir, ensure it's
there
On 2013/02/25 11:20:47, TheMue wrote:
> Punctuation. ;)

Done.

https://codereview.appspot.com/7385049/diff/2002/worker/uniter/relationer_tes...
File worker/uniter/relationer_test.go (right):

https://codereview.appspot.com/7385049/diff/2002/worker/uniter/relationer_tes...
worker/uniter/relationer_test.go:102: // Verify PrepareHook created the dir
On 2013/02/25 11:20:47, TheMue wrote:
> Punctuation.

Done.

https://codereview.appspot.com/7385049/diff/2002/worker/uniter/relationer_tes...
worker/uniter/relationer_test.go:355: // We're no longer doing this in Join, so
we must do it here
On 2013/02/25 11:20:47, TheMue wrote:
> Needless comment, it's related to a change.

Not exactly, the change breaks this unless dir.Ensure() is run. Updated the
comment to reflect this.

https://codereview.appspot.com/7385049/diff/2002/worker/uniter/relationer_tes...
worker/uniter/relationer_test.go:409: // Join the relationer; the dir won't be
created until necessary
On 2013/02/25 11:20:47, TheMue wrote:
> Ditto.

Actually, this is now part of the Join's behavior and it's worth the comment,
even more so, because it changes the test logic.

https://codereview.appspot.com/7385049/diff/2002/worker/uniter/uniter.go
File worker/uniter/uniter.go (right):

https://codereview.appspot.com/7385049/diff/2002/worker/uniter/uniter.go#newc...
worker/uniter/uniter.go:318: // TODO: Get these from state, not from disk
On 2013/02/25 11:20:47, TheMue wrote:
> // TODO(who): ..., and punctuation.

Done.

https://codereview.appspot.com/7385049/diff/2002/worker/uniter/uniter_test.go
File worker/uniter/uniter_test.go (right):

https://codereview.appspot.com/7385049/diff/2002/worker/uniter/uniter_test.go...
worker/uniter/uniter_test.go:619: // after an upgrade-charm, in the hope that
the scheduler will
On 2013/02/25 11:20:47, TheMue wrote:
> "in the hope"? Sounds a bit weak to me. Any way to force the delivery in a
wrong
> order?

No ways I can think of to tweak the scheduling at run-time.
Sign in to reply to this message.

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