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

Make version generation consistent across build targets #3497

Merged
merged 1 commit into from
Dec 1, 2022

Conversation

fierlion
Copy link
Member

@fierlion fierlion commented Nov 29, 2022

Summary

Update each of the build processes to use the build-time version rather than the existing version. Also removing the * in our path, but not from the human-readable string.

Implementation details

Update build-integrated to use the buildroot for version file update; update each make target/script/spec file to use the version_gen=true path in build-integrated.

also note that this reverts a workaround in our builds 6e8c9a5

Testing

Tested on AL2 instance
Added a fresh commit then built for each of the following targets to be sure I was picking up the latest:

make dockerfree-agent-image
make generic-rpm-integrated
make amazon-linux-rpm-integrated

also checked that make generic-deb-integrated works, as it calls make dockerfree-agent-image to build the agent.
And also note that I tested the koji-built agent and it is consistent already so no work required there:
https://github.com/aws/amazon-ecs-agent/releases/tag/v1.66.2 <- 06008fa
in the koji-built agent:

"Version": "Amazon ECS Agent - v1.66.2 (06008fa1)"

New tests cover the changes: no

Description for the changelog

Fix agent short hash version bug

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@fierlion fierlion requested a review from a team as a code owner November 29, 2022 22:35
@fierlion fierlion changed the title use versiongen in agent build Make version generation consistent across build targets Nov 29, 2022
@@ -381,7 +381,7 @@ amazon-linux-sources.tgz:

.amazon-linux-rpm-integrated-done: amazon-linux-sources.tgz
test -e SOURCES || ln -s . SOURCES
rpmbuild --define "%_topdir $(PWD)" -bb ecs-init.spec
rpmbuild --define "%_topdir $(PWD)" -bb ecs-agent.spec
Copy link
Contributor

Choose a reason for hiding this comment

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

how was this working before if ecs-init.spec doesn't exist?

Copy link
Member Author

@fierlion fierlion Nov 30, 2022

Choose a reason for hiding this comment

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

actually that's a good point -- this was working because koji doesn't actually use this Makefile so this target is more a reference to approximate what koji builds rather than the mechanism koji uses to build.

@fierlion fierlion merged commit d49ed88 into aws:dev Dec 1, 2022
@fierlion fierlion deleted the fierlion/unifyShortHash branch December 1, 2022 00:10
@YashdalfTheGray YashdalfTheGray mentioned this pull request Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants