Merge lp:~themue/juju-core/go-state-first-error-improvement into lp:~juju/juju-core/trunk
Status: | Rejected |
---|---|
Rejected by: | Gustavo Niemeyer |
Proposed branch: | lp:~themue/juju-core/go-state-first-error-improvement |
Merge into: | lp:~juju/juju-core/trunk |
Diff against target: |
812 lines (+163/-110) 10 files modified
state/internal_test.go (+10/-10) state/machine.go (+2/-2) state/relation.go (+19/-1) state/service.go (+4/-4) state/state.go (+8/-11) state/state_test.go (+4/-4) state/topology.go (+43/-54) state/unit.go (+17/-12) state/util.go (+55/-11) state/watcher_test.go (+1/-1) |
To merge this branch: | bzr merge lp:~themue/juju-core/go-state-first-error-improvement |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
The Go Language Gophers | Pending | ||
Review via email: mp+109641@code.launchpad.net |
Description of the change
state: First step of error handling improvement
Error handling in state will be improved to use the new type
StateError containing a describing code, the message and if
wanted a wrapped error. The returned error string depends on
the error code, low-level errors will be covered have to be
retrieved on demand.
ATTENTION: This is a first proposal to discuss this kind of
error wrapping. So not all errors are handled proper.
Unmerged revisions
- 214. By Frank Mueller
-
state: First proposal for an improvement of the error handling in state.
- 213. By Roger Peppe
-
state: store units inside their respective services
Making this change simplifies a lot of code - no need
to keep a separate sequence numbering system for units,
for example.(original proposal at https:/
/codereview. appspot. com/6247066/) - 212. By Gustavo Niemeyer
-
.lbox: update to juju-core
- 211. By Gustavo Niemeyer
-
Translated all paths to use the juju-core project in Launchpad.
- 210. By Frank Mueller
-
state: Changed relation service mapping in topology.
The first approach mapped roles to service key and relation
name opposite to todays Python implementation. This reduces
the flexibility for future purposes (e.g. multiple peers).
So the mapping has now been changed back from service keys
to relation role and name. - 209. By Gustavo Niemeyer
-
state: rename Environment method to EnvironConfig
R=TheMue, fwereade
CC=
https://codereview. appspot. com/6295048 - 208. By William Reade
-
subordinate service units can now be added to principal service units
This entails the following changes:
* new Service.
AddUnitSubordin ateTo method, which requires a principal unit
* topology.AddUnit now takes an additional principalKey string argument,
which will be empty for a principal unit;
* new topology.UnitPrincipalKe y, which returns the principal unit key for a
subordinate unit or an error for a principal unit;
* new Unit.IsPrincipal method, which returns whether the unit is a principal
unit;
* checks to prevent subordinate units being assigned directly to machines.Most of the diff lines are a result of the change to topology.AddUnit;
sorry for the noise.R=TheMue, niemeyer
CC=
https://codereview. appspot. com/6268050 - 207. By Frank Mueller
-
state: Added the method RemoveRelation() to State.
Relation is now an interface defining the single
method relationKey() to allow a function signature
like today in Python. The implementation is now
named relation and can be accessed via type
assertion.R=niemeyer
CC=
https://codereview. appspot. com/6250076 - 206. By William Reade
-
trivial: fix inconsistency in deploy command documentation
- 205. By William Reade
-
add AssignmentPolicy to Environ
This is very likely to migrate to a Settings type at some stage, but I don't
think that's justified yet.R=niemeyer
CC=
https://codereview. appspot. com/6259062
This branch doesn't seem to be addressing the actual issues we have, and
instead introduces some further logic in the state package which we
don't benefit from.
Frank and I brainstormed on it privately, and the conversation was
mailed to juju-dev@. I'm closing this as another branch is coming.
https:/ /codereview. appspot. com/6306067/