status-im / infra-eth-cluster

Infrastructure for Status-go fleets
https://github.com/status-im/status-go
0 stars 0 forks source link

Deploy host for community message reliability script #44

Closed cammellos closed 2 years ago

cammellos commented 3 years ago

We need an host for running the community reliability script.

The branch we will be running is https://github.com/status-im/status-go/pull/2417 ( we'll merge in develop before deploying).

The command is:

./ping-community --seed-phrase "your seed phrase" --community-id "community-id" --chat-id "chat-id"

The host does not need frequent updates, and need to be always online.

jakubgs commented 2 years ago

When I try to run the command locally I get:

ERROR[11-15|16:17:22.931] could not retrieve message               error="record not found"
WARN [11-15|16:17:22.931] message not retrieved 
jakubgs commented 2 years ago

I'm also seeing some weird failures when trying to build a Docker image:

vendor/github.com/benbjohnson/clock/clock.go:323:11: t.ticker.Reset undefined (type *time.Ticker has no field or method Reset)
jakubgs commented 2 years ago

Looks like our dependency on github.com/benbjohnson/clock version 1.1.0 forces us to use Go compiler 1.15 or newer:

func (t *Ticker) Reset(dur time.Duration) {
    if t.ticker != nil {
        t.ticker.Reset(dur)
    }
}

https://github.com/benbjohnson/clock/blob/307483a2173c76d3ded778bd68214865fcf05ec8/clock.go#L321-L325

Otherwise the time.Ticker object lacks the Reset option: https://pkg.go.dev/time#Ticker.Reset

https://cs.opensource.google/go/go/+/refs/tags/go1.15:src/time/tick.go;l=51 https://cs.opensource.google/go/go/+/refs/tags/go1.14.9:src/time/tick.go

jakubgs commented 2 years ago

Maybe it's time to bump the version required in go.mod: https://github.com/status-im/status-go/blob/15853c5a9a953e2f87857181aad64d82ba532a28/go.mod#L3

jakubgs commented 2 years ago

Here's the Ansible role and configuration: https://github.com/status-im/infra-eth-cluster/commit/3ec1d3eb

admin@node-01.do-ams3.eth.test:/docker/ping-community % docker-compose ps
     Name                   Command               State                          Ports                       
-------------------------------------------------------------------------------------------------------------
ping-community   /usr/local/bin/ping-commun ...   Up      30303/tcp, 30303/udp, 30304/udp, 8080/tcp, 8545/

https://consul.infra.status.im/ui/do-ams3/services/ping-community/instances/node-01.do-ams3.eth.test/ping-community

jakubgs commented 2 years ago

I think this works fine so I'm closing this.