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

Issue 5882056: Accept nodes with missing constraints

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by fwereade
Modified:
12 years, 1 month ago
Reviewers:
mp+98998
Visibility:
Public.

Description

Accept nodes with missing constraints Entities which are expected to have constraints data will generate empty constraints when queried; empty constraints are now comparable (can_satisfy no longer raises) but can never satisfy or be satisfied. Consequence: machines deployed pre-constraints will never be reused by a unit with constraints. Can't imagine a solution which doesn't have this problem; machines' pre-constraints constraints are basically unknowable without development of additional features. https://code.launchpad.net/~fwereade/juju/accept-missing-constraints/+merge/98998 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 1

Patch Set 2 : Accept nodes with missing constraints #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -20 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M juju/machine/constraints.py View 1 2 chunks +5 lines, -2 lines 0 comments Download
M juju/machine/tests/test_constraints.py View 1 5 chunks +17 lines, -11 lines 0 comments Download
M juju/state/machine.py View 2 chunks +1 line, -2 lines 0 comments Download
M juju/state/service.py View 2 chunks +2 lines, -2 lines 0 comments Download
M juju/state/tests/test_machine.py View 2 chunks +14 lines, -0 lines 0 comments Download
M juju/state/tests/test_service.py View 1 5 chunks +42 lines, -3 lines 0 comments Download

Messages

Total messages: 3
fwereade
Please take a look.
12 years, 2 months ago (2012-03-23 10:39:36 UTC) #1
hazmat
LGTM, the approach taken seems both expedient and low risk. minor style diff http://paste.ubuntu.com/899252/ https://codereview.appspot.com/5882056/diff/1/juju/machine/constraints.py ...
12 years, 1 month ago (2012-03-25 15:35:54 UTC) #2
fwereade
12 years, 1 month ago (2012-03-26 08:57:20 UTC) #3
*** Submitted:

Accept nodes with missing constraints

Entities which are expected to have constraints data will generate empty
constraints when queried; empty constraints are now comparable (can_satisfy
no longer raises) but can never satisfy or be satisfied.

Consequence: machines deployed pre-constraints will never be reused by a
unit with constraints. Can't imagine a solution which doesn't have this
problem; machines' pre-constraints constraints are basically unknowable
without development of additional features.

R=hazmat
CC=
https://codereview.appspot.com/5882056
Sign in to reply to this message.

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