Auto-detection of Elasticsearch and Kibana version being used
Maintainer thường phản hồi trong vòng 1 ngày
@JoshMock đang làm issue này rồi.
Từ ngày 13/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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)
- Ngôn ngữ chính
- TypeScript
- Star
- 49
- Fork
- 27
- Merge trung bình
- 1 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 65
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của elastic/cli
-
feat: ship skills/elastic/SKILL.md for agent invocationCó thể đã có người làm @onatozmenn đã nhận 17 ngày trước. Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
elastic/cli#628 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
elastic/cli#617 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Upgrade @elastic/schemas to latestCó thể đã có người làm @JoshMock đã nhận 1 ngày trước. Đang mởauto-pr
elastic/cli#767 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 58/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
vercel/streamdown#673 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs(stream-protocol): document messageMetatadata on start/finish and the message-metadata chunkCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởfactory-active task-identify-harness-labels-done task-identify-issue-type-done
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
vercel/ai#23375 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
agilepathway/label-checker#721 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CLI Empathy needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
chromaui/chromatic-cli#1524 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày