-
Notifications
You must be signed in to change notification settings - Fork 310
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-16070 tools: Include BuildInfo field in version output #14609
Conversation
Test stage Python Bandit check completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-14609/1/execution/node/145/log |
Ticket title is 'Add build_info to JSON version output' |
Test stage Python Bandit check completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-14609/2/execution/node/146/log |
Test stage Python Bandit check completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-14609/3/execution/node/146/log |
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-14609/4/testReport/ |
Test stage Functional on EL 8.8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-14609/4/execution/node/1190/log |
When available, include more detailed build information in the version output (most recent tag, etc). Adds build details to the GetAttachInfo response message in order to provide server build info to the dmg, daos_agent, and daos tools (accessible via server-version subcommand). Features: control Required-githooks: true Change-Id: Ia22a6f8007ece7fbf7f801cb9d48826aeae87485 Signed-off-by: Michael MacDonald <[email protected]>
Test stage Functional Hardware Medium completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-14609/5/execution/node/1505/log |
def get_build_info(): | ||
"""Attempt to retrieve commit/tag details from the build environment.""" | ||
try: | ||
cmd = subprocess.run(['git', 'describe', '--tags', '--dirty', '--always'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be useful if we got all build info here and and spit it to a file and exit when --build-info=write is set and read it from a file if --build-info=read and only automatically get it if --build-info=get (default) or something like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look at doing something like this in a follow-up, to enable build info in a tree without the .git
subdirectory.
@@ -62,6 +63,25 @@ func apiVersion() string { | |||
) | |||
} | |||
|
|||
func srvBuildInfo() (*build.Info, error) { | |||
var major uint32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could put all the uint32's on one line
Test failure is DAOS-15608. |
…14645) When available, include more detailed build information in the version output (most recent tag, etc). Adds build details to the GetAttachInfo response message in order to provide server build info to the dmg, daos_agent, and daos tools (accessible via server-version subcommand). Signed-off-by: Michael MacDonald <[email protected]>
…ck#14609) When available, include more detailed build information in the version output (most recent tag, etc). Adds build details to the GetAttachInfo response message in order to provide server build info to the dmg, daos_agent, and daos tools (accessible via server-version subcommand). Signed-off-by: Michael MacDonald <[email protected]>
When available, include more detailed build information in
the version output (most recent tag, etc).
Adds build details to the GetAttachInfo response message in
order to provide server build info to the dmg, daos_agent, and
daos tools (accessible via server-version subcommand).
Features: control
Required-githooks: true
Change-Id: Ia22a6f8007ece7fbf7f801cb9d48826aeae87485
Signed-off-by: Michael MacDonald [email protected]