Conversation
- Changes the script to use a "local" version of memcoin.
pierluca
left a comment
There was a problem hiding this comment.
A few minor comments, I only feel strongly about the makefile 😅 looks pretty neat overalls
README.md
Outdated
| Build info can be added to the binary with the `ldflags`, at build time.. Infos | ||
| are stored on variables in the root `mod.go`. For example: |
There was a problem hiding this comment.
| Build info can be added to the binary with the `ldflags`, at build time.. Infos | |
| are stored on variables in the root `mod.go`. For example: | |
| Build info can be added to the binary with the `ldflags`, at build time. | |
| Infos are stored on variables in the root `mod.go`. For example: |
start_test.sh
Outdated
| versionFlag="github.com/dedis/d-voting.Version=`git describe --tags`" | ||
| timeFlag="github.com/dedis/d-voting.BuildTime=`date +'%d/%m/%y_%H:%M'`" | ||
|
|
||
| go build -ldflags="-X $versionFlag -X $timeFlag" ./cli/memcoin |
There was a problem hiding this comment.
This seems to be in a location that shouldn't be concerned with building.
I'd make this part of the Makefile.
metrics/controller/mod.go
Outdated
| func (m controller) SetCommands(builder node.Builder) { | ||
|
|
||
| cmd := builder.SetCommand("metrics") | ||
| cmd.SetDescription("interact with the DKG service") |
There was a problem hiding this comment.
Is the description here correct? 🤔
| go func() { | ||
| errc <- srv.listen() | ||
| }() | ||
|
|
||
| for i := 0; i < defaultRetry && srv.getAddr() == nil; i++ { | ||
| select { | ||
| case err := <-errc: | ||
| return xerrors.Errorf("failed to listen: %v", err) | ||
| case <-time.After(waitRetry): | ||
| } | ||
| } | ||
|
|
||
| srvAddr := srv.getAddr() | ||
| if srvAddr == nil { | ||
| return xerrors.Errorf("failed to start metric server") | ||
| } |
There was a problem hiding this comment.
According to this, the polling seems entirely avoidable.
There was a problem hiding this comment.
That doesn't solve our problem because we are using an external function to create and start the HTTP server. And we don't want the function to panic with a log.Fatal(server.Serve(ln)) .
- use a make file to build - fixes wrong command description
d3974fc to
97efc99
Compare
| ```sh | ||
| versionFlag="github.com/dedis/d-voting.Version=`git describe --tags`" | ||
| timeFlag="github.com/dedis/d-voting.BuildTime=`date +'%d/%m/%y_%H:%M'`" | ||
|
|
||
| go build -ldflags="-X $versionFlag -X $timeFlag" ./cli/memcoin | ||
| ``` |
There was a problem hiding this comment.
make build should be enough, now, right?
There was a problem hiding this comment.
True, that's explained the line bellow 😄 . I found it interesting to explain a bit the magic behind build-time variables.
|
Waiting on dedis/dela#209 before merging it. |
- Removes deprecated protobuf check
Pull Request Test Coverage Report for Build 1979417812
💛 - Coveralls |
|
Kudos, SonarCloud Quality Gate passed! |








Depends on dedis/dela#209
For now we mainly have Dela metrics. Additional metrics specific to the d-Voting system will be added later.