Auto-detection of Elasticsearch and Kibana version being used
メンテナーはふだん 1 日以内に返信
@JoshMock がすでに取り組んでいます。
2026年10月13日 から。
評価
この issue はまだ評価されていません。
説明
Following the work done in #530, the CLI should be able to auto-detect what versions of Elasticsearch and Kibana it is targeting, so that the commands and flags exposed align with what features are available in that version.
Requirements
elasticsearch.versionandkibana.versiontype changes from a semverstringtostring | { value: string, checked_ts: string }wherevalueis the semver string (orserverless), andchecked_tsis an ISO 8601 datetime string describing when that version was last checked.- The first time a CLI command is issued targeting an Elasticsearch or Kibana instance that has no
versionvalue set in its config file, it fetches the version first (GET /for Elasticsearch,GET /api/statusfor Kibana), setting it in the config using the{ value, checked_ts }form. Once the sniff is complete, the original command runs as normal, with commands filtered for the detected version. - Running
elastic statusalso sniffs and sets the sameversioninformation. - If
checked_tscontains a date more than 30 days in the past, re-run the sniff and update the values. - A
versionset as a plain string is treated as user-pinned: it is never sniffed, refreshed, or overwritten. Only the{ value, checked_ts }form expires. - An optional top-level
detect_version: booleankey (applies to all contexts) controls detection. Defaults totrue. If set tofalse, always skip the sniff step even if aversionvalue is not set. - If the config file is not writable, the sniff step should be skipped.
Implementation details
- Timing: the sniff runs during early config loading, before command registration, so availability filtering uses the detected version on the same invocation.
- Skipped modes: never sniff on
--helpor--dry-run. - Credentials: secrets (including
$(cmd:...)expressions) are resolved early only when a sniff is actually due. Invocations that do not need a sniff keep the current behavior from #706 (no early secret resolution). - Writing the config: update only the
contexts.<name>.<service>.versionnode usingyaml'sparseDocument, preserving the user's comments and formatting. Do not round-trip throughwriteConfig/serializeConfig, which drops comments. - Sniff failure (network error, 401, 404, unparseable response): fail open. Print a one-line warning to stderr (suppressed with
--json), continue without a version (all commands available), and write nothing. The next invocation retries. - HTTP: sniff requests set
redirect: 'error', like the other credentialed requests.
authored by Pi Coding Agent (Claude Opus 5.5)
- 主要言語
- TypeScript
- スター
- 49
- フォーク
- 27
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 67
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
elastic/cli のほかの issue
-
feat: ship skills/elastic/SKILL.md for agent invocation対応中かも @onatozmenn が 19 日前に担当しました。 オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
メンテナーはふだん 1 日以内に返信
-
refactor(config): drop unused safeParse wrappers and stale Zod comments in config/schema.ts対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 3/5 半日 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
bug category:ai category:devices effort:s
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
LanternOps/breeze#8943 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
area:reliability difficulty:easy help wanted points:100 Stellar Wave
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
Divinity-Labs/Lens#341 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信