Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rephrase error message when agent versions != client version. #7911

Merged
merged 3 commits into from Oct 5, 2017

Conversation

anastasiamac
Copy link
Contributor

@anastasiamac anastasiamac commented Oct 5, 2017

Description of change

When bootstrapping controllers with agent version that is different from client version, we'd get a fairly obscure message:

$ juju bootstrap aws mycontroller --agent-version=2.2.3
ERROR requested agent version major.minor mismatch

To avoid surprises and headaches, this PR proposes to re-phrase this message in a user-friendly way:

$ juju bootstrap aws mycontroller --agent-version=2.2.3
ERROR this client can only bootstrap 2.3 agents

QA steps

As per description above.

Documentation changes

n/a

Bug reference

n/a

@@ -236,7 +236,7 @@ func (c *bootstrapCommand) Init(args []string) (err error) {
}
}
if c.AgentVersion != nil && (c.AgentVersion.Major != jujuversion.Current.Major || c.AgentVersion.Minor != jujuversion.Current.Minor) {
return errors.New("requested agent version major.minor mismatch")
return errors.Errorf("this client can only bootstrap %v.%v+ agents", jujuversion.Current.Major, jujuversion.Current.Minor)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a thought
2.3+ could imply anything greater than 2.3, eg 2.4
How about
2.3.x

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I thought of that but then about about beta versions and such? they take form of, say 2.3-b3...

Maybe just drop suffix altogether? so "...can only bootstrap 2.3 agents"?

@anastasiamac
Copy link
Contributor Author

$$merge$$

@jujubot
Copy link
Collaborator

jujubot commented Oct 5, 2017

Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju

@jujubot jujubot merged commit 4605eb2 into juju:develop Oct 5, 2017
@anastasiamac anastasiamac deleted the clarify-err-msg branch October 5, 2017 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants