Skip to content

docs: Weaviate v6 Go client — Go docs CI lane, tested go6 snippets (connect + CRUD), language tab#480

Draft
g-despot wants to merge 14 commits into
mainfrom
docs/go-v6-scaffold
Draft

docs: Weaviate v6 Go client — Go docs CI lane, tested go6 snippets (connect + CRUD), language tab#480
g-despot wants to merge 14 commits into
mainfrom
docs/go-v6-scaffold

Conversation

@g-despot

@g-despot g-despot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

What

Foundational documentation support for the new Weaviate v6 Go client (github.com/weaviate/weaviate-go-client/v6), mirroring the java-v6 rollout: the CI lane + tested module + a parallel go6 language tab, plus the first slice of real v6 content (connect + object CRUD). Further increments (search, aggregate, collections config, tenants, RBAC, backup, aliases) will follow.

CI + infrastructure

  • test-go CI job in docs_tests.yml (mirrors Test Java): clones the go-client at go_client_branch (default v6), injects a -replace, runs the Go snippet tests. New go_client_branch workflow_dispatch input.
  • _includes/code/go-v6/ — a tested Go module.
  • go6 "Go v6" language tab with a go6 <-> go fallback, so a global "Go v6" selection degrades to the v5 Go tab on pages without a v6 snippet.
  • Branch-scoped CI gate: a workflow_dispatch on this branch runs only the Go job (the other languages are skipped) to avoid cross-language noise while iterating; main and the weekly schedule still run everything.

Content (increment 3a)

  • client-libraries/go.md — v6 preview admonition + "What changed in the v6 client" section.
  • Connect (connect-local, connect-cloud, OIDC include) and object CRUD (create / read / update / delete, cross-references) gain go6 tabs.
  • Operations not yet in the v6 client (partial update, fetch-by-id, cross-reference update/delete) render a "Coming soon" go6 tab rather than an empty panel.

Pre-release note

The v6 client is pre-release (v6.0.0-alpha.4) and not yet on the Go module proxy, so go.mod intentionally has no replace directive; CI injects it from a clone of the v6 branch (mirroring the Java lane). Editors show import errors on the committed state; that is expected and resolves under the CI replace. Draft until more of the surface lands.

Testing

The test-go lane passed in CI (4 smoke tests green against the live v6 client). Locally, go vet / go build pass against the v6 source; the doc build + full live snippet run are covered by this PR's checks and the Go-only dispatch.

…nguage tab

Bootstraps CI for the Go client (previously zero Go docs coverage), scope-capped
to a smoke set: connect, create-collection, insert, basic fetch.

- _includes/code/go-v6/: new Go module with // START/// END-marked *_test.go
  snippets for the four smoke ops, plus main.go anchor and shared helpers.
  Committed go.mod requires a placeholder version with no replace; the client
  is not on the module proxy yet, so CI redirects it to a fresh clone.
- .github/workflows/docs_tests.yml: new test-go job mirroring test-java
  (setup-go, clone + go mod edit -replace + go mod tidy, pytest -m go, same
  handle-test-results wiring), a go_client_branch dispatch input defaulting to
  the branch tip, and a GO_VERSION env. Ollama/Keycloak steps omitted (the
  smoke set needs neither embeddings nor OIDC).
- tests/test_go.py + go marker in pytest.ini: pytest wrapper shelling go test.
- src/theme/Tabs/index.js: go6 LANGUAGE_CONFIG entry plus a go6<->go family
  fallback so a global "Go v6" selection degrades to the Go tab instead of a
  dead panel. FilteredTextBlock.js gains a matching go6 DOC_SYSTEMS entry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 1   low 0   info 0 View in Orca
☢️ The following Vulnerabilities (CVEs) have been detected
PACKAGE FILE CVE ID INSTALLED VERSION FIXED VERSION
high google.golang.org/grpc ...es/code/go-v6/go.mod GHSA-hrxh-6v49-42gf v1.81.1 1.82.1 View in code

g-despot added 3 commits July 22, 2026 18:19
…e 3a)

Focused v6 Go client rollout: document the implemented surface with tested
snippets, Coming-soon placeholders only where a touched page needs a go6 tab
for a not-yet-implemented feature.

Snippets (tested module _includes/code/go-v6/, mirrors the java-v6 lane):
- connect_test.go: NewLocal, custom host+port, local API key, local + cloud
  third-party header keys, NewWeaviateCloud, OIDC bearer token.
- manage_objects_test.go: Data.Insert (create), full Data.Replace (update),
  Data.Delete (by id), Data.DeleteSelected (delete-many by filter); placeholders
  for partial merge and fetch-by-id.
- cross_references_test.go: Data.AddReferences (one-way); placeholders for
  cross-reference delete and update.

Docs:
- client-libraries/go.md: :::info Go client v6 admonition + "What changed in the
  v6 client" section (language-agnostic prose, no version numbers, no em dashes).
- connections/connect-local, connect-cloud, oidc-connect include: go6 tabs.
- manage-objects/create, update, delete, read; manage-collections/cross-references:
  go6 tabs.

Validated locally with the CI replace injected: go mod tidy && go vet ./... &&
go build ./... && go test -run '^$' ./... all pass; committed go.mod keeps
require-no-replace.
…oon panels, go tab highlight)

- go.md: fix broken how-to link ../../guides.mdx -> ../guides.mdx (target is
  docs/weaviate/guides.mdx; matches sibling csharp.mdx).
- go-v6 placeholders: move the TODO[g-despot] lines above the START markers in
  all 4 Coming-soon blocks (manage_objects_test.go UpdateMerge/ReadObject,
  cross_references_test.go Delete Go/Update Go) so the rendered Go v6 tab shows
  only "// Coming soon"; TODOs stay in-file and greppable (java-v6 convention).
- connect-cloud.mdx: fix syntax highlighting on the two v5 Go tabs
  (language="py" -> "go" for APIKeyWCD and ThirdPartyAPIKeys).

Validated: go vet ./... && go build ./... pass with CI replace injected; committed
go.mod keeps require-no-replace. All 4 placeholder START..END regions confirmed to
contain only "// Coming soon".
@g-despot g-despot changed the title docs(ci): add Go v6 (go6) snippet-test lane, tested module, and language tab [scaffold] docs: Weaviate v6 Go client — Go docs CI lane, tested go6 snippets (connect + CRUD), language tab Jul 22, 2026
g-despot and others added 10 commits July 22, 2026 21:05
Add tested Go v6 snippets and parallel go/go6 tabs across the search and
aggregate how-to pages, continuing the focused v6 rollout.

Snippets (tested module _includes/code/go-v6/, compiled against v6 @f4fde3e):
- search_basic_test.go: OverAll fetch variants (list, limit, offset,
  properties, vector, id, cross-refs, metadata, multi-tenancy).
- search_test.go: NearText, NearVector, named-vector nearText, distance
  cutoff, limit/offset, autocut, group-by, filtered vector search.
- hybrid_test.go: Hybrid basics, score, alpha, fusion, properties, property
  weighting, explicit vector, limit, autocut, filter.
- filters_test.go: query/filter Cond/And/Or/Not, contains-any/all/none, like,
  reference-path, len, id/timestamp/null-state, near-text + filter.
- aggregate_test.go: Aggregate.OverAll (count, text, integer, group-by) plus
  Aggregate.NearVector.
- search_placeholders_test.go: Coming-soon placeholders (skip + marker) for
  near-object, geo filter, aggregation over near-text/hybrid, filtered
  aggregation.

Docs: go6 tabs added beside the existing go tabs on search/basics,
search/similarity, search/hybrid, search/filters, search/aggregate.

Validated with the CI replace injected: go vet ./... && go build ./... &&
go test ./... -run '^$' all pass; committed go.mod keeps require-no-replace.
…arget (phase 3c)

Phase 3c of the Weaviate v6 Go client docs: add parallel "Go v6" (go6)
tabs beside the existing "Go" tabs for the fully-implemented management
APIs, backed by real, compile-verified snippets under
_includes/code/go-v6/.

Snippet files (package main, compile-only; runtime tests skip and stay
out of test_go.py's -run set):
- tenants_test.go     multi-tenancy: MT config + auto-tenant, tenant
                      Create/Get(list)/Delete, tenant-scoped
                      insert/search/cross-ref
- rbac_test.go        roles (create with each permission category,
                      add/remove permissions, exists/get/list/assigned
                      users/delete), DB + OIDC users, OIDC groups,
                      role->group assignments
- backup_test.go      Create/Restore + Get*Status + Cancel* + await
                      helpers (AwaitCompletion / WithPollingInterval)
- aliases_test.go     alias Create/List/Get/Update/Delete + use-in-query
- multi_target_test.go  multi-target vectors: Sum/Min/Average/
                      ManualWeights/RelativeScore, Weighted, VectorName

Pages updated (63 go6 tabs total): multi-tenancy, collection-aliases,
rbac/manage-roles, rbac/manage-users, rbac/manage-groups, deploy backups,
search/multi-vector.

Two "// Coming soon" placeholders for ops the v6 client does not expose
yet: collection Update (UpdateAutoMT) and list-known-OIDC-groups
(GetKnownOidcGroups).

Verified: go vet ./... and go build ./... pass against the local v6
client via a temporary replace directive (dropped before commit);
go.mod/go.sum unchanged; gofmt clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5
…hase 3d)

Add "Go v6" tabs only on config sections the v6 Go client actually
implements: collection create/read/exists/list, properties + data types +
tokenization + nested, named/multi vectors, model2vec + self-provided
vectorizers, HFresh vector index, RQ compression, inverted index / BM25 /
stopwords, sharding, and replication.

Sections where v6 does not yet implement the operation (collection
update/alter, add-property, add named vectors to existing, multi-vector
embeddings, drop inverted index, PQ/BQ/SQ, non-model2vec vectorizers,
generative/reranker config, enable-compression-on-existing) get no go6 tab
and no placeholder; their existing go (v5) tab is left untouched.

Snippets live in _includes/code/go-v6/ (manage_collections_test.go,
vector_config_test.go, collection_config_test.go, compression_test.go),
verified against the v6 source at /private/tmp/go-client-v6 with
go vet ./... and go build ./... under a local replace directive. Config
snippets t.Skip a live server and stay out of the CI -run set.
…s stay compile-only

The test_manage_collections run pattern `TestCreateCollection` is an
unanchored regex that now also matches the new compile-only config tests
(TestCreateCollectionWithProperties / WithVectorizer / WithNamedVectors).
Anchor it to `TestCreateCollection$` so the CI run-set is exactly the
intended base smoke test; the new config tests stay out of the -run set and
remain compile-only (mirrors how 3b/3c model-dependent tests are handled).
…nce is anonymous)

TestConnectLocalAuth called NewLocal(WithAPIKey(...)), which dials the default
localhost:8080. In docs CI that port is the ANONYMOUS instance, so the auth
header returns HTTP 401. The API-key instance runs on a separate non-default
port (8099/50052) that NewLocal's defaults cannot target, and Go snippets are
not port-substituted the way Python/TS snippets are. Its old skip-guard
(WEAVIATE_API_KEY == "") did not fire because CI sets WEAVIATE_API_KEY.

Fix: make TestConnectLocalAuth skip unconditionally with a clear reason, keeping
the displayed NewLocal(WithAPIKey(...)) snippet idiomatic (java-v6 instead hard-
codes CI ports 8099/50052 into its rendered snippet; we keep ours clean and skip).

Also rename TestConnectWeaviateCloud -> TestConnectCloud so it falls inside the CI
run-set regex (TestConnectLocal|TestConnectCloud) and skips cleanly via its
WEAVIATE_URL guard.

Connect run-set audit (go test -run 'TestConnectLocal|TestConnectCloud'):
- TestConnectLocalNoAuth: runs, passes (anon 8080 smoke).
- TestConnectLocalAuth: runs, SKIPS (was 401).
- TestConnectLocalThirdPartyAPIKeys: runs, skips when COHERE_API_KEY unset
  (harmless header on anon 8080 if set).
- TestConnectCloud / TestConnectCloudThirdPartyAPIKeys: run, SKIP (WEAVIATE_URL unset).
- TestConnectCustomURL / TestConnectOIDC: not matched by the regex, not run.

Validated: go vet ./... && go build ./... pass with CI replace injected; go.mod
keeps require-no-replace.
Broaden the Go v6 docs lane past the 4-test smoke set so every snippet
test that needs NO new provisioning executes live against the anonymous
:8080 instance CI already starts.

test_go.py: replace the four narrow `-run`-pattern parametrized cases
with a single `@pytest.mark.go` test that runs the whole suite
(`go test ./... -v -count=1`, no `-run`). Selection is now by `t.Skip`,
not a run pattern: every test without a skip executes; every test with
one is excluded. Failure formatting/truncation is unchanged.

go-v6 module: make `t.Skip` presence match the Tier-1 boundary.
- Un-skip 10 Tier-1 tests that self-seed with BYO vectors (no vectorizer,
  auth, or external seed): TestBasicCreateCollection,
  TestCreateCollectionWithProperties, TestCheckIfExists,
  TestReadAllCollections, TestEnableMultiTenancy, TestEnableAutoMT,
  TestEnableInvertedIndex, TestSetInvertedIndexParams,
  TestShardingSettings, TestDistanceMetric.
- Add `t.Skip("enabled in a later CI tier")` to 28 non-Tier-1 tests that
  the whole-suite run would otherwise execute and fail (they need a
  vectorizer / seed / auth): all of filters_test.go (14) and
  hybrid_test.go (10), plus TestGetWithCrossRefs, TestMultiTenancy
  (search_basic), TestGetNearText, TestNamedVectorNearText.

Result: the non-skipped set is exactly the 33 Tier-1 tests plus the 4
pre-existing baseline smoke tests (TestConnectLocalNoAuth,
TestCreateCollection, TestCreateObject, TestBasicQuery). Tiers T2-T6
(seed/auth/vectorizer) stay skipped. `go vet`/`go build` clean under the
local client replace; go.mod left with no replace directive.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5
test_go.py: on failure, list EVERY `--- FAIL:` line grepped from the full
captured stdout (the tail alone can hide failures that occurred early in
the run) and bump the stdout tail from 80 to 200 lines, so each CI run
surfaces the complete failure set. Also drop the unused `result` capture.

TestReplaceObject: skip with a documented reason. Root cause is a
go-client v6 (alpha) bug, NOT the snippet: Data.Replace serializes the PUT
body without the object id (sends it only in the URL path), but Weaviate's
class-scoped PUT handler requires the body id to equal the path id
(usecases/objects/update.go), so the server returns HTTP 422 "field 'id'
is immutable". The published UpdateReplace snippet is already idiomatic and
carries the UUID; re-enable once the client sends the id. Needs a client
fix (escalated on board 37ea394e).

TestDeleteMany: left running (not skipped). Verified against source: the
seed inserts category="GEOGRAPHY" which the category==GEOGRAPHY filter
matches, the filter targets a filterable text property (same filter.Cond
pattern that passes in TestGetWithFilter), and the res.Errors loop is a
correct no-op when Verbose is unset -- so there is no static defect to fix.
Single-object Data.Delete (TestDeleteObject) passes, so this is
batch-delete-specific; its true runtime error will surface via the
improved reporting on the next CI run.

Tier-1 boundary otherwise unchanged; no new tests un-skipped.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5
…eMany; triage aggregate

test_go.py: on failure, extract each failing test's own RUN..FAIL block from
the captured stdout (walking back from `--- FAIL: TestX` to `=== RUN   TestX`)
and include every block in the pytest.fail details, alongside the failing-test
name list and the 200-line tail. Early failures (e.g. the aggregate tests,
which run first) no longer lose their real error to the tail.

TestConnectOIDC: skip. The default-port CI instance is anonymous with no OIDC
provider, so dialing it with a bearer token fails discovery with HTTP 404
"get openid configuration". OIDC needs an OIDC-configured instance (a later
tier). Snippet unchanged.

TestDeleteMany: skip. Confirmed CLIENT bug (not the snippet): Data.DeleteSelected
panics because *api.DeleteObjectsRequest is not wired into the gRPC transport
dispatch (internal/api/transport/transport.go:129-144 has no BatchDeleteRequest
case) -> dev.Assert(false, "...does not implement MessageMarshaler..."). Snippet
unchanged. Escalated on board 37ea394e.

Aggregate (5 tests): triaged, LEFT RUNNING. Not the same class of bug -- the
transport DOES have the aggregate case (transport.go:133), AggregateRequest
implements the full Message interface, and request-building / single-result
parsing are structurally sound. So aggregate is not clearly broken client-side;
Task-1 reporting will surface each test's real error on the next run. (One
caveat noted: internal/api/aggregate.go:293 by.GetPath()[0] could index-panic on
an empty group path, but that affects only GroupBy, not all five.)

go vet + go build clean under the local client replace; go.mod left with no
replace directive.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5
…esh distance test on old CI server

setupJeopardySearch built the "default" named vector as an empty VectorConfig
`{}`. That serializes to an empty vectorConfig.default, which the server rejects
at create time with HTTP 422 code 602 "vectorConfig.default in body is required"
(entities/models/class.go:217 validate.Required fails on the zero value). This
blocked ALL of search_basic_test.go, search_test.go, and aggregate_test.go (~16
tests) via their shared seed.

Not a client bug: the VectorConfig doc contract (collections/collection.go:86-91)
says that when no vectorizer module is selected the field must be set to the
"none" option. HELPER FIX: setupJeopardySearch now uses
`{Vectorizer: selfprovided.Vectorizer}` (Name() == "none"), which makes the
config non-zero; no index is required (the server defaults vectorIndexType to
hnsw). The fix is outside the // START/// END markers, so the published snippets
are unchanged. This unblocks the ~16 seed-dependent tests.

TestDistanceMetric: skipped. It creates its own collection with an explicit
selfprovided vectorizer, so it never hit the 602 -- it fails because it sets the
distance on vectorindex.HFresh, the v6 client's ONLY registered index, and docs
CI pins WEAVIATE_VERSION 1.35.0, which predates HFresh and rejects it with
HTTP 422 "invalid vector index 'hfresh'". No HNSW index type exists in the v6
client to substitute, so this needs a newer server (>= 1.37). Snippet unchanged.

Note: docs CI runs Weaviate 1.35.0 (docs_tests.yml), not the 1.38 the CodeBrief
assumed -- relevant for any version-gated feature.

go vet + go build clean under the local client replace; go.mod has no replace
directive.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5
…ectors idiom)

Add Name: "default" to the target vector in the 7 NearVector query snippets
(6 in search_test.go, 1 in aggregate_test.go) so the query target matches the
seed collection's "default" named vector, instead of sending an empty-name
target that the server cannot resolve. This is the correct v6 named-vectors
idiom (cf. example/basic/main.go). Approved published-snippet change.

The 6 search NearVector tests now pass live against Weaviate 1.38.

Two tests surfaced separate, newly-unmasked blockers and are skipped with
accurate reasons pending decisions:
- TestAggregateNearVector: Weaviate 1.38 panics server-side (nil pointer) on
  aggregate near-vector over a BYO/selfprovided collection, for every query
  shape tested. Core/server bug; the snippet is wired to no docs page.
- TestDistanceMetric: HFresh IS supported on 1.38 (the "1.35.0" WEAVIATE_VERSION
  workflow var is stale/unused; the compose files pin 1.38.0) — this corrects
  the old, false skip reason. Remaining blocker: HFresh requires
  maxPostingSizeKB >= 8, but the published vector-config.mdx snippet leaves it
  at 0. Verified MaxPostingSizeKB: 8 fixes it; the published-content change is
  pending sign-off.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmugebxuspdSQrFKE883W5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant