Skip to content

Commit 293b68a

Browse files
committed
Upgrade Go to 1.24.11
- Update Go version from 1.19 to 1.24.11 - Update Alpine base image from 3.18.5 to 3.21 - CI workflow update (Consul 1.8.3 → 1.22.2) - go:embed instead of go-bindata - Native go build instead of gox - Update major dependencies: - aws-sdk-go: v1.34.5 -> v1.55.8 - sentry-go: v0.14.0 -> v0.40.0 - consul/api: v1.4.0 -> v1.32.0 - consul/sdk: v0.4.0 -> v0.16.1 - golang.org/x/sys, golang.org/x/text, and others - Fix InitConsulLock to properly parse URL schemes for new consul/api - Fix test compatibility with updated dependencies - Fix Makefile sed command for macOS compatibility
1 parent 7b41e72 commit 293b68a

11 files changed

Lines changed: 185 additions & 191 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: Compile & Test
1313
strategy:
1414
matrix:
15-
go-version: [1.19.2]
15+
go-version: [1.24.11]
1616
os: [ubuntu-latest]
1717
runs-on: ${{ matrix.os }}
1818

@@ -26,8 +26,8 @@ jobs:
2626
run: |
2727
mkdir /tmp/consul
2828
cd /tmp/consul
29-
wget https://releases.hashicorp.com/consul/1.8.3/consul_1.8.3_linux_amd64.zip
30-
unzip consul_1.8.3_linux_amd64.zip
29+
wget https://releases.hashicorp.com/consul/1.22.2/consul_1.22.2_linux_amd64.zip
30+
unzip consul_1.22.2_linux_amd64.zip
3131
chmod +x consul
3232
3333
- name: Checkout code

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.18.5
1+
FROM alpine:3.21
22

33
LABEL maintainer="Snowplow Analytics <support@snowplow.io>"
44

Makefile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ coverage_html = $(coverage_dir)/coverage.html
2828

2929
generated_dir = $(build_dir)/generated
3030
generated_schema = $(generated_dir)/schema_generated.go
31-
generated_data = $(generated_dir)/data_generated.go
3231

3332
merge_src_dir = $(build_dir)/src
3433
output_dir = $(build_dir)/bin
@@ -45,8 +44,6 @@ bin_windows = $(windows_dir)/$(bin_name)
4544

4645
container_name = snowplow/$(bin_name)
4746

48-
gox = "github.com/mitchellh/gox"
49-
5047
# -----------------------------------------------------------------------------
5148
# BUILDING
5249
# -----------------------------------------------------------------------------
@@ -61,6 +58,7 @@ $(merge_log): $(depend_log)
6158
cp $(shell find $(generated_dir) -maxdepth 5 -name "*.go") $(merge_src_dir)
6259
cp $(filter-out $(go_test_files), $(shell find $(src_dir) -maxdepth 5 -name "*.go")) $(merge_src_dir)
6360
cp $(shell find $(src_dir) -maxdepth 5 -name "*_test.go") $(merge_src_dir)
61+
cp -r $(avro_dir) $(merge_src_dir)/
6462

6563
go get -t ./$(merge_src_dir)
6664

@@ -70,16 +68,15 @@ $(build_log): cli-linux cli-darwin cli-windows
7068
@echo Build success at: `/bin/date "+%Y-%m-%d---%H-%M-%S"` >> $(build_log);
7169

7270
cli-linux: $(merge_log)
73-
CGO_ENABLED=0 go run $(gox) -osarch=linux/amd64 -output=$(bin_linux) ./$(merge_src_dir)
71+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o $(bin_linux) ./$(merge_src_dir)
7472
zip -rj $(output_dir)/dataflow_runner_$(version)_linux_amd64.zip $(bin_linux)
7573

7674
cli-darwin: $(merge_log)
77-
CGO_ENABLED=0 go run $(gox) -osarch=darwin/amd64 -output=$(bin_darwin) ./$(merge_src_dir)
75+
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o $(bin_darwin) ./$(merge_src_dir)
7876
zip -rj $(output_dir)/dataflow_runner_$(version)_darwin_amd64.zip $(bin_darwin)
7977

8078
cli-windows: $(merge_log)
81-
go get github.com/konsorten/go-windows-terminal-sequences || true
82-
CGO_ENABLED=0 go run $(gox) -osarch=windows/amd64 -output=$(bin_windows) ./$(merge_src_dir)
79+
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o $(bin_windows).exe ./$(merge_src_dir)
8380
zip -rj $(output_dir)/dataflow_runner_$(version)_windows_amd64.zip $(bin_windows).exe
8481

8582
docker-build: cli-linux
@@ -115,7 +112,7 @@ test: $(merge_log)
115112

116113
grep -v 'data_generated.go\|schema_generated.go' $(coverage_out) > $(coverage_out)2
117114
mv $(coverage_out)2 $(coverage_out)
118-
sed -i 's/github.com\/snowplow\/dataflow-runner\/build/github.com\/snowplow\/dataflow-runner/g' $(coverage_out)
115+
sed 's/github.com\/snowplow\/dataflow-runner\/build/github.com\/snowplow\/dataflow-runner/g' $(coverage_out) > $(coverage_out).tmp && mv $(coverage_out).tmp $(coverage_out)
119116

120117
go tool cover -html=$(coverage_out) -o $(coverage_html)
121118

@@ -139,6 +136,5 @@ $(depend_log):
139136
wget -N $(codegen_link) -O $(codegen)
140137

141138
go run $(codegen) --schema $(cluster_avsc) --schema $(playbook_avsc) --out $(generated_schema)
142-
go run github.com/go-bindata/go-bindata/go-bindata -o $(generated_data) $(avro_dir)
143139

144140
@echo Dependencies generated at: `/bin/date "+%Y-%m-%d---%H-%M-%S"` >> $(depend_log);

go.mod

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,47 @@
11
module github.com/snowplow/dataflow-runner
22

3-
go 1.19
3+
go 1.24.11
44

55
require (
6-
github.com/aws/aws-sdk-go v1.34.5
6+
github.com/aws/aws-sdk-go v1.55.8
77
github.com/elodina/go-avro v0.0.0-20160406082632-0c8185d9a3ba
8-
github.com/getsentry/sentry-go v0.14.0
9-
github.com/hashicorp/consul/api v1.4.0
10-
github.com/hashicorp/consul/sdk v0.4.0
11-
github.com/hashicorp/errwrap v1.0.0
12-
github.com/sirupsen/logrus v1.9.0
13-
github.com/stretchr/testify v1.7.0
8+
github.com/getsentry/sentry-go v0.40.0
9+
github.com/hashicorp/consul/api v1.32.0
10+
github.com/hashicorp/consul/sdk v0.16.1
11+
github.com/hashicorp/errwrap v1.1.0
12+
github.com/sirupsen/logrus v1.9.3
13+
github.com/stretchr/testify v1.8.4
1414
gopkg.in/urfave/cli.v1 v1.20.0
1515
)
1616

17-
require golang.org/x/text v0.3.7 // indirect
17+
require (
18+
github.com/hashicorp/go-multierror v1.1.1 // indirect
19+
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect
20+
golang.org/x/net v0.48.0 // indirect
21+
golang.org/x/text v0.33.0 // indirect
22+
)
1823

1924
require (
20-
github.com/armon/go-metrics v0.3.4 // indirect
21-
github.com/davecgh/go-spew v1.1.1 // indirect
22-
github.com/fatih/color v1.9.0 // indirect
23-
github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect
24-
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
25-
github.com/hashicorp/go-hclog v0.14.1 // indirect
26-
github.com/hashicorp/go-immutable-radix v1.2.0 // indirect
25+
github.com/armon/go-metrics v0.4.1 // indirect
26+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
27+
github.com/fatih/color v1.16.0 // indirect
28+
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
29+
github.com/hashicorp/go-hclog v1.5.0 // indirect
30+
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
2731
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
28-
github.com/hashicorp/go-uuid v1.0.2 // indirect
29-
github.com/hashicorp/go-version v1.4.0 // indirect
32+
github.com/hashicorp/go-uuid v1.0.3 // indirect
33+
github.com/hashicorp/go-version v1.8.0 // indirect
3034
github.com/hashicorp/golang-lru v0.5.4 // indirect
31-
github.com/hashicorp/serf v0.9.4 // indirect
32-
github.com/jmespath/go-jmespath v0.3.0 // indirect
33-
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
34-
github.com/mattn/go-colorable v0.1.13 // indirect
35-
github.com/mattn/go-isatty v0.0.16 // indirect
35+
github.com/hashicorp/serf v0.10.1 // indirect
36+
github.com/jmespath/go-jmespath v0.4.0 // indirect
37+
github.com/mattn/go-colorable v0.1.14 // indirect
38+
github.com/mattn/go-isatty v0.0.20 // indirect
3639
github.com/mitchellh/go-homedir v1.1.0 // indirect
37-
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
38-
github.com/mitchellh/gox v1.0.1 // indirect
39-
github.com/mitchellh/iochan v1.0.0 // indirect
40-
github.com/mitchellh/mapstructure v1.3.3 // indirect
40+
github.com/mitchellh/mapstructure v1.5.0 // indirect
4141
github.com/pkg/errors v0.9.1 // indirect
42-
github.com/pmezard/go-difflib v1.0.0 // indirect
42+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
4343
github.com/snowplow-devops/go-retry v0.0.0-20210106090855-8989bbdbae1c
44-
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect
45-
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec // indirect
46-
golang.org/x/tools v0.1.0 // indirect
44+
golang.org/x/sys v0.40.0 // indirect
4745
gopkg.in/yaml.v2 v2.4.0 // indirect
4846
gopkg.in/yaml.v3 v3.0.1 // indirect
4947
)

0 commit comments

Comments
 (0)