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

Issue 6564054: state: make Refresh return NotFoundError

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by rog
Modified:
11 years, 6 months ago
Reviewers:
mp+126452
Visibility:
Public.

Description

state: make Refresh return NotFoundError Make Refresh return NotFoundError when the entity being refreshed has been deleted. https://code.launchpad.net/~rogpeppe/juju-core/087-refresh-not-found/+merge/126452 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : state: make Refresh return NotFoundError #

Total comments: 12

Patch Set 3 : state: make Refresh return NotFoundError #

Patch Set 4 : state: make Refresh return NotFoundError #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -3 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M state/charm_test.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M state/machine.go View 1 2 chunks +6 lines, -0 lines 0 comments Download
M state/machine_test.go View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M state/relation.go View 1 3 chunks +7 lines, -0 lines 0 comments Download
M state/relation_test.go View 1 2 1 chunk +25 lines, -0 lines 0 comments Download
M state/service.go View 1 2 3 1 chunk +6 lines, -1 line 0 comments Download
M state/service_test.go View 1 2 2 chunks +8 lines, -1 line 0 comments Download
M state/unit.go View 1 2 chunks +6 lines, -0 lines 0 comments Download
M state/unit_test.go View 1 2 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 4
rog
Please take a look.
11 years, 6 months ago (2012-09-26 13:32:30 UTC) #1
rog
Please take a look.
11 years, 6 months ago (2012-09-26 13:43:47 UTC) #2
niemeyer
Good catch. LGTM with the trivials: https://codereview.appspot.com/6564054/diff/3001/state/machine_test.go File state/machine_test.go (right): https://codereview.appspot.com/6564054/diff/3001/state/machine_test.go#newcode160 state/machine_test.go:160: c.Assert(err, FitsTypeOf, &state.NotFoundError{}) ...
11 years, 6 months ago (2012-09-26 14:10:10 UTC) #3
rog
11 years, 6 months ago (2012-09-26 14:21:56 UTC) #4
*** Submitted:

state: make Refresh return NotFoundError

Make Refresh return NotFoundError when the entity being
refreshed has been deleted.

R=niemeyer
CC=
https://codereview.appspot.com/6564054

https://codereview.appspot.com/6564054/diff/3001/state/machine_test.go
File state/machine_test.go (right):

https://codereview.appspot.com/6564054/diff/3001/state/machine_test.go#newcod...
state/machine_test.go:160: c.Assert(err, FitsTypeOf, &state.NotFoundError{})
On 2012/09/26 14:10:10, niemeyer wrote:
> c.Assert(state.IsNotFound(err), Equals, true)

Done.

https://codereview.appspot.com/6564054/diff/3001/state/relation.go
File state/relation.go (right):

https://codereview.appspot.com/6564054/diff/3001/state/relation.go#newcode109
state/relation.go:109: return notFound("relation %v", r)
On 2012/09/26 14:10:10, niemeyer wrote:
> s/%v/%q/

Done.

https://codereview.appspot.com/6564054/diff/3001/state/relation_test.go
File state/relation_test.go (right):

https://codereview.appspot.com/6564054/diff/3001/state/relation_test.go#newco...
state/relation_test.go:145: c.Assert(err, FitsTypeOf, &state.NotFoundError{})
On 2012/09/26 14:10:10, niemeyer wrote:
> c.Assert(state.IsNotFound(err), Equals, true)

Done.

https://codereview.appspot.com/6564054/diff/3001/state/service.go
File state/service.go (right):

https://codereview.appspot.com/6564054/diff/3001/state/service.go#newcode144
state/service.go:144: return notFound("service %v", s)
On 2012/09/26 14:10:10, niemeyer wrote:
> s/%v/%q/

Done.

https://codereview.appspot.com/6564054/diff/3001/state/service_test.go
File state/service_test.go (right):

https://codereview.appspot.com/6564054/diff/3001/state/service_test.go#newcode71
state/service_test.go:71: c.Assert(err, FitsTypeOf, &state.NotFoundError{})
On 2012/09/26 14:10:10, niemeyer wrote:
> c.Assert(state.IsNotFound(err), Equals, true)

Done.

https://codereview.appspot.com/6564054/diff/3001/state/unit_test.go
File state/unit_test.go (right):

https://codereview.appspot.com/6564054/diff/3001/state/unit_test.go#newcode82
state/unit_test.go:82: c.Assert(err, FitsTypeOf, &state.NotFoundError{})
On 2012/09/26 14:10:10, niemeyer wrote:
> c.Assert(state.IsNotFound(err), Equals, true)

Done.
Sign in to reply to this message.

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