Skip to content

Do not include timestamp for buildInfo. #840

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

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

gcoopercos
Copy link
Contributor

@gcoopercos gcoopercos commented Aug 1, 2023

Description

Addresses a build issue where the build information being generated on each build includes a timestamp. Since the timestamp is incremented each time, no incremental builds will take place for those that tasks that depend on this buildInfo task.

Performance Before Changes Applied

The build scan can be seen here with performance details, with a overall time for executing tasks of 45.650s:
https://scans.gradle.com/s/vgim65zsvbrzm/performance/execution#wall-clock-time

Performance After Changes Applied

Without timestamps being put in the build info, the overall time for executing tasks was 14.763 seconds:
https://scans.gradle.com/s/p5ldndkjxwy4g/performance/execution#wall-clock-time

Some background

The spring boot documentation regarding actually mentions this behavior. Following the link below and looking at the example on excluding the 'time' show the essence of this change.

https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/htmlsingle/#integrating-with-actuator.build-info

@pivotal-cla This is an Obvious Fix

@jvalkeal
Copy link
Contributor

jvalkeal commented Aug 2, 2023

Ah yes, reason we have buildinfo is to enable build-in version command.

$ java -jar spring-shell-samples/spring-shell-sample-e2e/build/libs/spring-shell-sample-e2e-3.2.0-SNAPSHOT.jar version
Build Version: 3.2.0-SNAPSHOT

Though samples don't use that field so it can go. Thx, didn't never realise this might happen even if I probably saw that note in boot docs.

@jvalkeal jvalkeal added this to the 3.2.0-M1 milestone Aug 2, 2023
@jvalkeal jvalkeal merged commit c5145a2 into spring-projects:main Aug 2, 2023
@gcoopercos
Copy link
Contributor Author

Ah yes, reason we have buildinfo is to enable build-in version command.

$ java -jar spring-shell-samples/spring-shell-sample-e2e/build/libs/spring-shell-sample-e2e-3.2.0-SNAPSHOT.jar version
Build Version: 3.2.0-SNAPSHOT

Though samples don't use that field so it can go. Thx, didn't never realise this might happen even if I probably saw that note in boot docs.

Ah that makes sense. Thanks for the context.

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.

2 participants