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

DAOS-15055 tools: Add build host/time to JSON version #13644

Merged
merged 2 commits into from
Jan 24, 2024
Merged

Conversation

mjmac
Copy link
Contributor

@mjmac mjmac commented Jan 22, 2024

Include build timestamp in all builds. Only
include build host in non-release builds.

Change-Id: I2d5525c21da2537a9583e9dbd57265e34639913f
Required-githooks: true
Signed-off-by: Michael MacDonald mjmac@google.com

Include build timestamp in all builds. Only
include build host in non-release builds.

Change-Id: I2d5525c21da2537a9583e9dbd57265e34639913f
Required-githooks: true
Signed-off-by: Michael MacDonald <mjmac@google.com>
@mjmac mjmac requested review from a team as code owners January 22, 2024 20:20
@mjmac mjmac requested review from tanabarr and kjacque and removed request for a team January 22, 2024 20:20
daltonbohning
daltonbohning previously approved these changes Jan 22, 2024
Copy link
Contributor

@daltonbohning daltonbohning left a comment

Choose a reason for hiding this comment

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

I'm curious what the use case is for needing BuildHost?

Copy link

Bug-tracker data:
Ticket title is 'Add build timestamp and host to structured build info'
Status is 'Open'
https://daosio.atlassian.net/browse/DAOS-15055

@mjmac
Copy link
Contributor Author

mjmac commented Jan 22, 2024

I'm curious what the use case is for needing BuildHost?

For non-release builds, it's useful for determining the provenance of binaries. If I don't have to guess, I'd rather not. :)

Change-Id: Iaf92ec13174f2aa6b4625b77dd3195e742773f11
Required-githooks: true

Signed-off-by: Michael MacDonald <mjmac@google.com>
@mjmac mjmac merged commit 0f1f59a into master Jan 24, 2024
48 checks passed
@mjmac mjmac deleted the mjmac/DAOS-15055 branch January 24, 2024 17:08
mjmac added a commit that referenced this pull request Jan 24, 2024
Include build timestamp in all builds. Only
include build host in non-release builds.

Signed-off-by: Michael MacDonald <mjmac@google.com>
mjmac added a commit that referenced this pull request Feb 1, 2024
Include build timestamp in all builds. Only
include build host in non-release builds.

Signed-off-by: Michael MacDonald <mjmac@google.com>
Import('daos_version', 'conf_dir')
path = 'github.com/daos-stack/daos/src/control/build'
return ' '.join([f'-X {path}.DaosVersion={daos_version}',
f'-X {path}.ConfigDir={conf_dir}',
f'-X {path}.BuildTime={build_time}',
Copy link
Contributor

Choose a reason for hiding this comment

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

This has the unfortunate side effect of causing an expensive re-build of the go components for every source build regardless of if anything has changed.

If there is a go version of the c date or time macros then you should use that, if not there's a way of telling scons that a subset of options shouldn't be compared against the cache when considering rebuilds, if you need me to I can look into this.

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

Successfully merging this pull request may close these issues.

5 participants