Merge lp:~fwereade/juju-core/errors-cleanup into lp:~juju/juju-core/trunk
Status: | Rejected |
---|---|
Rejected by: | William Reade |
Proposed branch: | lp:~fwereade/juju-core/errors-cleanup |
Merge into: | lp:~juju/juju-core/trunk |
Diff against target: |
821 lines (+214/-133) 22 files modified
charm/repo.go (+8/-15) charm/repo_test.go (+25/-16) cmd/juju/deploy_test.go (+1/-1) cmd/juju/publish.go (+8/-6) cmd/juju/upgradecharm_test.go (+7/-6) cmd/jujud/agent_test.go (+11/-10) cmd/jujud/bootstrap_test.go (+6/-6) environs/dummy/storage.go (+1/-1) environs/ec2/storage.go (+1/-1) environs/imagemetadata/simplestreams.go (+5/-5) environs/local/storage.go (+1/-1) environs/maas/storage.go (+2/-2) environs/openstack/storage.go (+1/-1) environs/tools.go (+1/-1) environs/tools_test.go (+4/-4) errors/errors.go (+42/-40) errors/errors_test.go (+74/-0) state/apiserver/client_test.go (+1/-1) state/apiserver/errors_test.go (+2/-2) state/open.go (+8/-4) state/state_test.go (+0/-7) testing/charm.go (+5/-3) |
To merge this branch: | bzr merge lp:~fwereade/juju-core/errors-cleanup |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Penhey (community) | Approve | ||
Review via email: mp+168928@code.launchpad.net |
Description of the change
errors: tests, consistency
We weren't testing or making sensible use of the embedded errors in
NotFoundError and UnauthorizedError; we were doing inappropriate things
with both error types in various situations; the action of NotFoundf was
not consistent with Unauthorizedf.
These conditions no longer apply; and the various charm.Repository types in
play now produce errors.
I'm also more than somewhat freaked out by the "auth fails" magic string.
Can anyone explain that?
Unmerged revisions
- 1268. By William Reade
-
mock charm store now uses errors.
NotFoundError - 1267. By William Reade
-
merge parent
- 1266. By William Reade
-
make errors somewhat consistent
- 1265. By William Reade
-
merge parent
- 1264. By William Reade
-
trivial error message fix (but notice how little it's tested for...)
- 1263. By William Reade
-
rewrite charm.Config for clarity, adding currently-unused ParseSettingsYAML method and new Settings type
- 1262. By Ian Booth
-
Move assignment policy to global env config
Previoysly, each provider defined it's own AssignmentPolicy,
which was hard coded to AssignNew. Now, it's been made an
env setting with default AssignNew. With containers, it will be
possible to add a unit to an existing machine (if not dirty) so
this work is a step in that direction.R=jameinel, fwereade
CC=
https://codereview. appspot. com/9824043 - 1261. By Ian Booth
-
Add dirty flag to machine state
When choosing an unused machine to assign a unit to, a check was being made
to see if there were any principal units for the machine. If machines had units
assigned and then unassigned, the machine would appear clean since number of
principal unit goes to 0 but the machine should still be considered dirty.The machine state has a "clean" flag (boolean). Machines are created with the
clean flag set to true. It is set false when a machine has a unit assigned,
and not reset when units are unassigned. The assign to unused machine logic
is updated to look at the clean flag.R=fwereade, thumper
CC=
https://codereview. appspot. com/9820043 - 1260. By Tim Penhey
-
First part of the provisioner refactoring.
This branch breaks up the current provisioner and defines some interfaces that
we'll be using for containers.The broker interface is what we have starting, stopping instances, and listing
instances and related machines.An environment broker is written that defers the actual calls to the environ.
The provisioner now creates a provisioning task for the environment provider
using a machine watcher and the environment broker. The common provisioning
methods are now in provisioner_task.go. I refactored some of the methods as we were duplicating a lot of calls, like
get all instances, and then getting instances for individual ids. Also,
looking up specific machines, and also getting all machines. Now we just do
the "all" gets, and keep a map around for the duration of the checks.R=wallyworld, mue, fwereade, rog
CC=
https://codereview. appspot. com/9937046 - 1259. By Frank Mueller
-
state: added CleanupWatcher
The CleanupWatcher signals the demand for the running of
state.Cleanup(). It is the first in a row of CLs to add
an according worker.R=fwereade, dimitern
CC=
https://codereview. appspot. com/10078043
Reviewers: mp+168928_ code.launchpad. net,
Message:
Please take a look.
Description:
errors: tests, consistency
We weren't testing or making sensible use of the embedded errors in
NotFoundError and UnauthorizedError; we were doing inappropriate things
with both error types in various situations; the action of NotFoundf was
not consistent with Unauthorizedf.
These conditions no longer apply; and the various charm.Repository types NotFoundError instead of charm.NotFoundE rror.
in
play now produce errors.
I'm also more than somewhat freaked out by the "auth fails" magic
string.
Can anyone explain that?
https:/ /code.launchpad .net/~fwereade/ juju-core/ errors- cleanup/ +merge/ 168928
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/9830049/
Affected files: deploy_ test.go upgradecharm_ test.go agent_test. go bootstrap_ test.go dummy/storage. go ec2/storage. go imagemetadata/ simplestreams. go local/storage. go maas/storage. go openstack/ storage. go tools_test. go errors_ test.go /client_ test.go /errors_ test.go
A [revision details]
M charm/repo.go
M charm/repo_test.go
M cmd/juju/
M cmd/juju/publish.go
M cmd/juju/
M cmd/jujud/
M cmd/jujud/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/tools.go
M environs/
M errors/errors.go
A errors/
M state/apiserver
M state/apiserver
M state/open.go
M state/state_test.go
M testing/charm.go