masa-finance / roadmap

The protocol
0 stars 0 forks source link

Do not hardcode version tracking #58

Closed mudler closed 4 months ago

mudler commented 4 months ago

Problem

Currently, when we want to bump or tag a new release we need to modify manually a version string in the code before tagging.

https://github.com/masa-finance/masa-oracle/blob/4744de318e7c76f28307e75e99e5f902c9c993dc/pkg/config/constants.go#L97

What I'd like to see

The version should be automatically detected by the build system given the git tag currently running the commands, and passed by as a compilation variable so we don't have to specify that manually

Acceptance criteria

theMultitude commented 4 months ago

@mudler do we want to make these changes to the docker yaml and Dockerfile as well?

theMultitude commented 4 months ago

@jdutchak @restevens402 @mudler

So I'm successfully pulling the version from git but running the node is failing with:

FATA[0005] failed to negotiate protocol: protocols not supported: [/masa/oracle_protocol/Version-test] Please update to the latest version and make sure you are connecting to the correct network. 

I suspect it's just a formatting error. Can you point me to where the bootnode makes the check so I can adjust accordingly?

theMultitude commented 4 months ago

Completed and linked a pull request. Of note related to this: if we decide to use Consul for node discovery and health it can be utilized by Viper to ensure configuration for nodes is kept up to date.