Docs: HA cluster developer guide; fix cluster status when HA off#3889
Draft
cursor[bot] wants to merge 2 commits into
Draft
Docs: HA cluster developer guide; fix cluster status when HA off#3889cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
getClusterStatus wrote a 200 body then attempted a second response with 503 when no ClusterInspector was present, which broke the cluster UI reload path and contradicted the handler comment. Return immediately after the HA-disabled payload. Update the unit test to assert the JSON shape. Co-authored-by: Denis Gukov <fiftin@outlook.com>
Add docs/developer index and ha-cluster-dashboard.md covering the admin cluster routes, REST semantics, task state snapshot/clear, and task runner name in API payloads. Link from the root README and note the location in CONTRIBUTING for future API changes. Co-authored-by: Denis Gukov <fiftin@outlook.com>
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
This PR keeps technical documentation aligned with the HA cluster dashboard and related APIs, and fixes a small correctness bug in
getClusterStatusthat prevented the cluster UI from loading when HA was disabled.Changes
Documentation
docs/developer/README.md— Index of in-repo developer notes (distinct from user docs anddocs/plans/roadmaps).docs/developer/ha-cluster-dashboard.md— Describes intent and usage of/cluster, admin-only/api/clusterand/api/cluster/tasks(includingDELETEclear semantics),TaskStateSnapshot/ClearScope, feature gating viaGET /api/info→features.high_availability, andused_runner_nameon task payloads.README.md— Link to developer notes under Documentation.CONTRIBUTING.md— Reminder to updatedocs/developer/when adding non-obvious admin or HA HTTP APIs.Code (verified against tests)
api/cluster.go— Return immediately after writing the HA-disabled JSON so the handler does not emit a second 503 response when noClusterInspectoris wired (matches updated comment).api/cluster_test.go— Assert200andha_enabled: falsefor the HA-disabled case.Codepaths covered
api/cluster.go,api/router.go(admin/clusterroutes)services/tasks/task_state_store.go,TaskPoolstate store surfaceweb/src/views/Cluster.vue,web/src/App.vue,PageMixin/GET /api/infodb.Task.UsedRunnerName/db/sql/task.gojoin for task detailsGaps addressed
reload()errored after a double response from the server.