Prometheus and versioning #14

Merged
jeffreypicard merged 8 commits from prometheus-and-versioning into master 2021-09-28 14:34:36 +02:00
jeffreypicard commented 2021-09-18 19:39:11 +02:00 (Migrated from github.com)

This PR is pulling in the changes I made for versioning that are in the old branch that has diverged too much from master, as well as the beginning of the code for prometheus metrics.

This PR is pulling in the changes I made for versioning that are in the old branch that has diverged too much from master, as well as the beginning of the code for prometheus metrics.
lyoshenka (Migrated from github.com) reviewed 2021-09-21 19:00:25 +02:00
lyoshenka (Migrated from github.com) commented 2021-09-21 18:50:04 +02:00

i recommend against putting sudo in scripts. at least for me, i have docker set up to run without sudo

i recommend against putting `sudo` in scripts. at least for me, i have docker set up to run without sudo
lyoshenka (Migrated from github.com) commented 2021-09-21 18:50:27 +02:00

your build_and_push.sh script doesnt use sudo

your build_and_push.sh script doesnt use sudo
lyoshenka (Migrated from github.com) commented 2021-09-21 18:52:08 +02:00

typo in help text:

getUniqueChanne;s

typo in help text: > getUniqueChanne;s
@ -55,2 +55,4 @@
```
go get google.golang.org/protobuf/cmd/protoc-gen-go google.golang.org/grpc/cmd/protoc-gen-go-grpc
pip install grpcio grpcio-tools github3.py
```
lyoshenka (Migrated from github.com) commented 2021-09-21 18:54:45 +02:00

what's the python for?

what's the python for?
@ -0,0 +1,345 @@
import argparse
lyoshenka (Migrated from github.com) commented 2021-09-21 18:55:22 +02:00

why a python script in a go repo?

why a python script in a go repo?
lyoshenka (Migrated from github.com) commented 2021-09-21 18:56:44 +02:00

plz sort the imports with the builtins at the top. if you're using GoLand, you can turn on the go imports file watcher and it will sort them on save for you

plz sort the imports with the builtins at the top. if you're using GoLand, you can turn on the `go imports` file watcher and it will sort them on save for you
lyoshenka (Migrated from github.com) commented 2021-09-21 19:00:01 +02:00

i don't think our version should be returning today's date all the time. that's not right. it should return the date of when the last version (or commit or build) was made.

for one approach to do that, look at the version var in https://github.com/lbryio/internal-apis/blob/master/app/meta/meta.go. that gets set at build time here https://github.com/lbryio/internal-apis/blob/master/build.sh#L36. you could do the same with the build date.

i don't think our version should be returning today's date all the time. that's not right. it should return the date of when the last version (or commit or build) was made. for one approach to do that, look at the `version` var in https://github.com/lbryio/internal-apis/blob/master/app/meta/meta.go. that gets set at build time here https://github.com/lbryio/internal-apis/blob/master/build.sh#L36. you could do the same with the build date.
jeffreypicard (Migrated from github.com) reviewed 2021-09-21 19:44:03 +02:00
jeffreypicard (Migrated from github.com) commented 2021-09-21 19:44:03 +02:00

Agreed, that's why I'm getting rid of this one.

Agreed, that's why I'm getting rid of this one.
jeffreypicard (Migrated from github.com) reviewed 2021-09-21 19:45:30 +02:00
@ -55,2 +55,4 @@
```
go get google.golang.org/protobuf/cmd/protoc-gen-go google.golang.org/grpc/cmd/protoc-gen-go-grpc
pip install grpcio grpcio-tools github3.py
```
jeffreypicard (Migrated from github.com) commented 2021-09-21 19:45:30 +02:00

A couple things, one the protobufs need to be able to build into python files as well for the sdk, and I'm using a python script to do versioning tags and releases on github.

A couple things, one the protobufs need to be able to build into python files as well for the sdk, and I'm using a python script to do versioning tags and releases on github.
jeffreypicard (Migrated from github.com) reviewed 2021-09-21 19:47:12 +02:00
@ -0,0 +1,345 @@
import argparse
jeffreypicard (Migrated from github.com) commented 2021-09-21 19:47:12 +02:00

I copied Lex's python script for doing versioning and releases and edited it to fix the date ver thing we're doing for this repo, Python has really nice libraries for automating github tags and stuff. Could probably figure out how to do it in Go, but this is much faster development wise.

I copied Lex's python script for doing versioning and releases and edited it to fix the date ver thing we're doing for this repo, Python has really nice libraries for automating github tags and stuff. Could probably figure out how to do it in Go, but this is much faster development wise.
lyoshenka (Migrated from github.com) approved these changes 2021-09-28 14:32:50 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/herald.go#14
No description provided.