microsoft / microsoft/vscode-documentdb

Add current operations and kill operation support to Cluster Dashboard

Open
#914 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
31
Forks
22
Avg merge
2d 20h
Merged PRs (30d)
21

Description

Summary

Add a focused Current Operations experience to the Cluster Dashboard, including the ability to request that a running operation be killed.

This capability was removed from PR #823 so the inventory-focused dashboard could move forward faster. It should return as an independent feature with its own privilege handling, safety checks, polling behavior, and tests.

User experience

  • Show active user operations reported by $currentOp when the connected server supports it.
  • Present useful fields such as operation type, namespace, duration, client, and a safe command summary.
  • Refresh while the operations view is visible and stop polling when the dashboard is hidden.
  • Allow eligible operations to be killed from the dashboard.
  • Require confirmation before sending killOp.
  • Report that the kill request was accepted without claiming that the operation definitely stopped.
  • Explain unsupported commands and insufficient privileges without breaking the rest of the dashboard.

Safety and privacy requirements

  • Revalidate the selected operation immediately before sending killOp because operation identifiers can be reused.
  • Preserve operation identifier types instead of assuming they are numeric.
  • Exclude internal server work and the dashboard's own inspection requests from the user operation list.
  • Redact credentials and authentication payloads before operation data reaches the webview, logs, telemetry, or diagnostics.
  • Bound result size and prevent overlapping polls.
  • Do not poll while the webview is hidden.
  • Localize all user-facing text and keep confirmation and result messages accessible.

Acceptance criteria

  • Supported clusters show a current operations list that refreshes without overlapping requests.
  • Unsupported or privilege-limited clusters show an actionable unavailable state while the inventory remains usable.
  • Eligible operations expose a kill action with a confirmation step.
  • The implementation checks that the same operation is still active before sending the kill request.
  • Kill results distinguish request acknowledgement, already completed operations, rejected requests, and errors.
  • Sensitive command fields are redacted before crossing the extension host boundary.
  • Polling stops when the dashboard is hidden and resumes with an immediate refresh when shown.
  • Automated tests cover filtering, redaction, privilege degradation, recycled operation identifiers, polling lifecycle, and kill outcomes.

Out of scope

  • Recently observed operation history across polling intervals.
  • Activity charts, opcounters, and broader cluster health monitoring.
  • Azure Monitor integration.

Related work

  • PR #823
  • Issue #61

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing Cluster Dashboard implementation and related work in PR #823, then trace how $currentOp and killOp would cross the extension-host and webview boundary. Define the filtering, redaction, privilege, polling, confirmation, and revalidation tests described in the acceptance criteria. Done means supported and unavailable states, safe kill outcomes, lifecycle-aware polling, and automated coverage for the listed cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
database, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.