Skip to content

Commit 297354a

Browse files
authored
Remove tools from tools.go (#47)
Remove protoc-gen-doc, afero from tools.go as these pull in old versions of protobuf leading to ambiguous import errors. Upgrade protoc-gen-validate for the same reason. Also add .gitattributes for go.sum management. And dependabot.yaml to manage actions Add govulncheck AB#10624 Signed-off-by: Paul Hewlett <[email protected]>
1 parent 8ad882c commit 297354a

File tree

7 files changed

+83
-116
lines changed

7 files changed

+83
-116
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
**/go.sum -diff -merge
2+
**/go.sum linguist-generated=true

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# refer: https://github.com/dependabot/dependabot-core/blob/main/.github/dependabot.yml
2+
version: 2
3+
updates:
4+
# Maintain dependencies for GitHub Actions
5+
- package-ecosystem: "github-actions"
6+
directory: "/"
7+
schedule:
8+
interval: "weekly"
9+
day: "wednesday"
10+
time: "03:00"
11+
timezone: "Europe/London"

.github/workflows/ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup Go
1919
uses: actions/setup-go@v4
2020
with:
21-
go-version: '1.22.x'
21+
go-version: '1.23.x'
2222
token: ${{ secrets.GITHUB_TOKEN }}
2323
cache-dependency-path: |
2424
datatrails-common-api/go.sum
@@ -27,10 +27,19 @@ jobs:
2727
with:
2828
version: "24.3"
2929
repo-token: ${{ secrets.GITHUB_TOKEN }}
30+
- name: Setup protoc-gen-doc
31+
run: |
32+
go install github.com/pseudomuto/protoc-gen-doc/cmd/[email protected]
33+
3034
- name: Generate, Test and Export
3135
run: |
3236
task all
3337
38+
- name: Vulnerability check
39+
run: |
40+
cd datatrails-common-api
41+
go run golang.org/x/vuln/cmd/govulncheck@latest -show verbose ./...
42+
3443
- name: Show exports
3544
working-directory: exported/
3645
run: find . -type d

datatrails-common-api/go.mod

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,40 @@ module github.com/datatrails/go-datatrails-common-api-gen
33
// Note: the go code is hosted in github.com/datatrails/go-datatrails-common-api-gen
44
// hence the module name
55

6-
go 1.22
6+
go 1.23.0
77

88
// This allows this module to operate as tho it were the generated module. This
99
// allows us to manage the proto tool dependencies via this go.mod. This go.mod
1010
// is also used as the go.mod for the generated package.
1111
// replace github.com/datatrails/go-datatrails-common-api-gen => ./
1212

1313
require (
14-
github.com/datatrails/go-datatrails-common v0.18.1
15-
github.com/envoyproxy/protoc-gen-validate v1.0.4
14+
github.com/datatrails/go-datatrails-common v0.28.0
15+
github.com/envoyproxy/protoc-gen-validate v1.2.1
1616
github.com/google/uuid v1.6.0
17-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0
18-
github.com/lyft/protoc-gen-star/v2 v2.0.3
19-
github.com/pseudomuto/protoc-gen-doc v1.5.1
20-
github.com/spf13/afero v1.10.0
21-
github.com/stretchr/testify v1.9.0
22-
go.mongodb.org/mongo-driver v1.12.1
23-
google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094
24-
google.golang.org/grpc v1.65.0
17+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0
18+
github.com/lyft/protoc-gen-star/v2 v2.0.4-0.20230330145011-496ad1ac90a4
19+
github.com/stretchr/testify v1.10.0
20+
go.mongodb.org/mongo-driver v1.17.3
21+
google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422
22+
google.golang.org/grpc v1.71.1
2523
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0
26-
google.golang.org/protobuf v1.34.2
24+
google.golang.org/protobuf v1.36.6
2725
gopkg.in/yaml.v3 v3.0.1
2826
)
2927

3028
require (
31-
github.com/Masterminds/goutils v1.1.1 // indirect
32-
github.com/Masterminds/semver v1.5.0 // indirect
33-
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
3429
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
35-
github.com/gogo/protobuf v1.3.2 // indirect
36-
github.com/golang/protobuf v1.5.4 // indirect
37-
github.com/huandu/xstrings v1.4.0 // indirect
3830
github.com/iancoleman/strcase v0.3.0 // indirect
39-
github.com/imdario/mergo v0.3.16 // indirect
40-
github.com/mitchellh/copystructure v1.2.0 // indirect
41-
github.com/mitchellh/reflectwalk v1.0.2 // indirect
42-
github.com/mwitkow/go-proto-validators v0.3.2 // indirect
43-
github.com/opentracing/opentracing-go v1.2.0 // indirect
4431
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
45-
github.com/pseudomuto/protokit v0.2.1 // indirect
4632
github.com/rogpeppe/go-internal v1.6.1 // indirect
33+
github.com/spf13/afero v1.10.0 // indirect
4734
go.uber.org/multierr v1.11.0 // indirect
4835
go.uber.org/zap v1.27.0 // indirect
49-
golang.org/x/crypto v0.25.0 // indirect
5036
golang.org/x/mod v0.17.0 // indirect
51-
golang.org/x/net v0.27.0 // indirect
52-
golang.org/x/sys v0.22.0 // indirect
53-
golang.org/x/text v0.16.0 // indirect
37+
golang.org/x/net v0.34.0 // indirect
38+
golang.org/x/sys v0.30.0 // indirect
39+
golang.org/x/text v0.22.0 // indirect
5440
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
55-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
41+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect
5642
)

0 commit comments

Comments
 (0)