Skip to main content

stack-since

Maintain codegen/functional/stack-since.json, the per-API "introduced in" versions that gate ES and Kibana functional tests by STACK_VERSION. Use when adding a stack version to the Buildkite matrix, bumping @elastic/schemas, or when a functional test fails on an older stack because it calls an API that version lacks.

소스 정보

저장소
elastic/cli
최근 소스 활동
2026년 10월 15일 18:21
감지된 SKILL.md 언어
영어
스타
49
포크
27

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
stack-since
description
Maintain codegen/functional/stack-since.json, the per-API "introduced in" versions that gate ES and Kibana functional tests by STACK_VERSION. Use when adding a stack version to the Buildkite matrix, bumping @elastic/schemas, or when a functional test fails on an older stack because it calls an API that version lacks.
# stack-since `codegen/functional/stack-since.json` maps API action names to the first stack version that has them: ```json { "es": { "esql.get_query": "9.1.0" }, "kb": { "agent-builder.post_agent_builder_agents": "9.2.0" } } ``` ES and KB functional codegen skip a definition when `STACK_VERSION` is older than the newest `since` of any API its `do` steps call (or its own `requires.stack_since`). See `stackSinceFor` in `codegen/functional/parser.ts`. ## Update Run from the repo root. The script fetches both sources from GitHub `main`, so no local clone is needed: ```bash npx tsx .agents/skills/stack-since/scripts/update-stack-since.ts ``` To pin a release branch, or use a local checkout, pass a URL or path for each source (ES first, Kibana second): ```bash npx tsx .agents/skills/stack-since/scripts/update-stack-since.ts \ https://raw.githubusercontent.com/elastic/elasticsearch-specification/9.5/output/schema/schema.json \ https://raw.githubusercontent.com/elastic/kibana/9.5/oas_docs/output/kibana.yaml ``` Then verify: 1. `jj diff codegen/functional/stack-since.json`: check that the new entries are plausible. 2. Regenerate against the oldest matrix version and read the skips: `ELASTIC_ENVIRONMENT=stack STACK_VERSION=9.0.8 npx tsx codegen/functional/kb.ts | rg 'stack_since'` `STACK_VERSION=9.0.8 npx tsx codegen/functional/es.ts --tests-dir <clients-tests>/tests | rg 'stack_since'` 3. `npm run test:unit`. ## Sources | Map | Source | Field | |-----|--------|-------| | `es` | `elastic/elasticsearch-specification` `output/schema/schema.json` | `endpoints[].availability.stack.since`, keyed by `endpoints[].name` (same as the `do` action) | | `kb` | `elastic/kibana` `oas_docs/output/kibana.yaml` | operation-level `x-state` text matching `added in X.Y.Z`, keyed by the CLI command for that method + path | Rules: - Only versions >= 9.0.0 are kept. The oldest tested stack is 9.0, so older APIs never need a gate. - Only API-level data counts. Property-level `since` values (ES) and `x-state` on schemas (Kibana) are ignored. - Kibana keys use the CLI namespace plus the command name with `-` replaced by `_`, because definitions write actions that way (`agent-builder.post_agent_builder_agents`). - Kibana operations with no matching CLI command are listed and skipped. They appear after a `@elastic/schemas` bump adds them; rerun the script then. - Kibana `x-state` without a version (e.g. `Technical Preview`) gives no data. If such an API fails on old stacks, add a `requires.stack_since` to its definition in `test/functional/kb/definitions/` rather than hand-editing the JSON, so the script stays the single writer of the file. ## Pinning the source ref `main` can list APIs that are newer than every version in the matrix. That is harmless: those APIs gate only definitions that cannot pass on the matrix anyway. To match a specific release exactly, pass that release branch's URLs as shown above.
GitHub에서 보기