Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Cluster Dashboard: add an Operations surface (live currentOp + kill)

未关闭
#910 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
30/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
活跃
技术栈
typescript, vscode

调研方向

从 src/webviews/documentdb/clusterDashboard/components/OperationsTab.tsx 和 operationHistory.ts 中的原型开始,然后跟踪 clusterDashboardRouter.ts 中的 getCurrentOperations、killOperation 和 clearOperationHistory。阅读 getClusterHealth.ts 及其测试,以了解当前操作范围、脱敏、历史记录和平台限制。完成的标准是:明确解决界面设计、轮询行为、权限提示、终止状态、临时历史记录以及不支持平台上的行为。

由索引模型根据 Issue 内容生成。

描述

Summary

Add a Operations surface to the Cluster Dashboard: a live view of what the cluster is currently doing, with the ability to inspect and terminate a running operation.

This was prototyped inside the Cluster Dashboard PR (#823) but has been pulled out of that PR's scope. The dashboard now leads with the storage/inventory view alone, and Operations should land as its own focused change so it gets the design and review attention it needs.

Why it is worth its own work item

The prototype surfaced several questions that are about operations monitoring specifically, not about the dashboard shell, and each of them deserves a deliberate answer rather than a default:

  • currentOp breadth varies by privilege. On a least-privileged connection the chain falls back to the caller's own operations, so a count of "1" can mean one operation on an idle cluster or one of yours among hundreds. The scope has to be reported alongside the number, or the number misinforms.
  • killOp is not an acknowledgement. It replies {ok: 1} whether or not anything matched, so the UI can only distinguish requested / cancelled / gone / failed / unverified — it can never truthfully say "the operation has been killed".
  • Operations are transient. An operation seen in one poll is usually absent from the next, so a plain snapshot table flickers and cannot be acted on. The prototype kept an observed-operation history keyed by occurrence identity; whether that is the right model is an open design question.
  • Command payloads carry customer data. A current operation includes query filter values, document contents and the client address that issued them. Anything that displays, copies or exports them needs an explicit redaction and consent story.
  • Platform support is uneven. Azure DocumentDB (vCore) rejects serverStatus, so anything derived from it is unavailable there and the surface has to degrade honestly rather than showing a sampling artifact dressed up as a rate.

Existing material

A working implementation is on feature/cluster-dashboard-poc and can be used as the starting point:

  • src/webviews/documentdb/clusterDashboard/components/OperationsTab.tsx — the live table, history accordion, and kill flow
  • src/webviews/documentdb/clusterDashboard/operationHistory.ts (+ tests) — occurrence identity and the observed-operation window
  • clusterDashboardRouter.ts — getCurrentOperations, killOperation, clearOperationHistory
  • src/documentdb/utils/getClusterHealth.ts — listCurrentOperations, killOperation, CURRENT_OP_SHARE_WINDOW_MS, and buildCommandPreview's redaction

Note that operationHistory.ts and listCurrentOperations are still in use: the dashboard's View Raw Diagnostics document reports current and observed operations even with the tab gone.

Open questions for the work item

  • Is Operations a tab on the Cluster Dashboard, a separate view, or a tree surface?
  • Does it poll continuously, or on demand? Continuous polling of a production cluster from a panel nobody is looking at is the failure mode to avoid.
  • What is the minimum privilege set it should support, and what does it say when it has less?
主要语言
TypeScript
星标
34
派生
22
平均合并
16 小时 35 分钟
30 天内合并 PR
48

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/vscode-documentdb 的其他 Issue

查看 microsoft/vscode-documentdb 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。