-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Store the build's commit hash in Jarfile manifest #6396
Conversation
logging of: `The requester had version x.x.x. Our historical data store has version y.y.y As the requester version is not older as our historical store we do not add the data to the result map.` Which takes up many screenfuls of log for every client getDataRequest.
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.
utACK
@@ -135,6 +139,16 @@ public static void printVersion() { | |||
'}'); | |||
} | |||
|
|||
public String readCommitHash() { |
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.
Maybe better to use a static method.
@@ -151,7 +150,7 @@ public void onMessage(NetworkEnvelope networkEnvelope, Connection connection) { | |||
|
|||
// node | |||
inventory.put(InventoryItem.version, Version.VERSION); | |||
inventory.put(InventoryItem.commitHash, RequestInfo.COMMIT_HASH); | |||
inventory.put(InventoryItem.commitHash, new Version().readCommitHash()); |
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.
A static method would be more natural here.
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.
utACK
The seednode monitor displays a misleading commit hash, just a hardcoded string which never changes.
This PR fixes that by obtaining the git HEAD commit hash at build time, storing it in the Jarfile manifest information.
Seednodes then report the correct commit hash so that the monitor will indicate what commit they are running.
This is useful to know what source the seednode was built from.
e.g: