Skip to content

F11, and the dev test targets run the suite - #300

Open
dcmcand wants to merge 1 commit into
mainfrom
journeys/s8-f11-targets
Open

dcmcand wants to merge 1 commit into
mainfrom
journeys/s8-f11-targets

Conversation

@dcmcand

@dcmcand dcmcand commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Slice 8: F11, and the dev test targets run the suite

F11 (endpoint conditions report a broken gateway and heal) joins the integration tier. make test-auth, test-model-scope, usage-e2e and usage-forgery-check now run their features through the journey suite on the integration profile. Every suite run checks the configured JWKS URLs from one probe pod before any test runs, and leaves a diagnostics directory behind.

Design: CI that enforces the features we offer (integration and user journey tiers), phase 1. The spec and plan are kept locally; this PR is Slice 8 of 13.
Contracts touched: in docs/architecture/contracts.md:

  • the operator setting LLM_INTERNAL_GATEWAY_NAME, with F11 as its one writer outside provisioning
  • the four make targets
  • the dev cluster Gateway layout (migrate phase: the dev operator moves to the shared nebari-gateway)
  • the diagnostics directory
  • NIC's in-cluster Keycloak URL, promoted, with preflight as its first consumer
  • the probe pod preflight makes, noted in the Target entry

Depends on: nothing open (based on main after #290).

What changes

  • F11 (journeys/test_zz_gateway_failure.py, llm_journeys/operator.py):

    • Points the operator's LLM_INTERNAL_GATEWAY_NAME at a Gateway that does not exist. The internal endpoint condition must go RoutePending, then RouteNotAccepted, while ExternalEndpointReady stays True.
    • Restores the value it read and checks the model heals with no edit.
    • internal_gateway_name is the only suite code that patches a Deployment. It refuses any target where operator_reconfig_allowed is false (kind-dev only), restores in a finally and waits for each rollout. F11 runs last.
  • JWKS check in preflight (llm_journeys/preflight.py). One short-lived journey- probe pod GETs each configured JWKS URL:

    • the operator's LLM_OIDC_JWKS_URL
    • the key-manager's LLM_KEYCLOAK_URL plus /realms/<realm>/protocol/openid-connect/certs, built as key-manager/cmd/main.go builds it
    • the console's OIDC_KEYS_URL

    The pod is deleted before preflight returns. Three outcomes have three distinct messages: pod not ready, non-200 (with a pointer at the Keycloak base path), and no HTTP answer. make profile-check leaves the check out and stays read-only. The check uses a probe pod because the pack images are distroless and cannot be exec'd into.

  • Diagnostics (tests/journeys/collect-diagnostics.sh, run-suite.sh):

    • What is collected: after pytest and before the report, whatever pytest returned, results/diagnostics/ gets:
      • current and previous logs of the operator, key-manager, usage console, collector, envoy-gateway, ai-gateway-controller and gateway proxy pods
      • events
      • LLMModel, PassthroughModel, SecurityPolicy, HTTPRoute and Argo CD Application objects
      • the provisioning record
    • Safety:
      • every kubectl call names the context and a timeout, and has a watchdog, so the run ends within the bound the script prints
      • no call reads a Secret
      • the collector runs only for a context the suite's local-kind guard accepts
      • its exit code never changes the run status
  • Make targets (dev/Makefile):

    • The four targets run integration-up when profile-check fails, then their features: F4, F8, F10 and F12, F14.
    • Every suite run holds a per-checkout lock (llm_journeys.runlock, an flock the kernel releases however the run ends). A second run fails at once instead of reinstalling nebari_journeys under the first.
    • dev/manifests/operator.yaml and the usage tracer move to nebari-gateway. The old scripts and the second Gateway go in the next slice.
  • LeaseHeld message. A run killed with SIGKILL leaves the session Lease held for up to 15 minutes. The message now gives the expiry time, says the holder may be a killed run, and points at make -C dev integration-up for a run killed inside F11.

Validation

CI does not run the journey tiers yet; these were run locally against the dev cluster (kind, full integration profile, OpenMeter on).

Step Command Result
unit cd tests/journeys && pixi run pytest tests_lib -W error 312 passed
scripts run-suite.test.sh, collect-diagnostics.test.sh, dev/tests/profile-check-branch.test.sh pass
F11 make -C dev integration-test FEATURES=F11 passed (247 s); the operator setting back to nebari-gateway
full tier make -C dev integration-test FEATURES=F2,F4,F5,F6,F7,F8,F9,F10,F11,F12,F14 exit 0 (1179 s): every feature passed except F14's #286 known failure; no journey- pods left
distroless kubectl exec deploy/llm-key-manager -- sh -c true fails: sh not found, so preflight uses a probe pod
diagnostics ls -R tests/journeys/results/diagnostics/ 24 items, 0 failed; applications.yaml absent on kind-dev (no Argo CD)
unreachable cluster control-plane container stopped, then paused 0.4 s and 80 s against the stated 88 s bound; one error file per item
concurrency a second integration-test while one runs exits at once naming the holder; the first run passes, its helper package unchanged
killed F11 kill -9 during F11, then the next run LeaseHeld until the lease expires, then preflight names the setting; make integration-up restores; next run passes
targets after make deploy: the four targets each ran integration-up, then only its features; exit 0
tracer, dev loop make usage-e2e && make usage-tracer; make deploy && ./run-dev.sh work
rebased on main after #290: make integration-up, make integration-test FEATURES=F4,F11 unit 312 passed; integration-up exit 0; F4 and F11 passed; no journey- pods left

… on the suite

F11 points the operator's LLM_INTERNAL_GATEWAY_NAME at a missing Gateway
and checks the internal endpoint goes RoutePending, then RouteNotAccepted,
while the external endpoint stays Ready, then heals once the read value is
restored. llm_journeys.operator is the only code that patches a Deployment;
it refuses targets where operator_reconfig_allowed is false.

preflight now GETs each configured JWKS URL (operator LLM_OIDC_JWKS_URL,
key-manager LLM_KEYCLOAK_URL plus the realm certs path, console
OIDC_KEYS_URL) from one short-lived journey- probe pod, deleted before
preflight returns. make profile-check leaves the check out and stays
read-only.

collect-diagnostics.sh writes results/diagnostics/ after every suite run:
component logs (current and previous), events, model, route and policy
objects, Argo CD Applications and the provisioning record, every call
bounded by a timeout and never reading a Secret. run-suite.sh clears the
directory before pytest, runs the collector after pytest whatever it
returned, only for a context the suite's local-kind guard accepts, and
never lets the collector change the run status.

make test-auth, test-model-scope, usage-e2e and usage-forgery-check now run
integration-up when profile-check fails, then F4, F8, F10+F12 and F14
through the suite. Every suite run holds a per-checkout lock
(llm_journeys.runlock) so a second run fails at once instead of
reinstalling helpers under the first. The dev operator manifest and the
usage tracer move to the shared nebari-gateway.
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

📄 Docs preview for journeys/s8-f11-targets:
https://journeys-s8-f11-targets.llm-serving-pack.pages.dev

@jbouder jbouder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved.

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.

2 participants