Skip to content

Commit

Permalink
Fix skywire cli log / update dmsg dep (#1853)
Browse files Browse the repository at this point in the history
* update dmsg dependency
  • Loading branch information
0pcom committed Jul 2, 2024
1 parent 420a207 commit 0c73e9a
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 20 deletions.
14 changes: 3 additions & 11 deletions cmd/skywire-cli/commands/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (

func init() {
logCmd.Flags().SortFlags = false
logCmd.Flags().StringVarP(&env, "env", "e", "prod", "deployment to get uptimes from")
logCmd.Flags().BoolVarP(&logOnly, "log", "l", false, "fetch only transport logs")
logCmd.Flags().BoolVarP(&surveyOnly, "survey", "v", false, "fetch only surveys")
logCmd.Flags().StringVarP(&fetchFile, "file", "f", "", "fetch only a specific file from all online visors")
Expand All @@ -44,7 +43,7 @@ func init() {
logCmd.Flags().IntVar(&batchSize, "batchSize", 50, "number of visor in each batch")
logCmd.Flags().Int64Var(&maxFileSize, "maxfilesize", 1024, "maximum file size allowed to download during collecting logs, in KB")
logCmd.Flags().StringVarP(&dmsgDisc, "dmsg-disc", "D", skyenv.DmsgDiscAddr, "dmsg discovery url\n")
logCmd.Flags().StringVarP(&utAddr, "ut", "u", "", "custom uptime tracker url")
logCmd.Flags().StringVarP(&utAddr, "ut", "u", skyenv.UptimeTrackerAddr, "uptime tracker url\n")
if os.Getenv("DMSGCURL_SK") != "" {
sk.Set(os.Getenv("DMSGCURL_SK")) //nolint
}
Expand Down Expand Up @@ -91,17 +90,10 @@ var logCmd = &cobra.Command{
flag.Parse()

// Set the uptime tracker to fetch data from
endpoint := skyenv.UptimeTrackerAddr
if env == "test" {
endpoint = skyenv.TestUptimeTrackerAddr
}
endpoint = endpoint + "/uptimes?v=v2"
if utAddr != "" {
endpoint = utAddr
}
endpoint := utAddr + "/uptimes?v=v2"

if fetchFrom != "" {
endpoint = endpoint + "&visors=" + fetchFrom
endpoint = utAddr + "&visors=" + fetchFrom
}

//Fetch the uptime data over http
Expand Down
1 change: 0 additions & 1 deletion cmd/skywire-cli/commands/log/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

var (
pubKey string
env string
duration int
minv string
allVisors bool
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (
github.com/pterm/pterm v0.12.66
github.com/robert-nix/ansihtml v1.0.1
github.com/sirupsen/logrus v1.9.3
github.com/skycoin/dmsg v1.3.22-0.20240627165206-e8cd649ecc88
github.com/skycoin/dmsg v1.3.22-0.20240702162730-1c2fcecd4bb6
github.com/skycoin/skycoin v0.27.1
github.com/skycoin/skycoin-service-discovery v0.0.0-20240627171358-7f59a951fa29
github.com/skycoin/skywire-services v0.0.0-20240627171623-87edf49d9025
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,8 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/skycoin/dmsg v1.3.22-0.20240627165206-e8cd649ecc88 h1:ENFkdPTq1Um9uoYXAh3h0WTUpJjDHhVZZevsbbP2fyw=
github.com/skycoin/dmsg v1.3.22-0.20240627165206-e8cd649ecc88/go.mod h1:v56TVWnlz18J4qrVFxjOyjzg153XSuay9Y76AUb35ac=
github.com/skycoin/dmsg v1.3.22-0.20240702162730-1c2fcecd4bb6 h1:q+KeZyHWctCahSUbZ6b+iy1VQNHVKN2YZc7J2R0VIHw=
github.com/skycoin/dmsg v1.3.22-0.20240702162730-1c2fcecd4bb6/go.mod h1:72MC0HFDxKYqMLZ2RWGY/ZDNFq6965SP1PIrKlYqaiQ=
github.com/skycoin/noise v0.0.0-20180327030543-2492fe189ae6 h1:1Nc5EBY6pjfw1kwW0duwyG+7WliWz5u9kgk1h5MnLuA=
github.com/skycoin/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:UXghlricA7J3aRD/k7p/zBObQfmBawwCxIVPVjz2Q3o=
github.com/skycoin/skycoin v0.27.1 h1:HatxsRwVSPaV4qxH6290xPBmkH/HgiuAoY2qC+e8C9I=
Expand Down
4 changes: 3 additions & 1 deletion vendor/github.com/skycoin/dmsg/pkg/dmsg/const.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/skycoin/dmsg/pkg/dmsgcurl/flags.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions vendor/github.com/skycoin/dmsg/pkg/dmsgserver/config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ github.com/rs/cors
## explicit; go 1.13
github.com/sirupsen/logrus
github.com/sirupsen/logrus/hooks/syslog
# github.com/skycoin/dmsg v1.3.22-0.20240627165206-e8cd649ecc88
# github.com/skycoin/dmsg v1.3.22-0.20240702162730-1c2fcecd4bb6
## explicit; go 1.21
github.com/skycoin/dmsg/cmd/dmsg-discovery/commands
github.com/skycoin/dmsg/cmd/dmsg-server/commands
Expand Down

0 comments on commit 0c73e9a

Please sign in to comment.