Remove deprecated streams directory #6441

Merged
merged 1 commit into from Oct 12, 2016

Conversation

Projects
None yet
4 participants
Contributor

kat-co commented Oct 12, 2016

This addresses lp:1613858.

When running juju metadata generate-tools, Juju would attempt to look in a deprecated path "releases" for tools to generate streams. If you specified a value in the --stream flag (e.g. "devel"), Juju would work correctly. This was because we set this flag to the 1.x default of "releases" (notice: not "released").

This patch sets the default of the stream flag to envtools.ReleasedStream to give some transparancy to the user and follow a more common idiom. This also fixes the bug.

I also added some errors.Trace around error paths in the functions I touched.

mjs approved these changes Oct 12, 2016

LGTM. Just some improvements to the help text.

@@ -61,21 +62,16 @@ use the --clean option.
Examples:
- generate metadata for "released" tools, looking in the "releases" directory:
@mjs

mjs Oct 12, 2016

Contributor

Pretty sure this shouldn't said "releases" now. Can the default value (envtools.ReleasedStream) be substituted in?

@kat-co

kat-co Oct 12, 2016

Contributor

Fixed

@@ -61,21 +62,16 @@ use the --clean option.
Examples:
- generate metadata for "released" tools, looking in the "releases" directory:
-
- juju metadata generate-tools -d <workingdir>
+ juju metadata generate-tools -d <workingdir>
- generate metadata for "released" tools, looking in the "released" directory:
@mjs

mjs Oct 12, 2016

Contributor

Not your change I know but can we get rid of the word "directory" in these examples. It's confusing.

It would be enough to just say:

- generate metadata for "released" tools

Also, in other help examples, the comments tend to start with #. Can you please make this consistent while you're in here?

@kat-co

kat-co Oct 12, 2016

Contributor

Fixed

mjs approved these changes Oct 12, 2016

+ - generate metadata for "proposed":
@mjs

mjs Oct 12, 2016

Contributor

this has lost the explanation of --clean

Contributor

kat-co commented Oct 12, 2016

$$merge$$

Contributor

jujubot commented Oct 12, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Oct 12, 2016

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/9498

Owner

mitechie commented Oct 12, 2016

$$merge$$ somehow go wasn't installed for the test run.

Contributor

jujubot commented Oct 12, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Remove deprecated streams directory
This addresses lp:1613858.

When running `juju metadata generate-tools`, Juju would attempt to look in a deprecated path "releases" for tools to generate streams. If you specified a value in the `--stream` flag (e.g. "devel"), Juju would work correctly. This was because we set this flag to the 1.x default of "releases" (notice: not "released").

This patch sets the default of the `stream` flag to envtools.ReleasedStream to give some transparancy to the user and follow a more common idiom. This also fixes the bug.

I also added some `errors.Trace` around error paths in the functions I touched.
Contributor

jujubot commented Oct 12, 2016

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/9499

Contributor

kat-co commented Oct 12, 2016

Actual fix.

$$merge$$

Contributor

jujubot commented Oct 12, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 4410306 into juju:master Oct 12, 2016

@kat-co kat-co deleted the kat-co:fixes-1613858-metadata-generate branch Oct 12, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment