Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Update Client Version to be ethstats friendly #258

Merged
merged 9 commits into from
Nov 14, 2018

Conversation

shemnon
Copy link
Contributor

@shemnon shemnon commented Nov 14, 2018

PR description

Update value returned by web3_clientVersion to be ethstats friendly

  • Version part starts with a v
  • SNAPSHOT builds report 32 bits of the git hash
  • OS and architecture are sniffed out and reported
  • JVM version and branding are sniffed out and reported

Sample values:
pantheon/v0.9.0-dev-f800a0b1/osx-x86_64/oracle-java-1.8
pantheon/v0.9.0-dev-f800a0b1/osx-x86_64/zulu-java-11
pantheon/v0.9.0/linux-x86_64/openjdk-java-12

Add os and java version.  Currently in a static class.
Pull the version from the jar manifest.
For SNAPSHOT builds store git hash in implementation version, report this in
client version.
Missed the all important v
Missed the all important v
Copy link
Contributor

@lucassaldanha lucassaldanha left a comment

Choose a reason for hiding this comment

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

The changes look good to me. The only thing that I'd like to see is a simple test verifying that the version string adheres to the expected format (foo/vX.Y.Z/foo/foo). Just to avoid, in the future, someone changing it by because they didn't have the context of why we have this specific format.

Test for ethstats valid formatting
Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

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

Minor nit about variable formatting in generated code but LGTM.

@shemnon shemnon merged commit 002d9ce into PegaSysEng:master Nov 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants