Skip to content

Commit d9bd8cc

Browse files
authored
Merge pull request #678 from cego/bump-versions
Bump versions
2 parents 4b88c7c + 882b581 commit d9bd8cc

40 files changed

Lines changed: 10661 additions & 11419 deletions

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ updates:
33
- package-ecosystem: "gomod"
44
directory: "/"
55
schedule:
6-
interval: "weekly"
6+
interval: "monthly"
77
- package-ecosystem: "npm"
88
directory: "/webapp/"
99
schedule:
10-
interval: "weekly"
10+
interval: "monthly"

.github/workflows/gofmt.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616

17-
- name: Set up Go 1.23
17+
- name: Set up Go
1818
uses: actions/setup-go@v4
1919
with:
20-
go-version: 1.23
20+
go-version: 1.25
2121
id: go
2222

2323
- name: Check out code into the Go module directory
@@ -26,9 +26,9 @@ jobs:
2626
- uses: actions/cache@v3
2727
with:
2828
path: ~/go/pkg/mod
29-
key: ${{ runner.os }}-gofmt1.23-${{ hashFiles('**/go.sum') }}
29+
key: ${{ runner.os }}-gofmt1.25-${{ hashFiles('**/go.sum') }}
3030
restore-keys: |
31-
${{ runner.os }}-gofmt1.23-
31+
${{ runner.os }}-gofmt1.25-
3232
3333
- name: gofmt
3434
run: |

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
name: Build Linux All
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Set up Go 1.23
14+
- name: Set up Go
1515
uses: actions/setup-go@v4
1616
with:
17-
go-version: 1.23
17+
go-version: 1.25
1818

1919
- name: Checkout code
2020
uses: actions/checkout@v4

.github/workflows/test.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020

21-
- name: Set up Go 1.23
21+
- name: Set up Go
2222
uses: actions/setup-go@v4
2323
with:
24-
go-version: 1.23
24+
go-version: 1.25
2525
id: go
2626

2727
- name: Check out code into the Go module directory
@@ -30,12 +30,21 @@ jobs:
3030
- uses: actions/cache@v3
3131
with:
3232
path: ~/go/pkg/mod
33-
key: ${{ runner.os }}-go1.23-${{ hashFiles('**/go.sum') }}
33+
key: ${{ runner.os }}-go1.25-${{ hashFiles('**/go.sum') }}
3434
restore-keys: |
35-
${{ runner.os }}-go1.23-
35+
${{ runner.os }}-go1.25-
36+
37+
- name: Checking go mod tidy
38+
run: |
39+
go mod tidy -diff
3640
3741
- name: Build
3842
run: make all -B
3943

4044
- name: Test
4145
run: make test
46+
47+
- name: Check for uncommitted changes
48+
run: |
49+
err_msg="Changes found!!! Run 'make all -B' and commit changes"
50+
git -c color.ui=always diff --exit-code || (>&2 echo "${err_msg}" && exit 1)

Makefile

Lines changed: 61 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ release: $(ALL:%=build/nebula-provisioner-%.tar.gz)
2525

2626
release-linux: $(ALL_LINUX:%=build/nebula-provisioner-%.tar.gz)
2727

28-
build/%/server: webapp .FORCE
28+
build/%/server: generate webapp .FORCE
2929
CGO_ENABLED=0 \
3030
GOOS=$(firstword $(subst -, , $*)) \
3131
GOARCH=$(word 2, $(subst -, ,$*)) $(GOENV) \
@@ -46,7 +46,7 @@ build/%/agent: .FORCE
4646
build/nebula-provisioner-%.tar.gz: build/%/server build/%/server-client build/%/agent
4747
tar -zcv -C build/$* -f $@ server server-client agent
4848

49-
bin: protocol server/store/store.pb.go server/graph/generated/generated.go webapp
49+
bin: generate webapp
5050
go build $(BUILD_ARGS) -ldflags "$(LDFLAGS)" $(BUILD_TAGS) -o ./bin/server${CMD_SUFFIX} ${CMD_PATH}/server
5151
go build $(BUILD_ARGS) -ldflags "$(LDFLAGS)" $(BUILD_TAGS) -o ./bin/server-client${CMD_SUFFIX} ${CMD_PATH}/server-client
5252
go build $(BUILD_ARGS) -ldflags "$(LDFLAGS)" $(BUILD_TAGS) -o ./bin/agent${CMD_SUFFIX} ${CMD_PATH}/agent
@@ -55,12 +55,6 @@ dev: BUILD_TAGS=-tags dev
5555
dev: LDFLAGS=-X github.com/cego/nebula-provisioner/webapp.Dir=$(CURDIR)/webapp/
5656
dev: bin
5757

58-
protocol: protocol/protocol.go protocol/models.proto protocol/agent-service.proto protocol/server-command.proto
59-
go generate protocol/protocol.go
60-
61-
server/store/store.pb.go: server/store/store.proto
62-
go generate server/store/store.go
63-
6458
fmt:
6559
go fmt ./...
6660

@@ -79,9 +73,65 @@ WEBAPP_FILES = $(shell find ./webapp/ -type f -name '*' | grep -vE 'webapp/(node
7973
webapp: ./webapp/ $(WEBAPP_DIRS) $(WEBAPP_FILES)
8074
$(MAKE) -C webapp build
8175

82-
server/graph/generated/generated.go: server/graph/schema.graphqls gqlgen.yml
83-
go generate server/graph/resolver.go
76+
.PHONY: generate
77+
generate: protoc-gen-go protoc-gen-go-grpc buf gqlgen
78+
$(BUF) generate
79+
$(GQLGEN) generate
80+
81+
## Location to install dependencies to
82+
LOCALBIN ?= $(shell pwd)/bin
83+
$(LOCALBIN):
84+
mkdir -p $(LOCALBIN)
85+
86+
## Tool Binaries
87+
BUF = $(LOCALBIN)/buf
88+
PROTOC_GEN_GO = $(LOCALBIN)/protoc-gen-go
89+
PROTOC_GEN_GO_GRPC = $(LOCALBIN)/protoc-gen-go-grpc
90+
GQLGEN = $(LOCALBIN)/gqlgen
91+
92+
## Tool Versions
93+
BUF_VERSION ?= v1.61.0
94+
PROTOC_GEN_GO_VERSION ?= v1.36.10
95+
PROTOC_GEN_GO_GRPC_VERSION ?= v1.6.0
96+
GQLGEN_VERSION ?= v0.17.84
97+
98+
.PHONY: buf
99+
buf: $(BUF) ## Download buf locally if necessary.
100+
$(BUF): $(LOCALBIN)
101+
$(call go-install-tool,$(BUF),github.com/bufbuild/buf/cmd/buf,$(BUF_VERSION))
102+
103+
.PHONY: protoc-gen-go
104+
protoc-gen-go: $(PROTOC_GEN_GO) ## Download protoc-gen-go locally if necessary.
105+
$(PROTOC_GEN_GO): $(LOCALBIN)
106+
$(call go-install-tool,$(PROTOC_GEN_GO),google.golang.org/protobuf/cmd/protoc-gen-go,$(PROTOC_GEN_GO_VERSION))
107+
108+
.PHONY: protoc-gen-go-grpc
109+
protoc-gen-go-grpc: $(PROTOC_GEN_GO_GRPC) ## Download protoc-gen-go-grpc locally if necessary.
110+
$(PROTOC_GEN_GO_GRPC): $(LOCALBIN)
111+
$(call go-install-tool,$(PROTOC_GEN_GO_GRPC),google.golang.org/grpc/cmd/protoc-gen-go-grpc,$(PROTOC_GEN_GO_GRPC_VERSION))
112+
113+
.PHONY: gqlgen
114+
gqlgen: $(GQLGEN) ## Download gqlgen locally if necessary.
115+
$(GQLGEN): $(LOCALBIN)
116+
$(call go-install-tool,$(GQLGEN),github.com/99designs/gqlgen,$(GQLGEN_VERSION))
117+
118+
119+
# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
120+
# $1 - target path with name of binary
121+
# $2 - package url which can be installed
122+
# $3 - specific version of package
123+
define go-install-tool
124+
@[ -f "$(1)-$(3)" ] || { \
125+
set -e; \
126+
package=$(2)@$(3) ;\
127+
echo "Downloading $${package}" ;\
128+
rm -f $(1) || true ;\
129+
GOBIN=$(LOCALBIN) go install $${package} ;\
130+
mv $(1) $(1)-$(3) ;\
131+
} ;\
132+
ln -sf $(1)-$(3) $(1)
133+
endef
84134

85135
.FORCE:
86-
.PHONY: test bin protocol dev
136+
.PHONY: test bin generate dev
87137
.DEFAULT_GOAL := bin

buf.gen.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
version: v2
3+
managed:
4+
enabled: true
5+
plugins:
6+
- local: ./bin/protoc-gen-go
7+
out: .
8+
opt: paths=source_relative
9+
- local: ./bin/protoc-gen-go-grpc
10+
out: .
11+
opt:
12+
- paths=source_relative
13+
- require_unimplemented_servers=false

buf.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# For details on buf.yaml configuration, visit https://buf.build/docs/configuration/v2/buf-yaml
2+
version: v2
3+
lint:
4+
use:
5+
- STANDARD
6+
breaking:
7+
use:
8+
- FILE

go.mod

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,69 @@
11
module github.com/cego/nebula-provisioner
22

3-
go 1.23
4-
5-
toolchain go1.23.2
3+
go 1.25.4
64

75
require (
8-
github.com/99designs/gqlgen v0.17.55
6+
github.com/99designs/gqlgen v0.17.84
97
github.com/dgraph-io/badger/v3 v3.2103.5
108
github.com/gorilla/mux v1.8.1
119
github.com/gorilla/sessions v1.4.0
12-
github.com/hashicorp/vault v1.14.0
13-
github.com/jackpal/gateway v1.0.15
10+
github.com/jackpal/gateway v1.1.1
1411
github.com/jackpal/go-nat-pmp v1.0.2
1512
github.com/lafriks/go-spaproxy v0.2.0
1613
github.com/mitchellh/go-ps v1.0.0
14+
github.com/openbao/openbao/sdk/v2 v2.5.0
1715
github.com/pkg/errors v0.9.1
1816
github.com/sirupsen/logrus v1.9.3
19-
github.com/slackhq/nebula v1.9.4
20-
github.com/spf13/cobra v1.8.1
21-
github.com/vektah/gqlparser/v2 v2.5.18
22-
golang.org/x/crypto v0.28.0
23-
golang.org/x/oauth2 v0.23.0
24-
golang.org/x/tools v0.26.0
25-
google.golang.org/grpc v1.67.1
26-
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1
27-
google.golang.org/protobuf v1.35.1
17+
github.com/slackhq/nebula v1.9.7
18+
github.com/spf13/cobra v1.10.1
19+
github.com/vektah/gqlparser/v2 v2.5.31
20+
golang.org/x/crypto v0.45.0
21+
golang.org/x/oauth2 v0.33.0
22+
golang.org/x/tools v0.39.0
23+
google.golang.org/grpc v1.77.0
24+
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.0
25+
google.golang.org/protobuf v1.36.10
2826
gopkg.in/yaml.v3 v3.0.1
2927
)
3028

3129
require (
3230
dario.cat/mergo v1.0.1 // indirect
33-
github.com/agnivade/levenshtein v1.2.0 // indirect
31+
github.com/agnivade/levenshtein v1.2.1 // indirect
3432
github.com/cespare/xxhash v1.1.0 // indirect
3533
github.com/cespare/xxhash/v2 v2.3.0 // indirect
36-
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
3734
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
3835
github.com/dgraph-io/ristretto v0.2.0 // indirect
3936
github.com/dustin/go-humanize v1.0.1 // indirect
37+
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
38+
github.com/goccy/go-yaml v1.18.0 // indirect
4039
github.com/gogo/protobuf v1.3.2 // indirect
4140
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
42-
github.com/golang/protobuf v1.5.3 // indirect
41+
github.com/golang/protobuf v1.5.4 // indirect
4342
github.com/golang/snappy v0.0.4 // indirect
4443
github.com/google/flatbuffers v24.3.25+incompatible // indirect
4544
github.com/google/uuid v1.6.0 // indirect
4645
github.com/gorilla/securecookie v1.1.2 // indirect
4746
github.com/gorilla/websocket v1.5.3 // indirect
4847
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
4948
github.com/inconshreveable/mousetrap v1.1.0 // indirect
50-
github.com/klauspost/compress v1.17.11 // indirect
51-
github.com/mitchellh/mapstructure v1.5.0 // indirect
49+
github.com/klauspost/compress v1.18.1 // indirect
50+
github.com/kr/pretty v0.3.1 // indirect
5251
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
53-
github.com/russross/blackfriday/v2 v2.1.0 // indirect
52+
github.com/rogpeppe/go-internal v1.10.0 // indirect
5453
github.com/sosodev/duration v1.3.1 // indirect
55-
github.com/spf13/pflag v1.0.5 // indirect
54+
github.com/spf13/pflag v1.0.9 // indirect
5655
github.com/stretchr/objx v0.5.2 // indirect
57-
github.com/stretchr/testify v1.9.0 // indirect
58-
github.com/urfave/cli/v2 v2.27.5 // indirect
59-
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
56+
github.com/stretchr/testify v1.11.1 // indirect
57+
github.com/urfave/cli/v3 v3.6.1 // indirect
6058
go.opencensus.io v0.24.0 // indirect
61-
golang.org/x/mod v0.21.0 // indirect
62-
golang.org/x/net v0.30.0 // indirect
63-
golang.org/x/sync v0.8.0 // indirect
64-
golang.org/x/sys v0.26.0 // indirect
65-
golang.org/x/term v0.25.0 // indirect
66-
golang.org/x/text v0.19.0 // indirect
67-
google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect
59+
golang.org/x/mod v0.30.0 // indirect
60+
golang.org/x/net v0.47.0 // indirect
61+
golang.org/x/sync v0.18.0 // indirect
62+
golang.org/x/sys v0.38.0 // indirect
63+
golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 // indirect
64+
golang.org/x/term v0.37.0 // indirect
65+
golang.org/x/text v0.31.0 // indirect
66+
google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda // indirect
6867
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
6968
gopkg.in/yaml.v2 v2.4.0 // indirect
7069
)

0 commit comments

Comments
 (0)