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

Issue 6297101: Usable, if incomplete, deploy command

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 10 months ago by fwereade
Modified:
11 years, 10 months ago
Reviewers:
mp+111068, niemeyer
Visibility:
Public.

Description

Usable, if incomplete, deploy command Notable missing bits are: * --config (which depends on us implementing charm format 2, and some other state stuff that hasn't yet been done; attempts to use --config will currently panic) * --constraints (which aren't implemented at all; we can't parse them, and don't even expose a --constraints flag) Please note that the charm store is not tested here. This is because the actual charm store URL is hidden away inside the state package and (AIUI) explicitly not intended to be changed or even changeable, leaving no route that allows me to test it directly without either hitting the real charm store in unit tests, or messing with /etc/hosts... either of which would be a Bad Thing. I submit that InferRepository is sufficiently well-tested within the charm package, and so is the charm store; and that to write direct tests for deploying charm store charms at this level is not necessary, because the behavior with local URLs is sufficiently consistent with usage of InferRepository that we can still have a high level of confidence in the operation of the command as a whole. (For example, we verify that charm bundles are not upgradeable; the source of the bundles should therefore not be relevant). When we have enough in place that we can have functional tests, we should certainly verify the behaviour against the actual charm store. https://code.launchpad.net/~fwereade/juju-core/usable-deploy-command/+merge/111068 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Usable, if incomplete, deploy command #

Total comments: 26

Patch Set 3 : Usable, if incomplete, deploy command #

Total comments: 2

Patch Set 4 : Usable, if incomplete, deploy command #

Unified diffs Side-by-side diffs Delta from patch set Stats (+381 lines, -29 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/cmd_test.go View 1 2 3 chunks +26 lines, -15 lines 0 comments Download
M cmd/juju/deploy.go View 1 2 3 3 chunks +153 lines, -11 lines 0 comments Download
A cmd/juju/deploy_test.go View 1 2 1 chunk +189 lines, -0 lines 0 comments Download
M cmd/juju/main_test.go View 1 2 2 chunks +11 lines, -3 lines 0 comments Download

Messages

Total messages: 5
fwereade
Please take a look.
11 years, 10 months ago (2012-06-20 08:52:22 UTC) #1
niemeyer
This is an awesome bootstrap. Besides the comments below, though, there's a detail to sort ...
11 years, 10 months ago (2012-06-25 23:19:22 UTC) #2
fwereade
Please take a look. https://codereview.appspot.com/6297101/diff/2001/cmd/juju/cmd_test.go File cmd/juju/cmd_test.go (right): https://codereview.appspot.com/6297101/diff/2001/cmd/juju/cmd_test.go#newcode16 cmd/juju/cmd_test.go:16: type envFixture struct { On ...
11 years, 10 months ago (2012-06-26 10:10:43 UTC) #3
niemeyer
LGTM https://codereview.appspot.com/6297101/diff/2001/cmd/juju/deploy.go File cmd/juju/deploy.go (right): https://codereview.appspot.com/6297101/diff/2001/cmd/juju/deploy.go#newcode121 cmd/juju/deploy.go:121: // TODO get default series from environ On ...
11 years, 10 months ago (2012-06-26 23:54:57 UTC) #4
fwereade
11 years, 10 months ago (2012-06-27 08:10:41 UTC) #5
*** Submitted:

Usable, if incomplete, deploy command

Notable missing bits are:

* --config (which depends on us implementing charm format 2, and some other
  state stuff that hasn't yet been done; attempts to use --config will
  currently panic)
* --constraints (which aren't implemented at all; we can't parse them,
  and don't even expose a --constraints flag)

Please note that the charm store is not tested here. This is because the
actual charm store URL is hidden away inside the state package and (AIUI)
explicitly not intended to be changed or even changeable, leaving no route
that allows me to test it directly without either hitting the real charm
store in unit tests, or messing with /etc/hosts... either of which would be
a Bad Thing.

I submit that InferRepository is sufficiently well-tested within the charm
package, and so is the charm store; and that to write direct tests for
deploying charm store charms at this level is not necessary, because the
behavior with local URLs is sufficiently consistent with usage of
InferRepository that we can still have a high level of confidence in the
operation of the command as a whole. (For example, we verify that charm
bundles are not upgradeable; the source of the bundles should therefore not
be relevant).

When we have enough in place that we can have functional tests, we should
certainly verify the behaviour against the actual charm store.

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

https://codereview.appspot.com/6297101/diff/8001/cmd/juju/deploy.go
File cmd/juju/deploy.go (right):

https://codereview.appspot.com/6297101/diff/8001/cmd/juju/deploy.go#newcode87
cmd/juju/deploy.go:87: // If --upgrade is specified, the charm must be a local
directory , and will
On 2012/06/26 23:54:57, niemeyer wrote:
> s/ , /, /

Done.
Sign in to reply to this message.

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