Skip to content

Commit e02dae7

Browse files
authored
Merge pull request #873 from datazip-inc/staging
chore: staging -> master v0.5.1
2 parents feb0aca + 2901a74 commit e02dae7

25 files changed

Lines changed: 1028 additions & 332 deletions

File tree

.cursor/rules/olake.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ alwaysApply: true
1010

1111
OLake is an open-source, high-performance **EL (Extract-Load)** tool that replicates data from databases, Kafka, and S3 into **Apache Iceberg** tables or **plain Parquet** files.
1212

13-
- **Languages:** Go 1.24 (primary) + Java 17 (Iceberg writer)
13+
- **Languages:** Go 1.25.8 (primary) + Java 17 (Iceberg writer)
1414
- **Go workspace:** `go.work` links the root module with 8 driver sub-modules
1515
- **CLI:** Cobra-based commands: `spec`, `check`, `discover`, `sync`, `clear`
1616
- **Sources:** Postgres, MongoDB, MySQL, Oracle, MSSQL, DB2, Kafka, S3

.github/workflows/golang-ci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,22 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v3
22-
- uses: actions/setup-go@v3
22+
- uses: actions/setup-go@v4
2323
with:
24-
check-latest: "true"
25-
go-version: "1.24.x"
24+
go-version-file: "go.mod"
2625
- name: golangci-lint
27-
uses: golangci/golangci-lint-action@v3
26+
uses: golangci/golangci-lint-action@v6
2827
with:
2928
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
3029
version: latest
30+
install-mode: goinstall
3131
build-check:
3232
name: Build
3333
runs-on: ubuntu-latest
3434
steps:
3535
- uses: actions/checkout@v3
36-
- uses: actions/setup-go@v3
36+
- uses: actions/setup-go@v4
3737
with:
38-
check-latest: "true"
39-
go-version: "1.24.x"
38+
go-version-file: "go.mod"
4039
- name: Run build
4140
run: make build

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Set up Go
2929
uses: actions/setup-go@v4
3030
with:
31-
go-version: '1.24.x'
31+
go-version-file: "go.mod"
3232

3333
- name: Set up Java for Maven
3434
uses: actions/setup-java@v3

.github/workflows/performance-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: Set up Go
4343
uses: actions/setup-go@v4
4444
with:
45-
go-version: '1.24.2'
45+
go-version-file: "go.mod"
4646

4747
- name: Set up Java for Maven
4848
uses: actions/setup-java@v3

.github/workflows/security-ci.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
- uses: actions/checkout@v3
29-
- uses: actions/setup-go@v3
29+
- uses: actions/setup-go@v4
3030
with:
31-
check-latest: "true"
32-
go-version: "1.24.x"
31+
go-version-file: "go.mod"
3332
- name: Install govulncheck
3433
run: go install golang.org/x/vuln/cmd/govulncheck@latest
3534
- name: Run vulnerability checks
@@ -40,10 +39,9 @@ jobs:
4039
runs-on: ubuntu-latest
4140
steps:
4241
- uses: actions/checkout@v3
43-
- uses: actions/setup-go@v3
42+
- uses: actions/setup-go@v4
4443
with:
45-
check-latest: "true"
46-
go-version: "1.24.x"
44+
go-version-file: "go.mod"
4745
- name: install gosec
4846
run: curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.22.11
4947
- name: Run Gosec Security Scanner

.github/workflows/unit-tests.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v3
1313

14-
- uses: actions/setup-go@v3
14+
- uses: actions/setup-go@v4
1515
with:
16-
check-latest: true
17-
go-version: 1.24.x
16+
go-version-file: "go.mod"
1817

1918
- name: Install Dependencies
2019
run: go mod download

.golangci.yml

Lines changed: 11 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
linters-settings:
2-
depguard:
2+
# depguard:
33
# list-type: blacklist
44
# packages:
55
# # logging is allowed only by logutils.Log, logrus
@@ -15,7 +15,10 @@ linters-settings:
1515
lines: 100
1616
statements: 50
1717
gci:
18-
local-prefixes: github.com/golangci/golangci-lint
18+
sections:
19+
- standard
20+
- default
21+
- prefix(github.com/golangci/golangci-lint)
1922
goconst:
2023
min-len: 2
2124
min-occurrences: 2
@@ -36,22 +39,10 @@ linters-settings:
3639
min-complexity: 15
3740
goimports:
3841
local-prefixes: github.com/golangci/golangci-lint
39-
golint:
40-
min-confidence: 0
41-
gomnd:
42-
settings:
43-
mnd:
44-
# don't include the "operation" and "assign"
45-
checks:
46-
- argument
47-
- case
48-
- condition
49-
- return
5042
gosec:
5143
excludes:
5244
- G204
5345
govet:
54-
check-shadowing: false
5546
settings:
5647
printf:
5748
funcs:
@@ -61,20 +52,14 @@ linters-settings:
6152
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
6253
lll:
6354
line-length: 950
64-
maligned:
65-
suggest-new: true
6655
misspell:
67-
# Correct spellings using locale preferences for US or UK.
68-
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
69-
# Default is to use a neutral variety of English.
7056
locale: US
7157
ignore-words:
7258
- eles
7359
nolintlint:
74-
allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space)
75-
allow-unused: false # report any unused nolint directives
76-
require-explanation: false # don't require an explanation for nolint directives
77-
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
60+
allow-unused: false
61+
require-explanation: false
62+
require-specific: false
7863

7964
linters:
8065
# please, do not use `enable-all`: it's deprecated and will be removed soon.
@@ -119,21 +104,7 @@ linters:
119104
- nilnil
120105
- nilerr
121106

122-
# don't enable:
123-
# - asciicheck
124-
# - gochecknoglobals
125-
# - gocognit
126-
# - godot
127-
# - godox
128-
# - goerr113
129-
# - maligned
130-
# - nestif
131-
# - prealloc
132-
# - testpackage
133-
# - wsl
134-
135107
issues:
136-
# Excluding configuration per-path, per-linter, per-text and per-source
137108
exclude-rules:
138109
- path: _test\.go
139110
linters:
@@ -143,18 +114,11 @@ issues:
143114
- linters:
144115
- gocritic
145116
text: "unnecessaryDefer:"
146-
147-
run:
148-
skip-dirs:
117+
exclude-dirs:
149118
- test/testdata_etc
150119
- internal/cache
151120
- internal/renameio
152121
- internal/robustio
153-
timeout: 5m
154122

155-
# golangci.com configuration
156-
# https://github.com/golangci/golangci/wiki/Configuration
157-
service:
158-
golangci-lint-version: 1.45.2 # use the fixed version to not introduce new linters unexpectedly
159-
prepare:
160-
- echo "here I can run custom commands, but no preparation needed for this repo"
123+
run:
124+
timeout: 5m

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build Stage
2-
FROM golang:1.24-bookworm AS builder
2+
FROM golang:1.25.8-bookworm AS builder
33

44
WORKDIR /home/app
55
COPY . .

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
GOPATH = $(shell go env GOPATH)
2+
GO_VERSION = $(shell awk '/^go / {print "go"$$2; exit}' go.mod)
23

34
gomod:
45
find . -name go.mod -execdir go mod tidy \;
56

67
golangci:
7-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest;
8+
GOTOOLCHAIN=$(GO_VERSION) go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest;
89
$(GOPATH)/bin/golangci-lint run
910

1011
trivy:

destination/parquet/parquet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func (p *Parquet) Check(_ context.Context) error {
213213
}
214214
// test for s3 permissions
215215
if p.s3Client != nil {
216-
testKey := fmt.Sprintf("olake_writer_test/%s", utils.TimestampedFileName(".txt"))
216+
testKey := filepath.Join(p.config.Prefix, "olake_writer_test", utils.TimestampedFileName(".txt"))
217217
// Try to upload a small test file
218218
_, err = p.s3Client.PutObject(&s3.PutObjectInput{
219219
Bucket: aws.String(p.config.Bucket),

0 commit comments

Comments
 (0)