Add cancel button for active indexing jobs (CS-11135)#4836
Closed
lukemelia wants to merge 1 commit into
Closed
Conversation
Surface the reservation_id column on the Active Indexing panel as a "Cancel" action, mirroring the Running Jobs pattern in job-queue.json. The button POSTs to the existing _grafana-complete-job endpoint with the reservation_id query param, which already calls forceCancelJobById. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Grafana previewPreview deployed for 1 dashboard in the staging Grafana.
Dashboards: Preview is torn down automatically when this PR is closed or merged. (Run: https://github.com/cardstack/boxel/actions/runs/25877458051) |
Contributor
Observability diff (vs staging)Show diffdiff --git a/tmp/remote-canon.1hFnGi/dashboards/boxel-status/indexing.json b/tmp/committed-canon.OhDATU/dashboards/boxel-status/indexing.json
index 23fa4b3..a4a9e79 100644
--- a/tmp/remote-canon.1hFnGi/dashboards/boxel-status/indexing.json
+++ b/tmp/committed-canon.OhDATU/dashboards/boxel-status/indexing.json
@@ -69,6 +69,10 @@
"uid": "cef5v5sl9k7i8f"
},
"description": "System-wide operator action: queue a full reindex across every realm. The button disables itself while a `full-reindex` orchestration job is already pending or running. Per-realm reindex moved to the Realms dashboard. Click POSTs with `Authorization: Bearer ${grafana_secret}` (substituted from SSM at apply time, CS-10929).",
+ "fieldConfig": {
+ "defaults": {},
+ "overrides": []
+ },
"gridPos": {
"h": 8,
"w": 24,
@@ -714,8 +718,57 @@
},
"properties": [
{
- "id": "custom.hidden",
- "value": true
+ "id": "actions",
+ "value": [
+ {
+ "confirmation": "Cancel running indexing job (reservation ${__value.raw})? The worker will stop processing it.",
+ "fetch": {
+ "body": "",
+ "headers": [
+ [
+ "Authorization",
+ "Bearer ${grafana_secret}"
+ ]
+ ],
+ "method": "POST",
+ "queryParams": [
+ [
+ "reservation_id",
+ "${__value.raw}"
+ ]
+ ],
+ "url": "${realm_server}_grafana-complete-job"
+ },
+ "oneClick": false,
+ "title": "Cancel reservation ${__value.raw}",
+ "type": "fetch"
+ }
+ ]
+ },
+ {
+ "id": "mappings",
+ "value": [
+ {
+ "options": {
+ "from": 0,
+ "result": {
+ "color": "red",
+ "index": 0,
+ "text": "Cancel"
+ },
+ "to": 9999999999999
+ },
+ "type": "range"
+ }
+ ]
+ },
+ {
+ "id": "displayName",
+ "value": "Action"
+ },
+ {
+ "id": "custom.filterable",
+ "value": false
}
]
},
(Run: https://github.com/cardstack/boxel/actions/runs/25877458009) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
indexing.json) for currently-running indexing jobs._grafana-complete-jobendpoint with the row'sreservation_id; the handler (handle-remove-job.ts) already resolves it viafindJobIdForReservationIdand callsforceCancelJobById. No server-side change required.job-queue.json's Running Jobs panel, so all the auth + confirmation plumbing matches what we ship today.Linear: CS-11135
Test plan
packages/observability/scripts/apply.shagainst a local Grafana) and confirm the Active Indexing panel renders a red Cancel cell instead of a hidden column.rejected(result.status = 418) withfinished_atset.job-queue.json.🤖 Generated with Claude Code