Skip to content

Commit 8f60792

Browse files
kamirclaude
andauthored
feat: add Large File Support (LFS) subsystem (#134)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3f575ae commit 8f60792

180 files changed

Lines changed: 30930 additions & 427 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ jobs:
7676
- name: Enforce coverage floor
7777
run: bash hack/check_coverage.sh 45
7878

79+
7980
helm-lint:
8081
name: Helm Lint
8182
runs-on: ubuntu-latest

.github/workflows/codeql.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ jobs:
5151
with:
5252
languages: ${{ matrix.language }}
5353
queries: security-extended,security-and-quality
54+
config: |
55+
paths-ignore:
56+
- '**/node_modules/**'
57+
- '**/target/**'
58+
- '**/*.egg-info/**'
59+
- 'third_party/**'
5460
5561
- name: Autobuild
5662
uses: github/codeql-action/autobuild@v4

.github/workflows/docker.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ jobs:
3636
image: kafscale-broker
3737
context: .
3838
file: deploy/docker/broker.Dockerfile
39+
- name: lfs-proxy
40+
image: kafscale-lfs-proxy
41+
context: .
42+
file: deploy/docker/lfs-proxy.Dockerfile
3943
- name: operator
4044
image: kafscale-operator
4145
context: .

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16+
Makefile-MK # Ignore build and IDE files
17+
1618
# Binaries
1719
/bin/
1820
/dist/
@@ -31,6 +33,9 @@
3133
*.key
3234
coverage*.out
3335
.build/
36+
target/
37+
**/target/
38+
spark-warehouse/
3439

3540
# Local Go cache (use GOCACHE=.gocache for hermetic builds/tests)
3641
.gocache/
@@ -53,6 +58,7 @@ coverage*.out
5358
*.swp
5459
*.swo
5560
.DS_Store
61+
.claude/
5662

5763
# Addon processor artifacts
5864
addons/processors/**/bin/
@@ -79,3 +85,27 @@ proto/**/*.swagger.json
7985
_site/
8086
Gemfile
8187
Gemfile.lock
88+
89+
# Ignore demo node_modules
90+
examples/E50_JS-kafscale-demo/node_modules/
91+
92+
# Go compiled binaries (top-level)
93+
/e2e-client
94+
/lfs-proxy
95+
/proxy
96+
97+
# Java build artifacts
98+
target/
99+
dependency-reduced-pom.xml
100+
101+
# JavaScript/Node.js
102+
node_modules/
103+
package-lock.json
104+
105+
# Python
106+
__pycache__/
107+
*.pyc
108+
*.egg-info/
109+
110+
# Test output
111+
records.txt

Makefile

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
.PHONY: proto build test tidy lint generate docker-build docker-build-e2e-client docker-build-etcd-tools docker-clean ensure-minio start-minio stop-containers release-broker-ports test-produce-consume test-produce-consume-debug test-consumer-group test-ops-api test-mcp test-multi-segment-durability test-full test-operator test-acl demo demo-platform demo-platform-bootstrap iceberg-demo kafsql-demo platform-demo help clean-kind-all
16+
.PHONY: proto build test tidy lint generate build-sdk docker-build docker-build-e2e-client docker-build-etcd-tools docker-clean ensure-minio start-minio stop-containers release-broker-ports test-produce-consume test-produce-consume-debug test-consumer-group test-ops-api test-mcp test-multi-segment-durability test-full test-operator test-acl demo demo-platform demo-platform-bootstrap iceberg-demo kafsql-demo platform-demo help clean-kind-all
1717

1818
REGISTRY ?= ghcr.io/kafscale
1919
STAMP_DIR ?= .build
@@ -71,6 +71,10 @@ KAFSCALE_DEMO_ETCD_INMEM ?= 1
7171
KAFSCALE_DEMO_ETCD_REPLICAS ?= 3
7272
BROKER_PORT ?= 39092
7373
BROKER_PORTS ?= 39092 39093 39094
74+
SDK_JAVA_BUILD_CMD ?= mvn -DskipTests clean package
75+
SDK_JS_BUILD_CMD ?= npm install && npm run build
76+
SDK_PY_BUILD_CMD ?= python -m build
77+
SKIP_JS_SDK ?= 1
7478

7579
proto: ## Generate protobuf + gRPC stubs
7680
buf generate
@@ -80,6 +84,19 @@ generate: proto
8084
build: ## Build all binaries
8185
go build ./...
8286

87+
build-sdk: ## Build all LFS client SDKs
88+
@echo "Building Java SDK..."
89+
@cd lfs-client-sdk/java && $(SDK_JAVA_BUILD_CMD)
90+
@test -d lfs-client-sdk/java/target || { echo "Java SDK target/ missing"; exit 1; }
91+
@if [ "$(SKIP_JS_SDK)" = "1" ]; then \
92+
echo "Skipping JS SDK build (SKIP_JS_SDK=1)"; \
93+
else \
94+
echo "Building JS SDK..."; \
95+
cd lfs-client-sdk/js && $(SDK_JS_BUILD_CMD); \
96+
fi
97+
@echo "Building Python SDK..."
98+
@cd lfs-client-sdk/python && $(SDK_PY_BUILD_CMD)
99+
83100
test: ## Run unit tests + vet + race
84101
go vet ./...
85102
go test -race ./...

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ For the technical specification and data formats, see `kafscale-spec.md`.
117117
A detailed architecture overview and design rationale are available here:
118118
https://www.novatechflow.com/p/kafscale.html
119119

120+
## Examples
121+
122+
- Quickstart guide: `examples/101_kafscale-dev-guide/README.md`
123+
- Spring Boot app demo (E20): `examples/E20_spring-boot-kafscale-demo/README.md`
124+
- Flink demo (E30): `examples/E30_flink-kafscale-demo/README.md`
125+
- Spark demo (E40): `examples/E40_spark-kafscale-demo/README.md`
126+
120127
## Community
121128

122129
- License: Apache 2.0 (`LICENSE`)

addons/processors/iceberg-processor/Dockerfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,21 @@
1616

1717
FROM golang:1.25-alpine AS build
1818
RUN apk add --no-cache git
19+
ARG REPO_ROOT=.
20+
ARG MODULE_DIR=.
1921
WORKDIR /src
20-
COPY go.mod go.sum ./
22+
COPY ${REPO_ROOT} /src
23+
WORKDIR /src/${MODULE_DIR}
24+
ARG USE_LOCAL_PLATFORM=0
25+
RUN if [ "${USE_LOCAL_PLATFORM}" != "1" ]; then \
26+
go mod edit -dropreplace github.com/KafScale/platform || true; \
27+
fi
28+
RUN if [ "${USE_LOCAL_PLATFORM}" != "1" ]; then \
29+
go mod download github.com/KafScale/platform@v1.5.0 || true; \
30+
fi
2131
RUN --mount=type=cache,target=/go/pkg/mod \
2232
--mount=type=cache,target=/root/.cache/go-build \
2333
go mod download
24-
COPY . ./
2534
ARG GO_BUILD_FLAGS=
2635
RUN --mount=type=cache,target=/go/pkg/mod \
2736
--mount=type=cache,target=/root/.cache/go-build \

addons/processors/iceberg-processor/Makefile

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,30 @@ BINARY := iceberg-processor
1919
BUILD_DIR := bin
2020
IMAGE ?= $(BINARY):dev
2121
DOCKER_BUILD_ARGS ?=
22+
DOCKER_BUILD_ARGS_LOCAL = --build-arg USE_LOCAL_PLATFORM=1 --build-arg REPO_ROOT=. --build-arg MODULE_DIR=addons/processors/iceberg-processor
23+
RSYNC_EXCLUDES = \
24+
--exclude ".dockerignore" \
25+
--exclude ".git" \
26+
--exclude ".build" \
27+
--exclude ".gocache" \
28+
--exclude ".idea" \
29+
--exclude ".vscode" \
30+
--exclude "_site" \
31+
--exclude "bin" \
32+
--exclude "coverage.out" \
33+
--exclude "dist" \
34+
--exclude "docs" \
35+
--exclude "deploy/helm" \
36+
--exclude "test" \
37+
--exclude "tmp" \
38+
--exclude "**/.DS_Store" \
39+
--exclude "**/*.log" \
40+
--exclude "**/*.swp" \
41+
--exclude "**/*_test.go" \
42+
--exclude "**/node_modules" \
43+
--exclude "ui/.next" \
44+
--exclude "ui/dist" \
45+
--exclude "ui/build"
2246

2347
DOCKER_BUILD_CMD := $(shell \
2448
if command -v docker >/dev/null 2>&1 && docker buildx version >/dev/null 2>&1; then \
@@ -46,4 +70,7 @@ clean:
4670
rm -rf $(BUILD_DIR)
4771

4872
docker-build:
49-
$(DOCKER_BUILD_CMD) $(DOCKER_BUILD_ARGS) -t $(IMAGE) .
73+
@tmp=$$(mktemp -d); \
74+
rsync -a --delete $(RSYNC_EXCLUDES) ../../.. "$$tmp/"; \
75+
$(DOCKER_BUILD_CMD) $(DOCKER_BUILD_ARGS) $(DOCKER_BUILD_ARGS_LOCAL) -t $(IMAGE) -f Dockerfile "$$tmp"; \
76+
rm -rf "$$tmp"

addons/processors/iceberg-processor/config/config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,9 @@ mappings:
6262
type: string
6363
required: false
6464
allow_type_widening: true
65+
lfs:
66+
mode: off
67+
max_inline_size: 1048576
68+
store_metadata: false
69+
validate_checksum: true
70+
resolve_concurrency: 4

addons/processors/iceberg-processor/deploy/helm/iceberg-processor/config/config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,9 @@ mappings:
5757
type: string
5858
required: false
5959
allow_type_widening: true
60+
lfs:
61+
mode: off
62+
max_inline_size: 1048576
63+
store_metadata: false
64+
validate_checksum: true
65+
resolve_concurrency: 4

0 commit comments

Comments
 (0)