Skip to content

Conversation

@teojgo
Copy link
Contributor

@teojgo teojgo commented Dec 18, 2019

Fixes #1052

@teojgo teojgo requested a review from vkarak December 18, 2019 12:25
@teojgo teojgo self-assigned this Dec 18, 2019
@vkarak vkarak changed the title WIP [feat] Add function to get the git commit hash [wip] [feat] Add function to get the git commit hash Dec 19, 2019
Vasileios Karakasis added 2 commits December 19, 2019 11:02
- Retrieve repo hash from ReFrame's install prefix always. This will print the
  hash even in cases that you call reframe from an unrelated directory.
- Add function for retrieving the framework's version that appends the hash if
  this can also be determined.
- Adapt `version` logging variable to use also the repo hash if available.
@vkarak vkarak changed the title [wip] [feat] Add function to get the git commit hash [feat] Add function to get the git commit hash Dec 19, 2019
@vkarak
Copy link
Contributor

vkarak commented Dec 19, 2019

@bcfriesen As soon as this is merged the %(version)s specifier in the log format will print also the revision hash, if ReFrame's install prefix contains the repo metadata. Otherwise, it will print the version as usual. Same rule applies also for --version.

@codecov-io
Copy link

codecov-io commented Dec 19, 2019

Codecov Report

Merging #1107 into master will increase coverage by 0.02%.
The diff coverage is 95.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1107      +/-   ##
==========================================
+ Coverage   91.55%   91.57%   +0.02%     
==========================================
  Files          81       81              
  Lines       11172    11196      +24     
==========================================
+ Hits        10228    10253      +25     
+ Misses        944      943       -1
Impacted Files Coverage Δ
reframe/core/logging.py 83.74% <ø> (ø) ⬆️
reframe/frontend/cli.py 80.56% <ø> (ø) ⬆️
unittests/test_utility.py 99.21% <100%> (ø) ⬆️
reframe/utility/os_ext.py 90.27% <94.73%> (+0.51%) ⬆️
reframe/core/config.py 84.61% <0%> (+1.7%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a9b0bce...dbabfb5. Read the comment docs.

@vkarak vkarak changed the title [feat] Add function to get the git commit hash [feat] Print repository's revision hash when ReFrame's version is requested Dec 19, 2019
@vkarak vkarak requested a review from victorusu December 19, 2019 12:20
Copy link
Contributor

@victorusu victorusu left a comment

Choose a reason for hiding this comment

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

lgtm

@vkarak vkarak merged commit 54dc1c7 into reframe-hpc:master Dec 19, 2019
@teojgo teojgo deleted the feat/git_commit_log branch January 24, 2020 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for logging ReFrame git repo hash

4 participants