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

Issue 7303091: charm/hook: moved from worker/uniter (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+148436, fwereade
Visibility:
Public.

Description

charm/hook: moved from worker/uniter After a discussion, we realized it makes sense to move the hook module from worker/uniter into charm/. All relation types and global hooks are defined there. In addition, I added a ScanCharm() call, which will be used to fix bug #864164 and can be useful to validate a charm's hooks dir against the metadata defined relations. https://code.launchpad.net/~dimitern/juju-core/reorganize-charm-hook-consts/+merge/148436 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 8

Patch Set 2 : charm/hook: moved from worker/uniter #

Unified diffs Side-by-side diffs Delta from patch set Stats (+326 lines, -223 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
A charm/hook/hook.go View 1 1 chunk +64 lines, -0 lines 0 comments Download
M charm/meta.go View 1 2 chunks +30 lines, -0 lines 0 comments Download
M charm/meta_test.go View 1 1 chunk +30 lines, -0 lines 0 comments Download
worker/uniter/hook/hook.go View 1 chunk +0 lines, -78 lines 0 comments Download
D worker/uniter/hook/hook.go View 1 1 chunk +45 lines, -0 lines 0 comments Download
worker/uniter/hook/hook_test.go View 1 chunk +0 lines, -55 lines 0 comments Download
worker/uniter/hook/hook_test.go View 1 1 chunk +56 lines, -0 lines 0 comments Download
M worker/uniter/modes.go View 1 6 chunks +9 lines, -8 lines 0 comments Download
M worker/uniter/relation/hookqueue.go View 1 10 chunks +13 lines, -12 lines 0 comments Download
M worker/uniter/relation/hookqueue_test.go View 1 8 chunks +9 lines, -8 lines 0 comments Download
M worker/uniter/relation/relation.go View 1 3 chunks +4 lines, -3 lines 0 comments Download
M worker/uniter/relation/relation_test.go View 1 6 chunks +18 lines, -17 lines 0 comments Download
M worker/uniter/relationer.go View 1 4 chunks +6 lines, -5 lines 0 comments Download
M worker/uniter/relationer_test.go View 1 13 chunks +19 lines, -18 lines 0 comments Download
M worker/uniter/state.go View 1 3 chunks +3 lines, -3 lines 0 comments Download
M worker/uniter/state_test.go View 1 6 chunks +9 lines, -8 lines 0 comments Download
M worker/uniter/uniter.go View 1 9 chunks +9 lines, -8 lines 0 comments Download

Messages

Total messages: 3
dimitern
Please take a look.
11 years, 2 months ago (2013-02-14 12:28:06 UTC) #1
fwereade
As discussed online: https://codereview.appspot.com/7303091/diff/1/charm/hook/hook.go File charm/hook/hook.go (right): https://codereview.appspot.com/7303091/diff/1/charm/hook/hook.go#newcode38 charm/hook/hook.go:38: ) A couple of const slices ...
11 years, 2 months ago (2013-02-14 14:17:03 UTC) #2
dimitern
11 years, 2 months ago (2013-02-14 16:34:07 UTC) #3
I'm closing this because of an lbox issue and will repropose it.

https://codereview.appspot.com/7303091/diff/1/charm/hook/hook.go
File charm/hook/hook.go (right):

https://codereview.appspot.com/7303091/diff/1/charm/hook/hook.go#newcode38
charm/hook/hook.go:38: )
On 2013/02/14 14:17:04, fwereade wrote:
> A couple of const slices of UnitHooks and RelationHooks -- that can be used by
> the putative Meta method such that we can add hooks to this file and have them
> handled correctly -- would be nice.

Done.

https://codereview.appspot.com/7303091/diff/1/charm/hook/hook.go#newcode60
charm/hook/hook.go:60: type Info struct {
On 2013/02/14 14:17:04, fwereade wrote:
> This should stay in worker/uniter/hook; it's only relevant to the uniter.

Done.

https://codereview.appspot.com/7303091/diff/1/charm/hook/hook.go#newcode95
charm/hook/hook.go:95: 
On 2013/02/14 14:17:04, fwereade wrote:
> As discussed online, we don't (at the moment...) want anything from here down;
> we just want a method on Meta to tell us what hooks might be valid, and check
> files against its result in BundleTo/ExpandTo to know whether we should pay
> attention to the executable bits.

Done.

https://codereview.appspot.com/7303091/diff/1/worker/uniter/relation/hookqueu...
File worker/uniter/relation/hookqueue.go (left):

https://codereview.appspot.com/7303091/diff/1/worker/uniter/relation/hookqueu...
worker/uniter/relation/hookqueue.go:6:
"launchpad.net/juju-core/worker/uniter/hook"
On 2013/02/14 14:17:04, fwereade wrote:
> Having the constants in one and Info in the other will ugly up the code here
and
> elsewhere in the uniter -- maybe import them as hook.Install vs uhook.Info, or
> something? I don't think this infelicity overrides the value of keeping them
> separate.

Done.
Sign in to reply to this message.

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