Skip to content

Run Weaviate E2E with the Kubernetes Agent backend - #24830

Draft
vitkyrka wants to merge 1 commit into
masterfrom
vwhitchurch/weaviate-kubernetes-agent-e2e
Draft

Run Weaviate E2E with the Kubernetes Agent backend#24830
vitkyrka wants to merge 1 commit into
masterfrom
vwhitchurch/weaviate-kubernetes-agent-e2e

Conversation

@vitkyrka

@vitkyrka vitkyrka commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Runs the Weaviate Kind E2E with the Kubernetes Agent backend introduced by #24639.

  • The weaviate_api_endpoint now uses the in-cluster Service DNS endpoint, http://weaviate.weaviate.svc.cluster.local:80, backed by the weaviate Service (port: 80 -> targetPort: 8080).
  • The openmetrics_endpoint (port 2112) has no matching Service, so it falls back to the pod IP of the single-replica weaviate StatefulSet, fetched via kubectl get pods -l app=weaviate. Since the host can no longer reach the cluster directly at all, this pod-IP lookup (and the readiness/seeding steps below) now run inside setup_weaviate, which only executes on the initial ddev env start; the resolved pod IP is cached with save_state/get_state so later invocations of the dd_environment fixture (e.g. during ddev env stop, which runs in a fresh process after the cluster is already torn down) don't try to re-resolve it against a cluster that no longer exists.
  • The readiness check and the data-seeding POST to /v1/batch/objects previously ran on the host via requests. Both now run from disposable pods inside the cluster instead: readiness uses a busybox pod running wget (matching the pattern from Run Calico E2E with the Kubernetes Agent backend #24673), and seeding uses a curlimages/curl pod running curl -X POST with the batch payload passed as a -d argument (no shell involved, so the JSON needs no escaping). The seeding command now uses check=True so a failed POST fails the fixture loudly instead of silently producing zero metrics later.
  • USE_AUTH continues to add an Authorization: Bearer test123 header to both the seeding request and the Agent's own weaviate_api_endpoint instance config; the liveness probe used for readiness does not require auth (the StatefulSet's own livenessProbe hits it without credentials either).

Validation, for both E2E environments (py3.13-1.20-no-auth and py3.13-1.20-auth):

  • ddev test -fs weaviate
  • ddev --no-interactive test weaviate (8 passed, 1 E2E skipped)
  • ddev env start --dev weaviate py3.13-1.20-no-auth
  • ddev env test --dev weaviate py3.13-1.20-no-auth (1 passed, 8 deselected)
  • ddev env stop weaviate py3.13-1.20-no-auth
  • ddev env start --dev weaviate py3.13-1.20-auth
  • ddev env test --dev weaviate py3.13-1.20-auth (1 passed, 8 deselected)
  • ddev env stop weaviate py3.13-1.20-auth

Motivation

This PR migrates Weaviate to the new backend, following the same pattern already applied to argo_rollouts (#24674) and calico (#24673), plus the pod-IP fallback pattern from velero (#24645) for the port with no Service. Running the Agent in the same Kind cluster removes the long-lived host-side port-forwards; since the host can no longer reach the cluster at all, the setup/readiness/seeding steps that used to run requests calls from the host now run from disposable in-cluster pods instead.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add qa/required if this PR needs QA validation, or qa/skip-qa if it does not. Exactly one of the two is required.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Switch from host-side kube_port_forward to the new Kubernetes Agent E2E
backend: the API endpoint uses Service DNS, the metrics endpoint falls
back to the pod IP since no Service targets that port, and the
readiness check plus data-seeding POST now run from disposable
in-cluster pods since the host can no longer reach the cluster
directly.

Environment: Datadog workspace

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Copy link
Copy Markdown
Contributor Author

@codex review

@dd-octo-sts

dd-octo-sts Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Validation Report

All 21 validations passed.

Show details
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and code coverage settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
qa-label Validate the pull request declares whether it needs QA for the next Agent release
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Aug 11, 2026

Copy link
Copy Markdown

Tests  Code Coverage

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 27.59%
Overall Coverage: 77.21% (-11.20%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 95d4230 | Docs | Datadog PR Page | Give us feedback!

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

evalya-impact-summary

evalya impact analysis
Impact analysis: 0 selected, 0 skipped (of 0 test tasks)
Publish tasks:   0 (always emitted)
Diff (1 file):
  weaviate/tests/conftest.py

Debug a specific task: evalya plan impact --path <path> --task <task>

Learn more about CI impact filtering

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 95d4230654

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant