Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
993b3b3
feat(docs-ci): add Go v6 smoke test lane, tested module, and Go v6 la…
g-despot Jul 22, 2026
85a09a5
docs(go-v6): add go6 tabs for connect + CRUD, v6 story on go.md (phas…
g-despot Jul 22, 2026
bba4467
ci(docs): run only the Go job on the go-v6-scaffold branch
g-despot Jul 22, 2026
9fe190e
fix(docs): address gate feedback (go.md link, hide TODO from Coming-s…
g-despot Jul 22, 2026
aa7fdc5
docs(go-v6): add go6 tabs for search + aggregate (phase 3b)
g-despot Jul 22, 2026
8c2ea8d
docs(go-v6): add go6 tabs for tenants, RBAC, backup, aliases, multi-t…
g-despot Jul 22, 2026
225f5cd
docs(go-v6): add go6 tabs for collections config (implemented-only, p…
g-despot Jul 22, 2026
65f556d
test(go-v6): anchor manage-collections run pattern so new config test…
g-despot Jul 22, 2026
7d59edf
fix(go-v6): skip local api-key connect test in CI (default-port insta…
g-despot Jul 23, 2026
41eca7b
test(go-v6): tier 1 — run no-infra snippet tests live in CI
g-despot Jul 23, 2026
7c77dd2
fix(go-v6): full CI failure reporting; defer Replace (client id bug)
g-despot Jul 23, 2026
bd0eed5
fix(go-v6): per-failure CI reporting; skip OIDC + client-broken Delet…
g-despot Jul 23, 2026
c2955db
fix(go-v6): seed helper sets "none" vectorizer (HELPER FIX); skip HFr…
g-despot Jul 23, 2026
4ee7c22
fix(go-v6): name the target vector in NearVector snippets (v6 named-v…
g-despot Jul 23, 2026
9353123
fix(go-v6): set HFresh MaxPostingSizeKB and un-skip DistanceMetric
g-despot Jul 23, 2026
002f018
test(go-v6): report each Go test as its own CI case (regression visib…
g-despot Jul 30, 2026
3a8765e
test(go-v6): tier 2 - enable filters, MT, aliases, multi-target live …
g-despot Jul 30, 2026
68657ee
fix(go-v6): T2 seed UUID (leading-zero id_as_bytes) + skip two client…
g-despot Jul 30, 2026
f6ccd6e
test(go-v6): tier 3 - enable near-text/hybrid/named-vector live (cont…
g-despot Jul 30, 2026
9137370
fix(go-v6): T3 - skip TestHybridWithVector (hybrid+NearVector server …
g-despot Jul 30, 2026
2d7a06b
test(go-v6): tier 4 — enable RBAC tests live (:8580 admin connect + c…
g-despot Jul 30, 2026
3dfe4ac
fix(go-v6): deterministic non-leading-zero seed UUIDs (kill id_as_byt…
g-despot Jul 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 138 additions & 0 deletions .github/workflows/docs_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,15 @@ on:
description: 'C# client branch (leave empty to use the workflow default below)'
required: false
default: ''
go_client_branch:
description: 'Go client branch (leave empty to use the workflow default below)'
required: false
default: ''

env:
# Centralize versions for easier maintenance
PYTHON_VERSION: "3.10"
GO_VERSION: "1.25"
WEAVIATE_VERSION: "1.35.0"
OLLAMA_VERSION: "0.9.6"
CLIP_MODEL_TAG: "sentence-transformers-clip-ViT-B-32"
Expand All @@ -41,6 +46,7 @@ env:
jobs:
test-agents:
name: Test Agents
if: github.ref != 'refs/heads/docs/go-v6-scaffold'
runs-on: ubuntu-latest
timeout-minutes: 30

Expand Down Expand Up @@ -93,6 +99,7 @@ jobs:

test-python:
name: Test Python
if: github.ref != 'refs/heads/docs/go-v6-scaffold'
runs-on: ubuntu-latest
timeout-minutes: 30

Expand Down Expand Up @@ -256,6 +263,7 @@ jobs:

test-typescript:
name: Test TypeScript
if: github.ref != 'refs/heads/docs/go-v6-scaffold'
runs-on: ubuntu-latest
timeout-minutes: 30

Expand Down Expand Up @@ -426,6 +434,7 @@ jobs:

test-java:
name: Test Java
if: github.ref != 'refs/heads/docs/go-v6-scaffold'
runs-on: ubuntu-latest
timeout-minutes: 30

Expand Down Expand Up @@ -592,8 +601,137 @@ jobs:
done
docker system prune -f --volumes 2>/dev/null || true

test-go:
name: Test Go
runs-on: ubuntu-latest
timeout-minutes: 30

# Smoke lane for the Go v6 client (_includes/code/go-v6). Mirrors "Test Java"
# but intentionally omits the Ollama-model and Keycloak steps: the smoke set
# (connect / create-collection / insert / basic fetch) needs neither an
# embedding provider nor OIDC. Broaden this when the Go docs breadth lands.
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet &
sudo rm -rf /opt/ghc &
sudo rm -rf /usr/local/share/boost &
sudo rm -rf "$AGENT_TOOLSDIRECTORY" &
sudo rm -rf /usr/local/lib/android &
wait

- name: Set up test environment
uses: ./.github/actions/setup-test-env
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: _includes/code/go-v6/go.sum

- name: Clone Go client and wire replace
run: |
GO_BRANCH="${{ inputs.go_client_branch || 'v6' }}"
echo "📦 Wiring Go client from branch: $GO_BRANCH"
# v6 is not published to the module proxy yet, so the committed go.mod
# requires a placeholder version and CI redirects it to a fresh clone.
git clone --depth 1 -b "$GO_BRANCH" https://github.com/weaviate/weaviate-go-client.git /tmp/go-client
cd _includes/code/go-v6
go mod edit -replace github.com/weaviate/weaviate-go-client/v6=/tmp/go-client
go mod tidy
echo "✅ Go client wired via replace directive"

- name: Start services
run: |
echo "🚀 Starting Weaviate and Ollama services..."
mkdir -p ~/.ollama
./tests/start-weaviate.sh

sleep 5
echo "✅ Services started:"
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"

- name: Wait for all services to be ready
run: |
echo "⏳ Waiting for services to be ready..."

declare -A services=(
["8099"]="Weaviate Main"
["8580"]="Weaviate RBAC"
["8080"]="Weaviate Instance 1"
["8090"]="Weaviate Instance 2"
["8280"]="Weaviate Instance 3"
["8180"]="Weaviate Instance 4"
["8181"]="Weaviate Instance 5"
["8182"]="Weaviate Instance 6"
)

for port in "${!services[@]}"; do
service_name="${services[$port]}"
echo -n "Checking $service_name (port $port)... "

if timeout 60 bash -c "until curl -sf http://localhost:$port/v1/.well-known/ready &>/dev/null; do sleep 2; done"; then
echo "✅ Ready"
else
echo "⚠️ Not responding (may be optional)"
fi
done

echo "✅ Service check completed"

- name: Record test start time
run: echo "TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV

- name: Run Go tests
id: run-tests
continue-on-error: true
env:
DOCS_GITHUB_ENV: "true"
WEAVIATE_URL: ${{ secrets.WEAVIATE_URL }}
WEAVIATE_HOST: ${{ secrets.WEAVIATE_HOST }}
WEAVIATE_HOSTNAME: ${{ secrets.WEAVIATE_HOSTNAME }}
WEAVIATE_HTTP_HOST: ${{ secrets.WEAVIATE_HTTP_HOST }}
WEAVIATE_GRPC_HOST: ${{ secrets.WEAVIATE_GRPC_HOST }}
WEAVIATE_API_KEY: ${{ secrets.WEAVIATE_API_KEY }}
WEAVIATE_LOCAL_API_KEY: ${{ secrets.WEAVIATE_LOCAL_API_KEY }}
run: |
echo "🧪 Running Go tests..."
uv run pytest -m "go" -v --tb=short --durations=10 -s --junitxml=pytest-results.xml
echo "✅ Tests completed"

- name: Handle test results
if: always()
uses: ./.github/actions/handle-test-results
with:
test-outcome: ${{ steps.run-tests.outcome }}
test-type: 'Go'
languages-tested: 'Go'
slack-bot-token: ${{ secrets.TESTING_CI_SLACK_BOT }}

- name: Stop services
if: always()
run: |
echo "🛑 Stopping services..."
./tests/stop-weaviate.sh 2>/dev/null || echo "⚠️ Some services may have already stopped"

- name: Cleanup Docker resources
if: always()
run: |
for compose_file in tests/docker-compose*.yml; do
if [[ -f "$compose_file" ]]; then
docker compose -f "$compose_file" down -v --remove-orphans 2>/dev/null || true
fi
done
docker system prune -f --volumes 2>/dev/null || true

test-csharp:
name: Test C#
if: github.ref != 'refs/heads/docs/go-v6-scaffold'
runs-on: ubuntu-latest
timeout-minutes: 30

Expand Down
9 changes: 9 additions & 0 deletions _includes/code/connections/oidc-connect.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import FilteredTextBlock from '@site/src/components/Documentation/FilteredTextBl
import PyV4Code from '!!raw-loader!/_includes/code/connections/connect-python-v4.py';
import TsV3Code from '!!raw-loader!/_includes/code/connections/connect-ts-v3.ts';
import GoCode from '!!raw-loader!/_includes/code/connections/connect.go';
import GoV6Code from '!!raw-loader!/_includes/code/go-v6/connect_test.go';
import JavaV6Code from '!!raw-loader!/_includes/code/java-v6/src/test/java/ConnectionTest.java';
import CSharpCode from '!!raw-loader!/_includes/code/csharp/ConnectionTest.cs';

Expand Down Expand Up @@ -33,6 +34,14 @@ import CSharpCode from '!!raw-loader!/_includes/code/csharp/ConnectionTest.cs';
language="go"
/>
</TabItem>
<TabItem value="go6" label="Go v6">
<FilteredTextBlock
text={GoV6Code}
startMarker="// START OIDCConnect"
endMarker="// END OIDCConnect"
language="go"
/>
</TabItem>
<TabItem value="java" label="Java">
<FilteredTextBlock
text={JavaV6Code}
Expand Down
2 changes: 2 additions & 0 deletions _includes/code/go-v6/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Compiled binary produced by `go build` (module basename).
/docs-go-v6
154 changes: 154 additions & 0 deletions _includes/code/go-v6/aggregate_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
package main

import (
"context"
"testing"

"github.com/weaviate/weaviate-go-client/v6/aggregate"
"github.com/weaviate/weaviate-go-client/v6/query"
"github.com/weaviate/weaviate-go-client/v6/types"
)

// The aggregate snippets run against the seeded JeopardyQuestion collection, so
// they execute without an inference module.

func TestAggregateMetaCount(t *testing.T) {
ctx := context.Background()
client := connectLocal(t)
defer client.Close()

setupJeopardySearch(t, client)
defer client.Collections.Delete(ctx, "JeopardyQuestion")

// START MetaCount
jeopardy := client.Collections.Use("JeopardyQuestion")
result, err := jeopardy.Aggregate.OverAll(ctx, aggregate.OverAll{
TotalCount: true,
})
if err != nil {
t.Fatal(err)
}
if result.TotalCount != nil {
t.Logf("object count: %d", *result.TotalCount)
}
// END MetaCount
}

func TestAggregateTextProp(t *testing.T) {
ctx := context.Background()
client := connectLocal(t)
defer client.Close()

setupJeopardySearch(t, client)
defer client.Collections.Delete(ctx, "JeopardyQuestion")

// START TextProp
jeopardy := client.Collections.Use("JeopardyQuestion")
result, err := jeopardy.Aggregate.OverAll(ctx, aggregate.OverAll{
Text: []aggregate.Text{
{Property: "category", Count: true, TopOccurrences: true},
},
})
if err != nil {
t.Fatal(err)
}
category := result.Text["category"]
for _, occ := range category.TopOccurrences {
t.Logf("%s occurs %d times", occ.Value, occ.OccursTimes)
}
// END TextProp
}

func TestAggregateIntProp(t *testing.T) {
ctx := context.Background()
client := connectLocal(t)
defer client.Close()

setupJeopardySearch(t, client)
defer client.Collections.Delete(ctx, "JeopardyQuestion")

// START IntProp
jeopardy := client.Collections.Use("JeopardyQuestion")
result, err := jeopardy.Aggregate.OverAll(ctx, aggregate.OverAll{
Integer: []aggregate.Integer{
{Property: "points", Count: true, Sum: true, Min: true, Max: true, Mean: true},
},
})
if err != nil {
t.Fatal(err)
}
points := result.Integer["points"]
if points.Sum != nil {
t.Logf("total points: %d", *points.Sum)
}
// END IntProp
}

func TestAggregateGroupBy(t *testing.T) {
ctx := context.Background()
client := connectLocal(t)
defer client.Close()

setupJeopardySearch(t, client)
defer client.Collections.Delete(ctx, "JeopardyQuestion")

// START groupBy
jeopardy := client.Collections.Use("JeopardyQuestion")
result, err := jeopardy.Aggregate.OverAll.GroupBy(ctx,
aggregate.OverAll{
Integer: []aggregate.Integer{
{Property: "points", Count: true, Sum: true},
},
},
aggregate.GroupBy{Property: "category", Limit: 10},
)
if err != nil {
t.Fatal(err)
}
for _, group := range result.Groups {
t.Logf("group %v", group.Value)
if points := group.Integer["points"]; points.Count != nil {
t.Logf(" count: %d", *points.Count)
}
}
// END groupBy
}

// TestAggregateNearVector aggregates the objects returned by a vector search.
// This snippet is not yet wired into a docs page, but it exercises the
// implemented near-vector aggregation path.
func TestAggregateNearVector(t *testing.T) {
// The named-target fix below is correct (the "default" target now resolves), but
// Weaviate 1.38.0 panics server-side ("nil pointer dereference") on aggregate
// near-vector against a bring-your-own-vector (selfprovided) collection — for every
// query shape tested, with or without Similarity/ObjectLimit. This is a core/server
// bug, not a client or snippet issue, and the snippet is not wired into any docs
// page. Re-enable once the server handles this path. Tracked for the beta follow-up.
t.Skip("Weaviate 1.38 panics on aggregate near-vector over a BYO-vector collection (server bug)")
ctx := context.Background()
client := connectLocal(t)
defer client.Close()

setupJeopardySearch(t, client)
defer client.Collections.Delete(ctx, "JeopardyQuestion")

// START AggregateNearVector
vector := []float32{0.12, 0.20, 0.33}

jeopardy := client.Collections.Use("JeopardyQuestion")
result, err := jeopardy.Aggregate.NearVector(ctx, aggregate.NearVector{
Query: query.NearVector{
Target: &types.Vector{Name: "default", Single: vector},
Similarity: query.Distance(0.3),
},
ObjectLimit: 10,
TotalCount: true,
})
if err != nil {
t.Fatal(err)
}
if result.TotalCount != nil {
t.Logf("matched object count: %d", *result.TotalCount)
}
// END AggregateNearVector
}
Loading
Loading