-
Notifications
You must be signed in to change notification settings - Fork 36
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
feature: print runtime git commit #19
feature: print runtime git commit #19
Conversation
Codecov Report
@@ Coverage Diff @@
## main #19 +/- ##
=======================================
Coverage 13.21% 13.21%
=======================================
Files 22 22
Lines 1907 1907
=======================================
Hits 252 252
Misses 1606 1606
Partials 49 49
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
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.
IMO, I don't think this will help us a lot, because
- log won't be kept for a long time, it rotates usually
- commit id is not useful compared with tag, which could be found in image url
26c3499
to
e726907
Compare
For the first problem, I add an /rama/VERSION file into the image for long time usage. For the second problem, image tag sometimes is unreliable. This happens mostly in develop environment, developer sometime don't know the exact code version if they dose not use a official release or have changed the image's tag. |
e726907
to
669cb54
Compare
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.
/lgtm
/approve
thanks!
Pull Request Description
Describe what this PR does / why we need it
Print runtime commit id of Rama in rama-manager and rama-daemon logs. It helps us to find the correct commit id while debugging.
Does this pull request fix one issue?
NONE
Describe how you did it
Link a flag "main.gitVersion" while building binaries, and add logs in rama-daemon and rama-manager.
Describe how to verify it
Run rama-daemon and rama-manager pod, logs of "starting rama manager with git version: " will be printed at the first place. Executing command of "cat /rama/COMMIT_ID" in pod will show commit id too.
Special notes for reviews