Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade golang and remove dingo #17

Merged
merged 38 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
426d7b3
TRAF-1451 - Provide homing-pigeon with a Pub/Sub ack service
paupm Jan 27, 2022
a01d9d7
Improve naming and format
paupm Jan 28, 2022
0558aa0
Improve naming
paupm Jan 28, 2022
4d65df5
Improve proto naming
paupm Jan 28, 2022
c9813d0
Change ENV var in docker-compose
paupm Jan 28, 2022
d8ce524
TRAF-1451 - Add ACK broker and remove dingo
paupm Jan 31, 2022
ed70f1c
update go mod
paupm Jan 31, 2022
a6d60f8
Remove ack broker client (example)
paupm Jan 31, 2022
690ee53
grpc.withinsecure is deprecated
paupm Jan 31, 2022
69ecaa6
Fix unhandled error
paupm Jan 31, 2022
b8aada1
Remove services container
paupm Jan 31, 2022
a8bd165
Skeleton to add new adapters
paupm Feb 1, 2022
ae355fa
Rename broker address to broker port
paupm Feb 1, 2022
b812d6e
Add ENV variables to choose between adapters
paupm Feb 1, 2022
32b3184
Broker middleware
paupm Feb 7, 2022
d4d93bd
Dummy implementation when no adatper is defined
paupm Feb 7, 2022
e789507
Merge branch 'master' of github.com:softonic/homing-pigeon into TRAF-…
paupm May 19, 2023
a7a0ea9
feat: update Golang to 1.17 and remove Dingo
paupm Jun 15, 2023
ed488b2
feat: update imports
paupm Jun 16, 2023
cdfac6b
feat: try to fix linter
paupm Jun 16, 2023
83321f3
revert changes in ci.yml
paupm Jun 16, 2023
f28b9c3
change ci steps order
paupm Jun 16, 2023
4479d1b
revert ci.yaml
paupm Jun 16, 2023
b4dda4a
skip pkg cache
paupm Jun 16, 2023
7e616f8
try to fix pipeline
paupm Jun 28, 2023
5e030e2
revert skip pkg cache
paupm Jun 28, 2023
03250d9
upgrade golangci lint to v3
paupm Jun 28, 2023
fa50d06
upgrade action version
paupm Jun 28, 2023
0fc97d3
skipt build and pkg cache
paupm Jun 28, 2023
a456cb0
update insecure packages
paupm Jun 28, 2023
ebcc56b
revert to golangci-lint v2
paupm Apr 2, 2024
fb1949a
update to go 1.19
paupm Apr 3, 2024
9c37b19
upgrade golangci-lint
paupm Apr 3, 2024
5c2d783
revert to go 1.17
paupm Apr 3, 2024
9ffe7a4
use go 1.19
paupm Apr 3, 2024
ecc1e5d
try disabling package caching
paupm Apr 3, 2024
ea0f2a1
fix lint errors
paupm Apr 3, 2024
81f196a
revert socket name
paupm Apr 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ jobs:
test:
strategy:
matrix:
go-version: [1.13.x]
go-version: [1.19]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
GO111MODULE: on
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
# - name: Cache go modules
Expand All @@ -30,8 +30,9 @@ jobs:
sudo apt-get install -y protobuf-compiler
make build
- name: Lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v4
with:
version: v1.29
version: v1.54
skip-pkg-cache: true
- name: Test
run: go test -v -race ./...
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@
*.out

# Ignore generated files
pkg/generatedServices
bin
sockets
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.13-buster AS build
FROM golang:1.19-buster AS build

RUN apt-get update \
&& apt-get install -y protobuf-compiler
Expand Down
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ generate-proto:
protoc -I proto/ proto/middleware.proto --go_out=plugins=grpc:proto
dep:
go get -u github.com/rakyll/gotest
go get -u github.com/sarulabs/dingo/dingo
go get -u github.com/vektra/mockery/.../
go get -u github.com/golang/protobuf/proto
go get -u github.com/golang/protobuf/protoc-gen-go
go install github.com/golang/protobuf/protoc-gen-go@v1.3.2
go get -u google.golang.org/grpc
go mod download
build: dep generate-proto
dingo -src="./pkg/services" -dest="./pkg/generatedServices"
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags="-w -s" -o bin/homing-pigeon pkg/main.go
stress-build: dep generate-proto
dingo -src="./pkg/services" -dest="./pkg/generatedServices"
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags="-w -s" -o bin/stress-pigeon pkg/stress/main.go
docker-build:
docker build -t softonic/homing-pigeon:${TAG} .
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ In order to start up correctly, it needs well defined environment variables:

##### Core

| Name | Value |
| ------------------------------------ | -------------------------------------------------------------------------- |
| MESSAGE_BUFFER_LENGTH | Buffer length for internal golang channel used for messaging |
| ACK_BUFFER_LENGTH | Buffer length for internal golang channel used for acks |
| MIDDLEWARES_SOCKET | Socket to connect to middlewares. Ex: passthrough:///unix://tmp/test.sock" |
| Name | Value |
|-----------------------|----------------------------------------------------------------------------|
| MESSAGE_BUFFER_LENGTH | Buffer length for internal golang channel used for messaging |
| ACK_BUFFER_LENGTH | Buffer length for internal golang channel used for acks |
| MIDDLEWARES_SOCKET | Socket to connect to middlewares. Ex: passthrough:///unix://tmp/test.sock" |
| READ_ADAPTER | Read interface implementation. Default: AMQP |
| WRITE_ADAPTER | Write interface implementation. Default: ELASTIC |

##### Read Adapters

Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ services:
GRPC_GO_LOG_VERBOSITY_LEVEL: 99
GRPC_GO_LOG_SEVERITY_LEVEL: info
MIDDLEWARES_SOCKET: "passthrough:///unix:///tmp/hp"
READ_ADAPTER: "AMQP"
WRITE_ADAPTER: "ELASTIC"
hp-middleware-pass:
volumes:
- ./sockets:/tmp
Expand Down
39 changes: 19 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@ module github.com/softonic/homing-pigeon

require (
github.com/elastic/go-elasticsearch/v7 v7.10.0
github.com/gobuffalo/envy v1.9.0 // indirect
github.com/gobuffalo/packd v1.0.0 // indirect
github.com/gobuffalo/packr v1.30.1 // indirect
github.com/golang/protobuf v1.4.3
github.com/golangci/golangci-lint v1.33.0 // indirect
github.com/rakyll/gotest v0.0.5 // indirect
github.com/rogpeppe/go-internal v1.6.2 // indirect
github.com/sarulabs/dingo v2.0.0+incompatible
github.com/golang/protobuf v1.5.2
github.com/streadway/amqp v1.0.0
github.com/stretchr/objx v0.3.0 // indirect
github.com/stretchr/testify v1.6.1
github.com/vektra/mockery v1.1.2 // indirect
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b // indirect
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 // indirect
golang.org/x/text v0.3.4 // indirect
golang.org/x/tools v0.0.0-20201121010211-780cb80bd7fb // indirect
google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4 // indirect
google.golang.org/grpc v1.33.2
google.golang.org/protobuf v1.25.0
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
github.com/stretchr/testify v1.7.0
google.golang.org/grpc v1.44.0
google.golang.org/protobuf v1.27.1
k8s.io/klog v1.0.0
)

go 1.13
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.3.0 // indirect
golang.org/x/net v0.0.0-20220225143137-f80d34dcf065 // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
golang.org/x/text v0.3.8 // indirect
google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)

go 1.19
Loading
Loading