Skip to content

Commit f7c2419

Browse files
authored
chore: upgrade all dependencies to latest versions
1 parent f2358e6 commit f7c2419

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+930
-2623
lines changed

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
.git
2+
.github
13
.idea
24
.vscode
35
.DS_Store
46
.env
7+
.claude
58
compass
69
config.yaml
710
compass.yaml
811
temp/
12+
docs/
13+
test/
14+
*.md
15+
coverage.out
16+
dist/

.github/workflows/lint.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,32 @@
11
name: Lint
22

3-
on: [push]
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- "**.md"
9+
- "docs/**"
10+
pull_request:
11+
paths-ignore:
12+
- "**.md"
13+
- "docs/**"
14+
15+
concurrency:
16+
group: lint-${{ github.ref }}
17+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
418

519
jobs:
620
golangci:
721
runs-on: ubuntu-latest
822
steps:
923
- uses: actions/checkout@v6
10-
with:
11-
fetch-depth: 0
1224
- uses: actions/setup-go@v6
1325
with:
14-
go-version: "1.20"
26+
go-version-file: "go.mod"
27+
cache: true
1528
- name: golangci-lint
1629
uses: golangci/golangci-lint-action@v9
1730
with:
18-
version: v2.1
31+
version: latest
1932
args: --timeout=5m

.github/workflows/main.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,27 @@ on:
33
push:
44
branches:
55
- main
6+
paths-ignore:
7+
- "**.md"
8+
- "docs/**"
9+
10+
concurrency:
11+
group: main-${{ github.ref }}
12+
cancel-in-progress: false
613

714
jobs:
815
dev:
916
runs-on: ubuntu-latest
1017
steps:
1118
- name: Checkout code
1219
uses: actions/checkout@v6
13-
with:
14-
fetch-depth: 0
1520
- name: Set up Go
1621
uses: actions/setup-go@v6
1722
with:
18-
go-version: "1.20"
23+
go-version-file: "go.mod"
24+
cache: true
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v3
1927
- name: Login to DockerHub
2028
uses: docker/login-action@v4
2129
with:
@@ -29,3 +37,5 @@ jobs:
2937
push: true
3038
file: "./Dockerfile.dev"
3139
tags: raystack/compass:dev
40+
cache-from: type=gha
41+
cache-to: type=gha,mode=max

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ jobs:
1616
- name: Set up Go
1717
uses: actions/setup-go@v6
1818
with:
19-
go-version: "1.20"
19+
go-version-file: "go.mod"
20+
cache: true
2021
- name: Login to DockerHub
2122
uses: docker/login-action@v4
2223
with:

.github/workflows/test.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,45 @@
11
name: Test
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths-ignore:
7+
- "**.md"
8+
- "docs/**"
9+
pull_request:
10+
paths-ignore:
11+
- "**.md"
12+
- "docs/**"
13+
14+
concurrency:
15+
group: test-${{ github.ref }}
16+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
317

418
jobs:
519
test:
620
runs-on: ubuntu-latest
721
services:
822
elasticsearch:
9-
image: elasticsearch:7.17.9
23+
image: elasticsearch:8.17.1
1024
ports:
1125
- 9200:9200
1226
env:
1327
discovery.type: single-node
1428
xpack.security.enabled: "false"
1529
ES_JAVA_OPTS: "-Xms128m -Xmx128m"
30+
options: >-
31+
--health-cmd "curl -f http://localhost:9200/_cluster/health"
32+
--health-interval 10s
33+
--health-timeout 5s
34+
--health-retries 10
1635
env:
1736
ES_TEST_SERVER_URL: "http://localhost:9200"
1837
steps:
1938
- uses: actions/checkout@v6
2039
- uses: actions/setup-go@v6
2140
with:
22-
go-version: "1.20"
23-
- name: Install dependencies
24-
run: sudo apt-get install build-essential
25-
- name: Install packages
26-
run: go mod tidy
41+
go-version-file: "go.mod"
42+
cache: true
2743
- name: Run Test
2844
run: make test
2945
- name: Install goveralls and send coverage

.goreleaser.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ builds:
2323
flags: [-a]
2424
ldflags:
2525
- -X github.com/raystack/compass/cli.Version={{.Tag}}
26-
- -X github.com/raystack/compass/cli.BuildCommit={{.FullCommit}}
27-
- -X github.com/raystack/compass/cli.BuildDate={{.Date}}
2826
goos: [linux, darwin, windows]
29-
goarch: [amd64, 386, arm, arm64]
27+
goarch: [amd64, arm64]
3028
env:
3129
- CGO_ENABLED=0
3230

@@ -70,8 +68,6 @@ brews:
7068
name: homebrew-tap
7169
license: "Apache 2.0"
7270
folder: Formula
73-
dependencies:
74-
- name: git
7571
install: |-
7672
bin.install "compass"
7773
commit_author:

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
FROM alpine:latest
22

33
COPY compass /usr/bin/compass
4-
RUN apk update
5-
RUN apk add ca-certificates
4+
RUN apk update && apk add --no-cache ca-certificates && rm -rf /var/cache/apk/*
65

7-
CMD ["compass"]
6+
ENTRYPOINT ["compass"]

Dockerfile.dev

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
FROM golang:1.20-alpine3.17 as builder
1+
ARG GO_VERSION=1.25
2+
FROM golang:${GO_VERSION}-alpine3.21 AS builder
23
RUN apk add make
34
WORKDIR /build/
45
COPY . .
56
RUN make build
67

7-
FROM alpine:3.17
8-
8+
FROM alpine:3.21
99
COPY --from=builder /build/compass /usr/bin/compass
10-
RUN apk update
11-
RUN apk add ca-certificates
12-
13-
# glibc compatibility library, since go binaries
14-
# don't work well with musl libc that alpine uses
15-
RUN apk add libc6-compat
10+
RUN apk update && apk add --no-cache ca-certificates libc6-compat && rm -rf /var/cache/apk/*
1611

17-
ENTRYPOINT ["compass"]
12+
ENTRYPOINT ["compass"]

Makefile

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ VERSION := "$(shell git describe --tags ${TAG})-next"
55
BUILD_DIR=dist
66
PROTON_COMMIT := "409f146"
77

8-
.PHONY: all build clean test tidy vet proto setup format generat
8+
.PHONY: all build clean test tidy vet proto setup format generate lint install
99

1010
all: clean test build format lint
1111

@@ -14,22 +14,22 @@ tidy:
1414
@go mod tidy -v
1515

1616
install:
17-
@echo "Installing Guardian to ${GOBIN}..."
17+
@echo "Installing compass to ${GOBIN}..."
1818
@go install
1919

2020
format:
2121
@echo "Running go fmt..."
22-
@go fmt
22+
@go fmt ./...
2323

2424
lint: ## Lint checker
2525
@echo "Running lint checks using golangci-lint..."
2626
@golangci-lint run
2727

28-
clean: tidy ## Clean the build artifacts
28+
clean: ## Clean the build artifacts
2929
@echo "Cleaning up build directories..."
30-
@rm -rf $coverage.out ${BUILD_DIR}
30+
@rm -rf coverage.out ${BUILD_DIR}
3131

32-
test: ## Run the tests
32+
test: ## Run the tests
3333
go test ./... -race -coverprofile=coverage.out
3434

3535
e2e: ## Run all e2e tests
@@ -40,21 +40,19 @@ coverage: test ## Print the code coverage
4040
@go tool cover -html=coverage.out
4141

4242
build: ## Build the compass binary
43-
@echo "Building guardian version ${VERSION}..."
43+
@echo "Building compass version ${VERSION}..."
4444
CGO_ENABLED=0 go build -ldflags "-X ${NAME}/cli.Version=${VERSION}"
4545
@echo "Build complete"
4646

47-
buildr: setup
48-
goreleaser --snapshot --skip-publish --rm-dist
47+
buildr: setup ## Build release snapshot
48+
goreleaser release --snapshot --skip=publish --clean
4949

50-
51-
vet:
50+
vet: ## Run go vet
5251
go vet ./...
5352

54-
download:
53+
download: ## Download go modules
5554
@go mod download
5655

57-
5856
generate: ## Run all go generate in the code base
5957
@echo "Running go generate..."
6058
go generate ./...
@@ -63,20 +61,17 @@ config: ## Generate the sample config file
6361
@echo "Initializing sample server config..."
6462
@cp config/config.yaml config.yaml
6563

66-
6764
proto: ## Generate the protobuf files
6865
@echo "Generating protobuf from raystack/proton"
69-
@echo " [info] make sure correct version of dependencies are installed using 'make install'"
66+
@echo " [info] make sure correct version of dependencies are installed using 'make setup'"
7067
@buf generate https://github.com/raystack/proton/archive/${PROTON_COMMIT}.zip#strip_components=1 --template buf.gen.yaml --path raystack/compass -v
7168
@echo "Protobuf compilation finished"
7269

7370
setup: ## Install required dependencies
7471
@echo "> Installing dependencies..."
7572
go mod tidy
76-
go install github.com/vektra/mockery/v2@v2.14.0
77-
go install google.golang.org/protobuf/proto@v1.28.0
78-
go install google.golang.org/grpc@v1.46.0
79-
go install github.com/bufbuild/buf/cmd/buf@v1.4.0
73+
go install github.com/vektra/mockery/v2@latest
74+
go install github.com/bufbuild/buf/cmd/buf@latest
8075

8176
swagger-md:
8277
npx swagger-markdown -i proto/compass.swagger.yaml -o docs/docs/reference/api.md
@@ -86,9 +81,9 @@ clean-doc:
8681
@rm -rf ./docs/docs/reference/cli.md
8782
@rm -f ./docs/docs/reference/api.md
8883

89-
doc: clean-doc update-swagger-md ## Generate api and cli references
84+
doc: clean-doc swagger-md ## Generate api and cli references
9085
@echo "> generate cli docs"
9186
@go run . reference --plain | sed '1 s,.*,# CLI,' > ./docs/docs/reference/cli.md
92-
87+
9388
help: ## Display this help message
9489
@cat $(MAKEFILE_LIST) | grep -e "^[a-zA-Z_\-]*: *.*## *" | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

0 commit comments

Comments
 (0)