move from state.D to bson.D
Bug #1217868 reported by
John A Meinel
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
Low
|
Bodie Solomon |
Bug Description
At the moment state has a local type definition of:
// TODO(niemeyer): This must not be exported.
type D []bson.DocElem
And then our code has lines of:
Update: D{{"$set", newConstraintsD
However for people not very familiar with it, the D object is not obvious and is a little bit hard to figure out its definition.
the labix.org/
Update: bson.D{{"$set", newConstraintsD
That helps give clarity over what this D thing might be (it clearly has to do with bson encoding) and it gives a smaller codebase to lookup the type.
Related branches
lp://staging/~binary132/juju-core/fix-bson-references
- Juju Engineering: Pending requested
-
Diff: 1815 lines (+243/-228)26 files modifiedstate/addmachine.go (+8/-7)
state/address.go (+4/-3)
state/annotator.go (+2/-1)
state/cleanup.go (+3/-3)
state/compat_test.go (+2/-1)
state/constraints.go (+2/-1)
state/container.go (+3/-2)
state/environ.go (+4/-3)
state/export_test.go (+2/-1)
state/life.go (+6/-5)
state/life_test.go (+3/-2)
state/machine.go (+23/-22)
state/machine_test.go (+7/-6)
state/minimumunits.go (+5/-4)
state/open.go (+3/-2)
state/relation.go (+14/-13)
state/relationunit.go (+7/-6)
state/sequence.go (+1/-1)
state/service.go (+40/-40)
state/settings.go (+4/-3)
state/state.go (+29/-32)
state/state_test.go (+3/-5)
state/status.go (+2/-1)
state/unit.go (+48/-48)
state/user.go (+4/-3)
state/watcher.go (+14/-13)
tags: | added: easy |
tags: |
added: hours removed: easy |
Changed in juju-core: | |
importance: | Wishlist → Low |
Changed in juju-core: | |
assignee: | nobody → Bodie Solomon (binary132) |
status: | Triaged → Fix Committed |
milestone: | none → 1.17.7 |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
SGTM.
On Wed, Aug 28, 2013 at 10:50 PM, John A Meinel <email address hidden> wrote: oc(cons) }}, v2/mgo/ bson module already provides the D bit for us, and oc(cons) }}, /bugs.launchpad .net/bugs/ 1217868 oc(cons) }}, v2/mgo/ bson module already provides the D bit for us, oc(cons) }}, /bugs.launchpad .net/juju- core/+bug/ 1217868/ +subscriptions
> Public bug reported:
>
> At the moment state has a local type definition of:
>
> // TODO(niemeyer): This must not be exported.
> type D []bson.DocElem
>
> And then our code has lines of:
>
> Update: D{{"$set", newConstraintsD
>
> However for people not very familiar with it, the D object is not
> obvious and is a little bit hard to figure out its definition.
>
> the labix.org/
> it shouldn't be too bad to change our lines to:
>
> Update: bson.D{{"$set", newConstraintsD
>
> That helps give clarity over what this D thing might be (it clearly has
> to do with bson encoding) and it gives a smaller codebase to lookup the
> type.
>
> ** Affects: juju-core
> Importance: Wishlist
> Status: Triaged
>
>
> ** Tags: easy tech-debt
>
> ** Tags added: easy
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> Matching subscriptions: MOAR JUJU SPAM!
> https:/
>
> Title:
> move from state.D to bson.D
>
> Status in juju-core:
> Triaged
>
> Bug description:
> At the moment state has a local type definition of:
>
> // TODO(niemeyer): This must not be exported.
> type D []bson.DocElem
>
> And then our code has lines of:
>
> Update: D{{"$set", newConstraintsD
>
> However for people not very familiar with it, the D object is not
> obvious and is a little bit hard to figure out its definition.
>
> the labix.org/
> and it shouldn't be too bad to change our lines to:
>
> Update: bson.D{{"$set", newConstraintsD
>
> That helps give clarity over what this D thing might be (it clearly
> has to do with bson encoding) and it gives a smaller codebase to
> lookup the type.
>
> To manage notifications about this bug go to:
> https:/