Skip to content

Commit dd7a774

Browse files
committed
fix: try to fix up some dependencies
1 parent a51ba78 commit dd7a774

14 files changed

Lines changed: 355 additions & 105 deletions

File tree

docker-compose.test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ services:
6969
context: .
7070
dockerfile: ./Dockerfile.gcppubsub
7171
logging:
72-
driver: none
72+
driver: none

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ require (
1010
github.com/aws/aws-sdk-go v1.55.6
1111
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b
1212
github.com/go-redsync/redsync/v4 v4.8.1
13-
github.com/gomodule/redigo v1.8.10-0.20230511231101-78e255f9bd2a
13+
github.com/gomodule/redigo v1.9.2
1414
github.com/google/uuid v1.2.0
1515
github.com/kelseyhightower/envconfig v1.4.0
1616
github.com/opentracing/opentracing-go v1.2.0
1717
github.com/pkg/errors v0.9.1
1818
github.com/rabbitmq/amqp091-go v1.9.0
1919
github.com/redis/go-redis/v9 v9.0.5
2020
github.com/robfig/cron/v3 v3.0.1
21-
github.com/stretchr/testify v1.8.1
21+
github.com/stretchr/testify v1.8.4
2222
github.com/urfave/cli v1.22.5
2323
go.mongodb.org/mongo-driver v1.17.0
2424
gopkg.in/yaml.v2 v2.4.0

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu
123123
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
124124
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
125125
github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0=
126-
github.com/gomodule/redigo v1.8.10-0.20230511231101-78e255f9bd2a h1:IZaN8yolZTNSbQ7Zn2solzo1nU98Lm3KB8W1X/YAhss=
127-
github.com/gomodule/redigo v1.8.10-0.20230511231101-78e255f9bd2a/go.mod h1:7ArFNvsTjH8GMMzB4uy1snslv2BwmginuMs06a1uzZE=
126+
github.com/gomodule/redigo v1.9.2 h1:HrutZBLhSIU8abiSfW8pj8mPhOyMYjZT/wcA4/L9L9s=
127+
github.com/gomodule/redigo v1.9.2/go.mod h1:KsU3hiK/Ay8U42qpaJk+kuNa3C+spxapWpM+ywhcgtw=
128128
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
129129
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
130130
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
@@ -228,11 +228,11 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
228228
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
229229
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
230230
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
231-
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
232231
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
233232
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
234-
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
235233
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
234+
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
235+
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
236236
github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203 h1:QVqDTf3h2WHt08YuiTGPZLls0Wq99X9bWd0Q5ZSBesM=
237237
github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203/go.mod h1:oqN97ltKNihBbwlX8dLpwxCl3+HnXKV/R0e+sRLd9C8=
238238
github.com/urfave/cli v1.22.5 h1:lNq9sAHXK2qfdI8W+GRItjCEkI+2oR4d+MEHy1CKXoU=

v2/Dockerfile.test

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Start from a Debian image with the latest version of Go installed
2+
# and a workspace (GOPATH) configured at /go.
3+
FROM golang
4+
5+
# Set environment variables
6+
ENV PATH /go/bin:$PATH
7+
8+
# Cd into the source code directory
9+
WORKDIR /go/src/github.com/RichardKnop/machinery/v2
10+
11+
# Copy the local package files to the container's workspace.
12+
ADD . /go/src/github.com/RichardKnop/machinery/v2
13+
14+
# Run integration tests as default command
15+
CMD /go/src/github.com/RichardKnop/machinery/v2/wait-for-it.sh rabbitmq:5672 -- make test-with-coverage

v2/Makefile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.PHONY: fmt lint golint test test-with-coverage ci
2+
# TODO: When Go 1.9 is released vendor folder should be ignored automatically
3+
PACKAGES=`go list ./... | grep -v vendor | grep -v mocks`
4+
5+
fmt:
6+
for pkg in ${PACKAGES}; do \
7+
go fmt $$pkg; \
8+
done;
9+
10+
lint:
11+
gometalinter --tests --disable-all --deadline=120s -E vet -E gofmt -E misspell -E ineffassign -E goimports -E deadcode ./...
12+
13+
golint:
14+
for pkg in ${PACKAGES}; do \
15+
golint -set_exit_status $$pkg || GOLINT_FAILED=1; \
16+
done; \
17+
[ -z "$$GOLINT_FAILED" ]
18+
19+
test:
20+
TEST_FAILED= ; \
21+
for pkg in ${PACKAGES}; do \
22+
go test $$pkg || TEST_FAILED=1; \
23+
done; \
24+
[ -z "$$TEST_FAILED" ]
25+
26+
test-with-coverage:
27+
echo "" > coverage.out
28+
echo "mode: set" > coverage-all.out
29+
TEST_FAILED= ; \
30+
for pkg in ${PACKAGES}; do \
31+
go test -coverprofile=coverage.out -covermode=set $$pkg || TEST_FAILED=1; \
32+
tail -n +2 coverage.out >> coverage-all.out; \
33+
done; \
34+
[ -z "$$TEST_FAILED" ]
35+
#go tool cover -html=coverage-all.out
36+
37+
ci:
38+
bash -c 'docker-compose -f docker-compose.test.yml -p machinery_ci up --build --abort-on-container-exit --exit-code-from sut'

v2/backends/dynamodb/dynamodb.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ import (
1313
"github.com/RichardKnop/machinery/v2/config"
1414
"github.com/RichardKnop/machinery/v2/log"
1515
"github.com/RichardKnop/machinery/v2/tasks"
16+
"github.com/aws/aws-sdk-go-v2/aws"
1617
awsconfig "github.com/aws/aws-sdk-go-v2/config"
1718
"github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue"
1819
"github.com/aws/aws-sdk-go-v2/service/dynamodb"
1920
"github.com/aws/aws-sdk-go-v2/service/dynamodb/types"
20-
"github.com/aws/aws-sdk-go/aws"
2121
)
2222

2323
const (
@@ -533,7 +533,7 @@ func (b *Backend) updateToFailureStateWithError(taskState *tasks.TaskState) erro
533533
input.ExpressionAttributeValues[":t"] = &types.AttributeValueMemberN{
534534
Value: fmt.Sprintf("%d", taskState.TTL),
535535
}
536-
input.UpdateExpression = aws.String(aws.StringValue(input.UpdateExpression) + ", #T = :t")
536+
input.UpdateExpression = aws.String(*input.UpdateExpression + ", #T = :t")
537537
}
538538

539539
_, err := b.client.UpdateItem(context.TODO(), input)

v2/brokers/amqp/amqp.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"bytes"
55
"context"
66
"encoding/json"
7+
"errors"
78
"fmt"
89
"sync"
910
"time"
@@ -14,7 +15,6 @@ import (
1415
"github.com/RichardKnop/machinery/v2/config"
1516
"github.com/RichardKnop/machinery/v2/log"
1617
"github.com/RichardKnop/machinery/v2/tasks"
17-
"github.com/pkg/errors"
1818
amqp "github.com/rabbitmq/amqp091-go"
1919
)
2020

@@ -142,7 +142,7 @@ func (b *Broker) GetOrOpenConnection(queueName string, queueBindingKey string, e
142142
queueBindingArgs, // queue binding args
143143
)
144144
if err != nil {
145-
return nil, errors.Wrapf(err, "Failed to connect to queue %s", queueName)
145+
return nil, fmt.Errorf("Failed to connect to queue %s: %s", queueName, err)
146146
}
147147

148148
// Reconnect to the channel if it disconnects/errors out
@@ -218,7 +218,7 @@ func (b *Broker) Publish(ctx context.Context, signature *tasks.Signature) error
218218
amqp.Table(b.GetConfig().AMQP.QueueBindingArgs), // queue binding args
219219
)
220220
if err != nil {
221-
return errors.Wrapf(err, "Failed to get a connection for queue %s", queue)
221+
return fmt.Errorf("Failed to get a connection for queue %s: %w", queue, err)
222222
}
223223

224224
channel := connection.channel
@@ -237,7 +237,7 @@ func (b *Broker) Publish(ctx context.Context, signature *tasks.Signature) error
237237
DeliveryMode: amqp.Persistent,
238238
},
239239
); err != nil {
240-
return errors.Wrap(err, "Failed to publish task")
240+
return fmt.Errorf("Failed to publish task: %w", err)
241241
}
242242

243243
confirmed := <-confirmsChan
@@ -483,13 +483,13 @@ func (b *Broker) GetPendingTasks(queue string) ([]*tasks.Signature, error) {
483483
amqp.Table(b.GetConfig().AMQP.QueueBindingArgs), // queue binding args
484484
)
485485
if err != nil {
486-
return nil, errors.Wrapf(err, "Failed to get a connection for queue %s", queue)
486+
return nil, fmt.Errorf("Failed to get a connection for queue %s: %w", queue, err)
487487
}
488488

489489
channel := conn.channel
490490
queueInfo, err := channel.QueueInspect(queue)
491491
if err != nil {
492-
return nil, errors.Wrapf(err, "Failed to get info for queue %s", queue)
492+
return nil, fmt.Errorf("Failed to get info for queue %s: %w", queue, err)
493493
}
494494

495495
var tag uint64
@@ -499,7 +499,7 @@ func (b *Broker) GetPendingTasks(queue string) ([]*tasks.Signature, error) {
499499
for i := 0; i < queueInfo.Messages; i++ {
500500
d, _, err := channel.Get(queue, false)
501501
if err != nil {
502-
return nil, errors.Wrap(err, "Failed to get from queue")
502+
return nil, fmt.Errorf("Failed to get from queue: %w", err)
503503
}
504504
tag = d.DeliveryTag
505505
b.consumeOne(d, dumper, false)

v2/brokers/sqs/sqs.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ import (
2020
awsconfig "github.com/aws/aws-sdk-go-v2/config"
2121
"github.com/aws/aws-sdk-go-v2/service/sqs"
2222
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
23-
"github.com/aws/aws-sdk-go/aws/awsutil"
24-
"github.com/aws/aws-sdk-go/aws/session"
2523
)
2624

2725
const (
@@ -35,7 +33,6 @@ type Broker struct {
3533
processingWG sync.WaitGroup // use wait group to make sure task processing completes on interrupt signal
3634
receivingWG sync.WaitGroup
3735
stopReceivingChan chan int
38-
sess *session.Session
3936
service sqsiface.API
4037
queueUrl *string
4138
}
@@ -198,7 +195,7 @@ func (b *Broker) consume(deliveries <-chan *sqs.ReceiveMessageOutput, concurrenc
198195
func (b *Broker) consumeOne(delivery *sqs.ReceiveMessageOutput, taskProcessor iface.TaskProcessor) error {
199196
if len(delivery.Messages) == 0 {
200197
log.ERROR.Printf("received an empty message, the delivery was %v", delivery)
201-
return errors.New("received empty message, the delivery is " + awsutil.Prettify(delivery))
198+
return fmt.Errorf("received empty message, the delivery is %v", delivery)
202199
}
203200

204201
if b.GetConfig().SQS.VisibilityHeartBeat {

v2/brokers/sqs/sqs_export_test.go

Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
package sqs
22

33
import (
4+
"context"
45
"encoding/json"
56
"errors"
67
"fmt"
7-
sqsiface "github.com/RichardKnop/machinery/v2/brokers/iface/sqs"
8-
"github.com/aws/aws-sdk-go-v2/service/sqs"
98
"os"
109
"sync"
1110

11+
sqsiface "github.com/RichardKnop/machinery/v2/brokers/iface/sqs"
12+
1213
"github.com/RichardKnop/machinery/v2/brokers/iface"
1314
"github.com/RichardKnop/machinery/v2/common"
1415
"github.com/RichardKnop/machinery/v2/config"
15-
"github.com/aws/aws-sdk-go/aws"
16-
"github.com/aws/aws-sdk-go/aws/session"
17-
awssqs "github.com/aws/aws-sdk-go/service/sqs"
18-
"github.com/aws/aws-sdk-go/service/sqs/sqsiface"
16+
"github.com/aws/aws-sdk-go-v2/aws"
17+
awssqs "github.com/aws/aws-sdk-go-v2/service/sqs"
18+
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
1919
)
2020

2121
var (
@@ -26,7 +26,7 @@ type FakeSQS struct {
2626
sqsiface.API
2727
}
2828

29-
func (f *FakeSQS) SendMessage(*awssqs.SendMessageInput) (*awssqs.SendMessageOutput, error) {
29+
func (f *FakeSQS) SendMessage(context.Context, *awssqs.SendMessageInput, ...func(*awssqs.Options)) (*awssqs.SendMessageOutput, error) {
3030
output := awssqs.SendMessageOutput{
3131
MD5OfMessageAttributes: aws.String("d25a6aea97eb8f585bfa92d314504a92"),
3232
MD5OfMessageBody: aws.String("bbdc5fdb8be7251f5c910905db994bab"),
@@ -35,29 +35,29 @@ func (f *FakeSQS) SendMessage(*awssqs.SendMessageInput) (*awssqs.SendMessageOutp
3535
return &output, nil
3636
}
3737

38-
func (f *FakeSQS) ReceiveMessage(*awssqs.ReceiveMessageInput) (*awssqs.ReceiveMessageOutput, error) {
38+
func (f *FakeSQS) ReceiveMessage(context.Context, *awssqs.ReceiveMessageInput, ...func(*awssqs.Options)) (*awssqs.ReceiveMessageOutput, error) {
3939
return ReceiveMessageOutput, nil
4040
}
4141

42-
func (f *FakeSQS) DeleteMessage(*awssqs.DeleteMessageInput) (*awssqs.DeleteMessageOutput, error) {
42+
func (f *FakeSQS) DeleteMessage(context.Context, *awssqs.DeleteMessageInput, ...func(*awssqs.Options)) (*awssqs.DeleteMessageOutput, error) {
4343
return &awssqs.DeleteMessageOutput{}, nil
4444
}
4545

4646
type ErrorSQS struct {
4747
sqsiface.API
4848
}
4949

50-
func (e *ErrorSQS) SendMessage(*sqs.SendMessageInput) (*awssqs.SendMessageOutput, error) {
50+
func (e *ErrorSQS) SendMessage(context.Context, *awssqs.SendMessageInput, ...func(*awssqs.Options)) (*awssqs.SendMessageOutput, error) {
5151
err := errors.New("this is an error")
5252
return nil, err
5353
}
5454

55-
func (e *ErrorSQS) ReceiveMessage(*sqs.ReceiveMessageInput) (*awssqs.ReceiveMessageOutput, error) {
55+
func (e *ErrorSQS) ReceiveMessage(context.Context, *awssqs.ReceiveMessageInput, ...func(*awssqs.Options)) (*awssqs.ReceiveMessageOutput, error) {
5656
err := errors.New("this is an error")
5757
return nil, err
5858
}
5959

60-
func (e *ErrorSQS) DeleteMessage(*sqs.DeleteMessageInput) (*awssqs.DeleteMessageOutput, error) {
60+
func (e *ErrorSQS) DeleteMessage(context.Context, *awssqs.DeleteMessageInput, ...func(*awssqs.Options)) (*awssqs.DeleteMessageOutput, error) {
6161
err := errors.New("this is an error")
6262
return nil, err
6363
}
@@ -66,15 +66,15 @@ func init() {
6666
// TODO: chang message body to signature example
6767
messageBody, _ := json.Marshal(map[string]int{"apple": 5, "lettuce": 7})
6868
ReceiveMessageOutput = &awssqs.ReceiveMessageOutput{
69-
Messages: []*awssqs.Message{
69+
Messages: []types.Message{
7070
{
71-
Attributes: map[string]*string{
72-
"SentTimestamp": aws.String("1512962021537"),
71+
Attributes: map[string]string{
72+
"SentTimestamp": "1512962021537",
7373
},
7474
Body: aws.String(string(messageBody)),
7575
MD5OfBody: aws.String("bbdc5fdb8be7251f5c910905db994bab"),
7676
MD5OfMessageAttributes: aws.String("d25a6aea97eb8f585bfa92d314504a92"),
77-
MessageAttributes: map[string]*awssqs.MessageAttributeValue{
77+
MessageAttributes: map[string]types.MessageAttributeValue{
7878
"Title": {
7979
DataType: aws.String("String"),
8080
StringValue: aws.String("The Whistler"),
@@ -115,18 +115,13 @@ func NewTestConfig() *config.Config {
115115

116116
func NewTestBroker(cnf *config.Config) *Broker {
117117

118-
sess := session.Must(session.NewSessionWithOptions(session.Options{
119-
SharedConfigState: session.SharedConfigEnable,
120-
}))
121-
122118
var svc sqsiface.API = new(FakeSQS)
123119

124120
if cnf.SQS.Client != nil {
125121
svc = cnf.SQS.Client
126122
}
127123
return &Broker{
128124
Broker: common.NewBroker(cnf),
129-
sess: sess,
130125
service: svc,
131126
processingWG: sync.WaitGroup{},
132127
receivingWG: sync.WaitGroup{},
@@ -137,50 +132,46 @@ func NewTestBroker(cnf *config.Config) *Broker {
137132
func NewTestErrorBroker() *Broker {
138133

139134
cnf := NewTestConfig()
140-
sess := session.Must(session.NewSessionWithOptions(session.Options{
141-
SharedConfigState: session.SharedConfigEnable,
142-
}))
143135

144136
errSvc := new(ErrorSQS)
145137
return &Broker{
146138
Broker: common.NewBroker(cnf),
147-
sess: sess,
148139
service: errSvc,
149140
processingWG: sync.WaitGroup{},
150141
receivingWG: sync.WaitGroup{},
151142
stopReceivingChan: make(chan int),
152143
}
153144
}
154145

155-
func (b *Broker) ConsumeForTest(deliveries <-chan *sqs.ReceiveMessageOutput, concurrency int, taskProcessor iface.TaskProcessor, pool chan struct{}) error {
146+
func (b *Broker) ConsumeForTest(deliveries <-chan *awssqs.ReceiveMessageOutput, concurrency int, taskProcessor iface.TaskProcessor, pool chan struct{}) error {
156147
return b.consume(deliveries, concurrency, taskProcessor, pool)
157148
}
158149

159-
func (b *Broker) ConsumeOneForTest(delivery *sqs.ReceiveMessageOutput, taskProcessor iface.TaskProcessor) error {
150+
func (b *Broker) ConsumeOneForTest(delivery *awssqs.ReceiveMessageOutput, taskProcessor iface.TaskProcessor) error {
160151
return b.consumeOne(delivery, taskProcessor)
161152
}
162153

163-
func (b *Broker) DeleteOneForTest(delivery *sqs.ReceiveMessageOutput) error {
154+
func (b *Broker) DeleteOneForTest(delivery *awssqs.ReceiveMessageOutput) error {
164155
return b.deleteOne(delivery)
165156
}
166157

167158
func (b *Broker) DefaultQueueURLForTest() *string {
168159
return b.defaultQueueURL()
169160
}
170161

171-
func (b *Broker) ReceiveMessageForTest(qURL *string) (*sqs.ReceiveMessageOutput, error) {
162+
func (b *Broker) ReceiveMessageForTest(qURL *string) (*awssqs.ReceiveMessageOutput, error) {
172163
return b.receiveMessage(qURL)
173164
}
174165

175166
func (b *Broker) InitializePoolForTest(pool chan struct{}, concurrency int) {
176167
b.initializePool(pool, concurrency)
177168
}
178169

179-
func (b *Broker) ConsumeDeliveriesForTest(deliveries <-chan *sqs.ReceiveMessageOutput, concurrency int, taskProcessor iface.TaskProcessor, pool chan struct{}, errorsChan chan error) (bool, error) {
170+
func (b *Broker) ConsumeDeliveriesForTest(deliveries <-chan *awssqs.ReceiveMessageOutput, concurrency int, taskProcessor iface.TaskProcessor, pool chan struct{}, errorsChan chan error) (bool, error) {
180171
return b.consumeDeliveries(deliveries, concurrency, taskProcessor, pool, errorsChan)
181172
}
182173

183-
func (b *Broker) ContinueReceivingMessagesForTest(qURL *string, deliveries chan *sqs.ReceiveMessageOutput) (bool, error) {
174+
func (b *Broker) ContinueReceivingMessagesForTest(qURL *string, deliveries chan *awssqs.ReceiveMessageOutput) (bool, error) {
184175
return b.continueReceivingMessages(qURL, deliveries)
185176
}
186177

0 commit comments

Comments
 (0)