Skip to content

Commit

Permalink
Merge pull request #81 from Nextdoor/go-update-deps
Browse files Browse the repository at this point in the history
Update go deps
  • Loading branch information
stlava authored May 10, 2023
2 parents 29551ac + 06e54ff commit 84c4425
Show file tree
Hide file tree
Showing 41 changed files with 1,350 additions and 331 deletions.
4 changes: 2 additions & 2 deletions app/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
*/

package app

import (
"github.com/Nextdoor/pg-bifrost.git/app/config"
"github.com/Nextdoor/pg-bifrost.git/partitioner"
"github.com/Nextdoor/pg-bifrost.git/transport/batcher"
"github.com/jackc/pgconn"
"github.com/jackc/pgx/v5/pgconn"
"time"

"github.com/Nextdoor/pg-bifrost.git/filter"
Expand Down
33 changes: 16 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,44 @@ module github.com/Nextdoor/pg-bifrost.git
go 1.20

require (
github.com/DataDog/datadog-go v2.2.0+incompatible
github.com/DataDog/datadog-go/v5 v5.3.0
github.com/NeowayLabs/wabbit v0.0.0-20190108150251-e762dd02f7f2
github.com/Nextdoor/parselogical v0.0.0-20180824214823-31546f21ba34
github.com/aws/aws-sdk-go v1.15.38
github.com/cenkalti/backoff v2.1.1+incompatible
github.com/aws/aws-sdk-go v1.44.258
github.com/cenkalti/backoff/v4 v4.2.1
github.com/cevaris/ordered_map v0.0.0-20180310183325-0efaee1733e3
github.com/golang/mock v1.6.0
github.com/google/go-cmp v0.5.9
github.com/jackc/pgconn v1.1.0
github.com/jackc/pglogrepl v0.0.0-20200309144228-32ec418076b3
github.com/jackc/pgproto3/v2 v2.0.0
github.com/jackc/pglogrepl v0.0.0-20230428004623-0c5b98f52784
github.com/jackc/pgx/v5 v5.0.3
github.com/json-iterator/go v1.1.12
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.8.1
github.com/sirupsen/logrus v1.9.0
github.com/streadway/amqp v0.0.0-20181205114330-a314942b2fd9
github.com/stretchr/testify v1.7.0
github.com/stretchr/testify v1.8.1
gopkg.in/Nextdoor/cli.v1 v1.20.2
)

require (
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsouza/go-dockerclient v1.9.7 // indirect
github.com/go-ini/ini v1.25.4 // indirect
github.com/google/uuid v1.0.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.0 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 // indirect
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pborman/uuid v1.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/smartystreets/goconvey v1.8.0 // indirect
github.com/tiago4orion/conjure v0.0.0-20150908101743-93cb30b9d218 // indirect
golang.org/x/crypto v0.0.0-20191117063200-497ca9f6d64f // indirect
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.3.3 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gopkg.in/yaml.v2 v2.2.2 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/tools v0.7.0 // indirect
gopkg.in/yaml.v2 v2.2.8 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
174 changes: 73 additions & 101 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions itests/common.bash
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ _profile() {
fi

log "Comparing Memory Profile"
memprofile=$(go tool pprof -normalize -top -show github.com/Nextdoor -diff_base tests/$BATS_TEST_DESCRIPTION/perf_base/mem.pprof ../target/pg-bifrost tests/$BATS_TEST_DESCRIPTION/perf_output/mem.pprof | grep -v -E "^(\s+)?-" | tail -n +9 | tr -s ' ' | awk '{$1=$1};1' | cut -d ' ' -f5- | egrep -v vendor/gopkg.in/Nextdoor/cli)
memprofile=$(go tool pprof -normalize -top -show github.com/Nextdoor -ignore github.com/Nextdoor/pg-bifrost.git/stats -diff_base tests/$BATS_TEST_DESCRIPTION/perf_base/mem.pprof ../target/pg-bifrost tests/$BATS_TEST_DESCRIPTION/perf_output/mem.pprof | grep -v -E "^(\s+)?-" | tail -n +9 | tr -s ' ' | awk '{$1=$1};1' | cut -d ' ' -f5- | egrep -v vendor/gopkg.in/Nextdoor/cli)
memory_leak=false
while read -r line; do
percent=$(echo $line | cut -d ' ' -f1 | rev | cut -c 2- | rev)
Expand All @@ -238,7 +238,7 @@ _profile() {
done <<< "$memprofile"

log "Comparing CPU Profile"
cpuprofile=$(go tool pprof -normalize -top -show github.com/Nextdoor -diff_base tests/$BATS_TEST_DESCRIPTION/perf_base/cpu.pprof tests/$BATS_TEST_DESCRIPTION/perf_output/cpu.pprof | tail -n +10 | tr -s ' ' | awk '{$1=$1};1' | cut -d ' ' -f5-)
cpuprofile=$(go tool pprof -normalize -top -show github.com/Nextdoor -ignore github.com/Nextdoor/pg-bifrost.git/stats -diff_base tests/$BATS_TEST_DESCRIPTION/perf_base/cpu.pprof tests/$BATS_TEST_DESCRIPTION/perf_output/cpu.pprof | tail -n +10 | tr -s ' ' | awk '{$1=$1};1' | cut -d ' ' -f5-)
cpu_hot=false
while read -r line; do
percent=$(echo $line | cut -d ' ' -f1 | rev | cut -c 2- | rev)
Expand Down
3 changes: 2 additions & 1 deletion itests/tests/base/test_large_sleep/envfile.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ EXPECTED_COUNT=50000
MEMPROFILE=/perf/mem.pprof
CPUPROFILE=/perf/cpu.pprof
KINESIS_POLLER_WAIT_TIME=180
S3_POLLER_INITIAL_WAIT_TIME=180
S3_POLLER_INITIAL_WAIT_TIME=180
GODEBUG=memprofilerate=1
Binary file modified itests/tests/base/test_large_sleep/perf_base/cpu.pprof
Binary file not shown.
Binary file modified itests/tests/base/test_large_sleep/perf_base/mem.pprof
Binary file not shown.
3 changes: 2 additions & 1 deletion itests/tests/base/test_large_txn/envfile.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ EXPECTED_COUNT=50000
MEMPROFILE=/perf/mem.pprof
CPUPROFILE=/perf/cpu.pprof
KINESIS_POLLER_WAIT_TIME=180
S3_POLLER_INITIAL_WAIT_TIME=180
S3_POLLER_INITIAL_WAIT_TIME=180
GODEBUG=memprofilerate=1
Binary file modified itests/tests/base/test_large_txn/perf_base/cpu.pprof
Binary file not shown.
Binary file modified itests/tests/base/test_large_txn/perf_base/mem.pprof
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ WORKERS=4
KINESIS_POLLER_WAIT_TIME=120
MEMPROFILE=/perf/mem.pprof
CPUPROFILE=/perf/cpu.pprof
KINESIS_POLLER_WAIT_TIME=180
KINESIS_POLLER_WAIT_TIME=180
GODEBUG=memprofilerate=1
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ EXPECTED_COUNT=50000
WORKERS=4
MEMPROFILE=/perf/mem.pprof
CPUPROFILE=/perf/cpu.pprof
KINESIS_POLLER_WAIT_TIME=180
KINESIS_POLLER_WAIT_TIME=180
GODEBUG=memprofilerate=1
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion itests/tests/kinesis/test_strict_order_shared/envfile.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ WORKERS=2
PARTITION_METHOD=transaction-bucket
BATCHER_ROUTING_METHOD=partition
MEMPROFILE=/perf/mem.pprof
CPUPROFILE=/perf/cpu.pprof
CPUPROFILE=/perf/cpu.pprof
GODEBUG=memprofilerate=1
Binary file not shown.
Binary file not shown.
8 changes: 4 additions & 4 deletions main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
*/

package main

Expand Down Expand Up @@ -41,7 +41,7 @@ import (
"github.com/Nextdoor/pg-bifrost.git/utils"

"github.com/Nextdoor/pg-bifrost.git/shutdown"
"github.com/jackc/pgconn"
"github.com/jackc/pgx/v5/pgconn"

"github.com/sirupsen/logrus"
"gopkg.in/Nextdoor/cli.v1"
Expand Down Expand Up @@ -121,8 +121,8 @@ var (
EnvVar: "DATADOG_HOST",
}),
altsrc.NewStringFlag(cli.StringFlag{
Name: config.VAR_NAME_DD_TAGS,
Usage: "datadog tags to add to emitted metrics. These are specified as key:value and are " +
Name: config.VAR_NAME_DD_TAGS,
Usage: "datadog tags to add to emitted metrics. These are specified as key:value and are " +
"delimited by ','. For example key1:value1,key2:value2",
Value: "",
EnvVar: "DATADOG_TAGS",
Expand Down
6 changes: 3 additions & 3 deletions replication/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package client
import (
"context"
"github.com/Nextdoor/parselogical"
"github.com/jackc/pgconn"
"github.com/jackc/pglogrepl"
"github.com/jackc/pgproto3/v2"
"github.com/jackc/pgx/v5/pgconn"
"github.com/jackc/pgx/v5/pgproto3"
"os"
"strconv"
"strings"
Expand Down Expand Up @@ -315,7 +315,7 @@ func (c *Replicator) Start(progressChan <-chan uint64) {

// Check for error and connection status
if rplErr != nil {
if pgconn.Timeout(rplErr) {
if pgconn.Timeout(rplErr) || errors.Is(rplErr, context.DeadlineExceeded) {
if err := c.handleProgress(true); err != nil {
log.Error(err)
return
Expand Down
2 changes: 1 addition & 1 deletion replication/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/Nextdoor/pg-bifrost.git/stats"
"github.com/golang/mock/gomock"
"github.com/jackc/pglogrepl"
"github.com/jackc/pgproto3/v2"
"github.com/jackc/pgx/v5/pgproto3"
"github.com/stretchr/testify/assert"
"time"

Expand Down
6 changes: 3 additions & 3 deletions replication/client/conn/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ package conn

import (
"context"
"github.com/cenkalti/backoff"
"github.com/jackc/pgconn"
"github.com/cenkalti/backoff/v4"
"github.com/jackc/pglogrepl"
"github.com/jackc/pgproto3/v2"
"github.com/jackc/pgx/v5/pgconn"
"github.com/jackc/pgx/v5/pgproto3"
"time"
)

Expand Down
2 changes: 1 addition & 1 deletion replication/client/conn/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package conn
import (
"context"
"github.com/jackc/pglogrepl"
"github.com/jackc/pgproto3/v2"
"github.com/jackc/pgx/v5/pgproto3"
)

// Conn is a interface which both our PgReplConnWrapper and pgx.ReplicationConn implement to help with gomocks
Expand Down
5 changes: 2 additions & 3 deletions replication/client/conn/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
*/

package conn

import (
"context"
"github.com/jackc/pgconn"
"github.com/jackc/pglogrepl"
"github.com/jackc/pgx/v5/pgconn"
"github.com/sirupsen/logrus"
"os"
"time"
Expand Down Expand Up @@ -95,4 +95,3 @@ func (m *Manager) Close() {
m.conn.Close(context.Background())
m.conn = nil
}

2 changes: 1 addition & 1 deletion replication/client/conn/mocks/mock_client.go

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

2 changes: 1 addition & 1 deletion stats/reporters/datadog/datadog.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"os"

"github.com/DataDog/datadog-go/v5/statsd"
"github.com/Nextdoor/pg-bifrost.git/shutdown"
"github.com/Nextdoor/pg-bifrost.git/stats"
"github.com/Nextdoor/pg-bifrost.git/stats/reporters"
"github.com/DataDog/datadog-go/statsd"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion stats/reporters/factory/factory.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package factory

import (
"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/Nextdoor/pg-bifrost.git/app/config"
"github.com/Nextdoor/pg-bifrost.git/shutdown"
"github.com/Nextdoor/pg-bifrost.git/stats"
Expand Down
4 changes: 2 additions & 2 deletions transport/transporters/kinesis/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
*/

package kinesis

Expand All @@ -28,7 +28,7 @@ import (
"github.com/Nextdoor/pg-bifrost.git/transport"
"github.com/Nextdoor/pg-bifrost.git/transport/transporters/kinesis/batch"
"github.com/Nextdoor/pg-bifrost.git/transport/transporters/kinesis/transporter"
"github.com/cenkalti/backoff"
"github.com/cenkalti/backoff/v4"
"github.com/cevaris/ordered_map"
"github.com/sirupsen/logrus"
)
Expand Down
Loading

0 comments on commit 84c4425

Please sign in to comment.