Skip to content

Commit a407064

Browse files
authored
Merge pull request #1 from vllm-project/main
2 parents 734c995 + 446dfe6 commit a407064

32 files changed

+1818
-1386
lines changed

.github/workflows/auto-merge.yml

Lines changed: 0 additions & 635 deletions
This file was deleted.

.github/workflows/owner-notification.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ jobs:
137137
}
138138
139139
commentBody += '---\n';
140+
commentBody += '<div align="center">\n';
141+
commentBody += '<img src="https://raw.githubusercontent.com/vllm-project/semantic-router/main/website/static/img/repo.png" alt="vLLM" width="80%"/>';
142+
commentBody += '</div>\n\n';
143+
commentBody += '## 🎉 Thanks for your contributions!\n\n';
140144
commentBody += '*This comment was automatically generated based on the OWNER files in the repository.*';
141145
142146
// Get existing comments

.github/workflows/test-and-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ jobs:
5151
~/go/pkg/mod
5252
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
5353

54+
- name: Check go mod tidy
55+
run: make check-go-mod-tidy
56+
5457
- name: Build Rust library
5558
run: make rust
5659

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ pre-commit run --all-files
222222
- Use meaningful variable and function names
223223
- Add comments for exported functions and types
224224
- Write unit tests for new functionality
225+
- **Keep Go modules tidy:** Run `go mod tidy` in the appropriate directory after adding or removing dependencies
226+
- For `candle-binding`: `cd candle-binding && go mod tidy`
227+
- For `src/semantic-router`: `cd src/semantic-router && go mod tidy`
228+
- The CI will automatically check that `go.mod` and `go.sum` files are tidy using `make check-go-mod-tidy`
225229

226230
### Rust Code
227231
- Follow Rust formatting (`cargo fmt`)
@@ -242,6 +246,11 @@ pre-commit run --all-files
242246
python e2e-tests/run_all_tests.py
243247
```
244248

249+
The `make test` command includes:
250+
- `go vet` for static analysis
251+
- `check-go-mod-tidy` for Go module dependency verification
252+
- Unit tests for all components
253+
245254
2. **Create a pull request** with:
246255
- Clear description of changes
247256
- Reference to any related issues

Makefile

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,30 @@ run-envoy:
5555
@echo "Starting Envoy..."
5656
func-e run --config-path config/envoy.yaml --component-log-level "ext_proc:trace,router:trace,http:trace"
5757

58+
# Run go vet for all Go modules
59+
vet:
60+
@echo "Running go vet..."
61+
@cd candle-binding && go vet ./...
62+
@cd src/semantic-router && go vet ./...
63+
64+
# Check go mod tidy for all Go modules
65+
check-go-mod-tidy:
66+
@echo "Checking go mod tidy for all Go modules..."
67+
@echo "Checking candle-binding..."
68+
@cd candle-binding && go mod tidy && \
69+
(git diff --exit-code go.mod 2>/dev/null || (echo "ERROR: go.mod file is not tidy in candle-binding. Please run 'go mod tidy' in candle-binding directory and commit the changes." && git diff go.mod && exit 1)) && \
70+
(test ! -f go.sum || git diff --exit-code go.sum 2>/dev/null || (echo "ERROR: go.sum file is not tidy in candle-binding. Please run 'go mod tidy' in candle-binding directory and commit the changes." && git diff go.sum && exit 1))
71+
@echo "✅ candle-binding go mod tidy check passed"
72+
@echo "Checking src/semantic-router..."
73+
@cd src/semantic-router && go mod tidy && \
74+
if ! git diff --exit-code go.mod go.sum; then \
75+
echo "ERROR: go.mod or go.sum files are not tidy in src/semantic-router. Please run 'go mod tidy' in src/semantic-router directory and commit the changes."; \
76+
git diff go.mod go.sum; \
77+
exit 1; \
78+
fi
79+
@echo "✅ src/semantic-router go mod tidy check passed"
80+
@echo "✅ All go mod tidy checks passed"
81+
5882
# Test the Rust library
5983
test-binding: rust
6084
@echo "Running Go tests with static library..."
@@ -86,7 +110,7 @@ test-semantic-router: build-router
86110
cd src/semantic-router && CGO_ENABLED=1 go test -v ./...
87111

88112
# Test the Rust library and the Go binding
89-
test: download-models test-binding test-semantic-router
113+
test: vet check-go-mod-tidy download-models test-binding test-semantic-router
90114

91115
# Clean built artifacts
92116
clean:

0 commit comments

Comments
 (0)