Skip to content

[KYUUBI #7504][UI] Add a Batch management page to the Web UI#7505

Closed
wangzhigang1999 wants to merge 2 commits into
apache:masterfrom
wangzhigang1999:kyuubi-ui-batch-display
Closed

[KYUUBI #7504][UI] Add a Batch management page to the Web UI#7505
wangzhigang1999 wants to merge 2 commits into
apache:masterfrom
wangzhigang1999:kyuubi-ui-batch-display

Conversation

@wangzhigang1999

Copy link
Copy Markdown
Contributor

Why are the changes needed?

The Web UI has Session/Operation/Engine/Server pages but none for batch jobs (#7504), so batches can only be inspected via raw REST. This adds a Batch page to list / filter / paginate batches, view their details, open a running batch's Spark UI (direct, or via the engine-UI proxy when enabled), tail the batch log live, and cancel a non-terminal batch.

How was this patch tested?

  • Unit tests (vitest) in src/test/unit/views/management/batch/index.spec.ts: driver-UI link gating by batch state, getAppUI proxy/direct URL building, and the log live-tail (incremental offset cursor, stop-on-terminal, buffer cap). cd kyuubi-server/web-ui && npx vitest run → 13/13; npm run lint clean.
  • Manually verified against a running Kyuubi (Spark on Kubernetes and YARN): list / filter / cancel, the driver-UI link showing only for live batches and opening the proxied Spark UI, and the live log tail with auto-scroll.

Was this patch authored or co-authored using generative AI tooling?

Assisted-by: Claude:claude-opus-4-8

@wangzhigang1999

Copy link
Copy Markdown
Contributor Author
20260608191845_副本

@wangzhigang1999

Copy link
Copy Markdown
Contributor Author
image

@wangzhigang1999

Copy link
Copy Markdown
Contributor Author
image

@wangzhigang1999 wangzhigang1999 marked this pull request as ready for review June 9, 2026 02:43
@wangzhigang1999 wangzhigang1999 requested a review from aajisaka June 9, 2026 02:51
@cxzl25 cxzl25 requested a review from Copilot June 9, 2026 04:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Batch management page to the Kyuubi Web UI (backed by existing /api/v1/batches APIs), including listing/filtering, viewing details, opening the running batch’s Spark UI (direct or via engine-UI proxy), tailing logs, and canceling non-terminal batches. It also factors out Engine UI URL building into a shared utility and aligns some UI state handling.

Changes:

  • Add Batch management view, route, nav entry, REST client bindings, and unit tests.
  • Introduce utils/engine-ui helper and refactor Engine page to use it.
  • Update Operation page terminal-state strings.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
kyuubi-server/web-ui/src/views/management/operation/index.vue Adjust terminal operation state names used by the UI.
kyuubi-server/web-ui/src/views/management/engine/index.vue Use shared engine-UI URL builder for tooltip/link behavior.
kyuubi-server/web-ui/src/views/management/batch/index.vue New Batch management page (list/filter/paginate, Spark UI link gating, log tailing, cancel).
kyuubi-server/web-ui/src/utils/use-table.ts Changes error handling behavior for useTable() list fetching.
kyuubi-server/web-ui/src/utils/engine-ui.ts New shared helper for direct vs proxied Engine UI URL building.
kyuubi-server/web-ui/src/test/unit/views/management/engine/index.spec.ts Adjust engine UI URL test setup for proxy-enabled flag.
kyuubi-server/web-ui/src/test/unit/views/management/batch/index.spec.ts Add unit tests for Batch UI link gating and log tail behavior.
kyuubi-server/web-ui/src/test/unit/utils/engine-ui.spec.ts Add unit tests for engine-ui helper URL construction.
kyuubi-server/web-ui/src/router/management/index.ts Add /management/batch route.
kyuubi-server/web-ui/src/locales/zh_CN/index.ts Add Batch/log/pagination-related i18n strings.
kyuubi-server/web-ui/src/locales/en_US/index.ts Add Batch/log/pagination-related i18n strings.
kyuubi-server/web-ui/src/layout/components/aside/types.ts Add Batch entry to Management menu.
kyuubi-server/web-ui/src/api/batch/types.ts Add batch API TypeScript types.
kyuubi-server/web-ui/src/api/batch/index.ts Add batch REST API client functions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread kyuubi-server/web-ui/src/utils/use-table.ts
Comment thread kyuubi-server/web-ui/src/utils/use-table.ts
Comment thread kyuubi-server/web-ui/src/views/management/batch/index.vue
Comment thread kyuubi-server/web-ui/src/views/management/batch/index.vue
Comment thread kyuubi-server/web-ui/src/views/management/batch/index.vue
@wangzhigang1999 wangzhigang1999 force-pushed the kyuubi-ui-batch-display branch from 954e6c6 to 9464a93 Compare June 9, 2026 05:20
@wangzhigang1999

Copy link
Copy Markdown
Contributor Author

The pagination comments don't apply: total is the per-request page count, not a grand total (BatchesResource.scala:449 returns batches.size), so the existing tableData.length === pageSize check is correct.

@pan3793

pan3793 commented Jun 10, 2026

Copy link
Copy Markdown
Member

when ha is enabled, the batch list displays all batches across Kyuubi instances, or just from a single instance?

@wangzhigang1999

Copy link
Copy Markdown
Contributor Author

when ha is enabled, the batch list displays all batches across Kyuubi instances, or just from a single instance?

It shows all batches recorded in the shared metadata store.

In HA mode, Kyuubi instances share the same metadata store, so the batch list is cluster-wide rather than limited to the current Kyuubi instance.

@aajisaka aajisaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Do we need to write a doc similar to engine UI: https://kyuubi.readthedocs.io/en/master/client/ui/engine_ui.html?

@github-actions github-actions Bot added the kind:documentation Documentation is a feature! label Jun 11, 2026
@wangzhigang1999

Copy link
Copy Markdown
Contributor Author

Thanks. Do we need to write a doc similar to engine UI: https://kyuubi.readthedocs.io/en/master/client/ui/engine_ui.html?

Good idea — added docs/client/ui/batch_ui.md (modeled on the engine UI doc) in eec9971.

@wangzhigang1999 wangzhigang1999 force-pushed the kyuubi-ui-batch-display branch from eec9971 to 9cdd12b Compare June 11, 2026 07:16
@wangzhigang1999 wangzhigang1999 self-assigned this Jun 12, 2026
@wangzhigang1999 wangzhigang1999 added this to the v1.12.0 milestone Jun 12, 2026
@wangzhigang1999

Copy link
Copy Markdown
Contributor Author

Thank you for your review.

Merged to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:documentation Documentation is a feature! module:ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants