mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
test(ui): drop the e2e typecheck CI gate, keep the typed import for the editor
The e2e runs against the real proxy, so a contract drift already fails the test at runtime; tsc only checks the spec against schema.d.ts, a generated snapshot, so a backend change with a stale snapshot would pass tsc while the live test still catches it. The dedicated tsconfig + script + CI step were circular ceremony for that. Keep the zero-runtime-cost type-only import, which still catches mistakes in the editor, and make its comment honest about what enforces the contract.
This commit is contained in:
parent
3971469b71
commit
4f41a9e140
4 changed files with 3 additions and 22 deletions
|
|
@ -2687,14 +2687,6 @@ jobs:
|
|||
paths:
|
||||
- ui/litellm-dashboard/node_modules
|
||||
- ~/.cache/ms-playwright
|
||||
- run:
|
||||
name: Type-check E2E specs
|
||||
# The specs type their request/response round-trips against the generated
|
||||
# OpenAPI schema; this step turns that typing into a real gate, so a backend
|
||||
# contract drift fails here instead of silently passing at runtime.
|
||||
command: |
|
||||
cd ui/litellm-dashboard
|
||||
npm run typecheck:e2e
|
||||
- run:
|
||||
name: Build UI from source
|
||||
# Prior version used `cp -r out/ ../../litellm/proxy/_experimental/out/`.
|
||||
|
|
|
|||
|
|
@ -3,10 +3,9 @@ import { ADMIN_STORAGE_PATH } from "../../constants";
|
|||
import { navigateToPage } from "../../helpers/navigation";
|
||||
import { Page } from "../../fixtures/pages";
|
||||
import { Role, users } from "../../fixtures/users";
|
||||
// Type-only import of the OpenAPI-generated backend schema. esbuild erases it at
|
||||
// runtime; the round-trip below is enforced by the `typecheck:e2e` CI step (tsc over
|
||||
// e2e_tests), so a drift in the /config/update or /router/settings contract fails the
|
||||
// build rather than silently passing here.
|
||||
// Type-only import of the OpenAPI-generated backend schema, erased at runtime by
|
||||
// esbuild. It types the round-trips below so mistakes surface in the editor; the live
|
||||
// test against the real proxy is what actually enforces the contract.
|
||||
import type { components } from "../../../src/lib/http/schema";
|
||||
|
||||
// These tests mutate the proxy's shared router_settings, and the Loadbalancing save
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": ["**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
|
@ -19,7 +19,6 @@
|
|||
"e2e:ui": "playwright test --ui --config e2e_tests/playwright.config.ts",
|
||||
"e2e:migration": "playwright test e2e_tests/tests/migration/migratedPages.spec.ts --config e2e_tests/playwright.config.ts",
|
||||
"e2e:migration:root": "playwright test --config e2e_tests/migration.serverRootPath.config.ts",
|
||||
"typecheck:e2e": "tsc -p e2e_tests/tsconfig.json --noEmit",
|
||||
"knip": "knip",
|
||||
"knip:fix": "knip --fix",
|
||||
"gen:api": "node scripts/gen-api-types.mjs"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue