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

Record official build number as separate variable #11071

Merged
merged 1 commit into from Jan 7, 2020

Conversation

wallyworld
Copy link
Member

@wallyworld wallyworld commented Jan 6, 2020

Description of change

We are adding the Jenkins build number to version.Current for beta/rc builds. This conflicts with the original intent of the Build attribute, which was to track non-official juju builds. And we were incorrectly zeroing out the Build value when making the SharedToolsDir (where the agents are unpacked to), which screws upgrades and causes other unitended issues.

This PR reverts the version.Build semantics to what it was originally, and introduces a new OfficialBuild variable to the juju/version package - this is what is set by the Jenkins build process and what is used to compute the jujud oci image path, rather than trying to overload the use of Build.

QA steps

Build a version of Juju with an "official" build number added in:
JUJU_BUILD_NUMBER=666; make install
As a developer, bootstrap a controller and ensure upgrades with --build-agent work.
Hack the official version yaml file to perform the test with what juju thinks is an official version.
Acceptance tests should also start passing.

Copy link
Contributor

@babbageclunk babbageclunk left a comment

Choose a reason for hiding this comment

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

Nice one!

@@ -208,90 +208,53 @@ func (t *ToolsSuite) TestReadGUIArchiveSuccess(c *gc.C) {
}

func (t *ToolsSuite) TestChangeAgentTools(c *gc.C) {
tests := []struct {
Copy link
Member Author

Choose a reason for hiding this comment

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

All this is a revert back to old 2.7 behaviour

@wallyworld
Copy link
Member Author

@wallyworld wallyworld changed the title Exclude build number from reported current version if wanted version is official Record official build number as separate variable Jan 7, 2020
@wallyworld
Copy link
Member Author

$$merge$$

@jujubot jujubot merged commit ac72f67 into juju:develop Jan 7, 2020
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