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

Issue 6501106: environs: remove VarDir global

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by rog
Modified:
11 years, 7 months ago
Reviewers:
mp+123316
Visibility:
Public.

Description

environs: remove VarDir global This makes it much easier to make the environs functions work on hypothetical remote machines, for example. Also rename VarDir to DataDir throughout. https://code.launchpad.net/~rogpeppe/juju-core/055-no-global-vardir/+merge/123316 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : environs: remove VarDir global #

Total comments: 19

Patch Set 3 : environs: remove VarDir global #

Patch Set 4 : environs: remove VarDir global #

Total comments: 2

Patch Set 5 : environs: remove VarDir global #

Patch Set 6 : environs: remove VarDir global #

Patch Set 7 : environs: remove VarDir global #

Total comments: 5

Patch Set 8 : environs: remove VarDir global #

Patch Set 9 : environs: remove VarDir global #

Patch Set 10 : environs: remove VarDir global #

Unified diffs Side-by-side diffs Delta from patch set Stats (+275 lines, -274 lines) Patch
A [revision details] View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/cmd_test.go View 1 chunk +1 line, -7 lines 0 comments Download
M cmd/jujud/agent.go View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -5 lines 0 comments Download
M cmd/jujud/machine.go View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M cmd/jujud/machine_test.go View 1 2 3 4 5 3 chunks +2 lines, -3 lines 0 comments Download
M cmd/jujud/provisioning_test.go View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujud/unit.go View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujud/unit_test.go View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -5 lines 0 comments Download
M cmd/jujud/upgrade.go View 1 2 3 4 5 5 chunks +6 lines, -4 lines 0 comments Download
M cmd/jujud/upgrade_test.go View 1 2 3 4 7 chunks +8 lines, -19 lines 0 comments Download
M cmd/jujud/util_test.go View 1 2 3 4 5 6 7 8 9 3 chunks +4 lines, -5 lines 0 comments Download
M container/container.go View 1 2 3 4 5 6 7 3 chunks +31 lines, -39 lines 0 comments Download
M container/container_test.go View 1 2 3 4 5 6 7 4 chunks +19 lines, -20 lines 0 comments Download
D container/export_test.go View 1 chunk +0 lines, -3 lines 0 comments Download
M environs/cloudinit/cloudinit.go View 1 2 3 4 5 6 7 8 9 5 chunks +20 lines, -5 lines 0 comments Download
M environs/cloudinit/cloudinit_test.go View 1 2 3 4 5 6 chunks +10 lines, -4 lines 0 comments Download
M environs/ec2/ec2.go View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M environs/tools.go View 1 2 3 4 7 chunks +26 lines, -29 lines 0 comments Download
M environs/tools_test.go View 1 2 3 4 11 chunks +35 lines, -38 lines 0 comments Download
M juju/testing/conn.go View 1 2 3 4 5 6 7 8 9 3 chunks +29 lines, -21 lines 0 comments Download
A worker/machiner/export_test.go View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
M worker/machiner/machiner.go View 1 2 3 4 5 6 7 8 9 2 chunks +13 lines, -6 lines 0 comments Download
M worker/machiner/machiner_test.go View 1 2 3 4 5 6 7 3 chunks +5 lines, -9 lines 0 comments Download
M worker/uniter/tools.go View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M worker/uniter/tools_test.go View 1 2 3 4 5 chunks +11 lines, -17 lines 0 comments Download
M worker/uniter/uniter.go View 1 2 3 4 3 chunks +6 lines, -7 lines 0 comments Download
M worker/uniter/uniter_test.go View 1 2 3 4 5 8 chunks +20 lines, -20 lines 0 comments Download

Messages

Total messages: 18
rog
Please take a look.
11 years, 7 months ago (2012-09-07 16:40:49 UTC) #1
fwereade
Lots to like here, but a few things I'm -1 on. https://codereview.appspot.com/6501106/diff/1001/cmd/jujud/agent.go File cmd/jujud/agent.go (right): ...
11 years, 7 months ago (2012-09-10 06:58:29 UTC) #2
rog
https://codereview.appspot.com/6501106/diff/1001/cmd/jujud/agent.go File cmd/jujud/agent.go (right): https://codereview.appspot.com/6501106/diff/1001/cmd/jujud/agent.go#newcode51 cmd/jujud/agent.go:51: VarDir string On 2012/09/10 06:58:30, fwereade wrote: > IMO ...
11 years, 7 months ago (2012-09-10 19:53:09 UTC) #3
niemeyer
Glad to see the global going away. LGTM considering the following and William's concerns on ...
11 years, 7 months ago (2012-09-11 18:35:20 UTC) #4
niemeyer
Putting it back to WIP, pending mainly the changes from William's review, and consensus around ...
11 years, 7 months ago (2012-09-11 20:13:01 UTC) #5
rog
https://codereview.appspot.com/6501106/diff/1001/juju/testing/conn.go File juju/testing/conn.go (right): https://codereview.appspot.com/6501106/diff/1001/juju/testing/conn.go#newcode22 juju/testing/conn.go:22: // mirroring the intended juju directory structure, including On ...
11 years, 7 months ago (2012-09-12 13:54:06 UTC) #6
rog
Please take a look.
11 years, 7 months ago (2012-09-12 13:54:35 UTC) #7
fwereade
On 2012/09/11 20:13:01, niemeyer wrote: > Putting it back to WIP, pending mainly the changes ...
11 years, 7 months ago (2012-09-12 13:58:20 UTC) #8
niemeyer
On 2012/09/12 13:58:20, fwereade wrote: > On 2012/09/11 20:13:01, niemeyer wrote: > > Putting it ...
11 years, 7 months ago (2012-09-12 14:11:50 UTC) #9
niemeyer
For the record, consensus was reached on DataDir over IRC.
11 years, 7 months ago (2012-09-12 14:25:56 UTC) #10
fwereade
On 2012/09/12 14:11:50, niemeyer wrote: > On 2012/09/12 13:58:20, fwereade wrote: > > I'd be ...
11 years, 7 months ago (2012-09-12 14:35:28 UTC) #11
fwereade
https://codereview.appspot.com/6501106/diff/5004/container/container.go File container/container.go (right): https://codereview.appspot.com/6501106/diff/5004/container/container.go#newcode19 container/container.go:19: // be used. Apropos of not-very-much, how would you ...
11 years, 7 months ago (2012-09-12 15:17:26 UTC) #12
rog
Please take a look.
11 years, 7 months ago (2012-09-12 15:22:30 UTC) #13
fwereade
LGTM, thanks https://codereview.appspot.com/6501106/diff/9009/container/container_test.go File container/container_test.go (right): https://codereview.appspot.com/6501106/diff/9009/container/container_test.go#newcode29 container/container_test.go:29: toolsDir := environs.AgentToolsDir(dataDir, "unit-0") Can we make ...
11 years, 7 months ago (2012-09-12 15:30:42 UTC) #14
niemeyer
https://codereview.appspot.com/6501106/diff/9009/cmd/jujud/agent.go File cmd/jujud/agent.go (right): https://codereview.appspot.com/6501106/diff/9009/cmd/jujud/agent.go#newcode57 cmd/jujud/agent.go:57: f.StringVar(&c.DataDir, "data-directory", "/var/lib/juju", "directory for juju data") Since we're ...
11 years, 7 months ago (2012-09-12 15:41:29 UTC) #15
rog
Please take a look. https://codereview.appspot.com/6501106/diff/1001/worker/machiner/machiner.go File worker/machiner/machiner.go (right): https://codereview.appspot.com/6501106/diff/1001/worker/machiner/machiner.go#newcode28 worker/machiner/machiner.go:28: container container.Container On 2012/09/11 18:35:21, ...
11 years, 7 months ago (2012-09-12 16:46:17 UTC) #16
niemeyer
LGTM with the suggested use of --data-dir that was uncovered in the previous review.
11 years, 7 months ago (2012-09-12 16:51:55 UTC) #17
rog
11 years, 7 months ago (2012-09-12 17:35:36 UTC) #18
*** Submitted:

environs: remove VarDir global

This makes it much easier to make the environs functions
work on hypothetical remote machines, for example.

Also rename VarDir to DataDir throughout.

R=fwereade, niemeyer
CC=
https://codereview.appspot.com/6501106
Sign in to reply to this message.

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