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

Store the build's commit hash in Jarfile manifest #6396

Merged
merged 2 commits into from Nov 25, 2022
Merged

Store the build's commit hash in Jarfile manifest #6396

merged 2 commits into from Nov 25, 2022

Conversation

ghost
Copy link

@ghost ghost commented Oct 30, 2022

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:

image

jmacxx added 2 commits October 29, 2022 22:12
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.
Copy link
Collaborator

@HenrikJannsen HenrikJannsen left a 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() {
Copy link
Collaborator

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());
Copy link
Collaborator

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.

Copy link
Contributor

@alejandrogarcia83 alejandrogarcia83 left a comment

Choose a reason for hiding this comment

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

utACK

@alejandrogarcia83 alejandrogarcia83 merged commit a6293a6 into bisq-network:master Nov 25, 2022
@ghost ghost mentioned this pull request Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants