Skip to content

fix(hubble): align health interpretation with PD and Server APIs - #838

Merged
imbajin merged 25 commits into
apache:masterfrom
hugegraph:fix/hubble-health-contracts
Oct 22, 2026
Merged

imbajin merged 25 commits into
apache:masterfrom
hugegraph:fix/hubble-health-contracts

Conversation

@imbajin

@imbajin imbajin commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

PD can report Cluster_OK while partitions have PState_Fault, and Server /metrics/backend can return HTTP 200 with per-graph exceptions. Hubble previously treated both as healthy collection. This change shows PD cluster/data health separately from process status and marks backend metric failures with safe counts and actionable bilingual explanations. Cached metric values retain current failure counts; failed PD refreshes retain the last observed raw states with a stale marker.

It also prevents configured-PD Prometheus metrics being attributed to an arbitrary leader when node identity cannot be matched after canonical scheme/host/default-port/path comparison, and prefers /v1/prom/targets/store, falling back to targets-all only for 404/405. Scheme-less PD member addresses use the configured scheme for matching; explicit schemes remain strict, aliases are not guessed, and existing node IDs are preserved. The identity-contract fixture covers the new route and 404/405 fallback. Existing target allowlists, credentials, response limits and request budgets remain unchanged.

Validation: the complete Hubble UnitTestSuite passed 780 tests after synchronizing the diagnostics fixes; the final diagnostic-contract increment passed 93 backend and 37 frontend tests. On pinned Node 24.22.0, the three unrelated suites that exceeded the default 5-second local budget passed alongside all Operations and punctuation tests with a 15-second CLI budget (220 tests / 12 suites); no test files or CI timeout settings were changed. The local full frontend run was interrupted and is not claimed as passing. TypeScript, full ESLint, i18n, production build and 114 frontend/fixture script tests passed. Chrome authenticated/anonymous API fixtures verified PD data faults, failed-graph counts, stale states, diagnostics and context/account behavior; README screenshots identify the fixture limitation. Live cluster integration remains unverified, and current-head CI is pending.

Depends on #82 and targets its branch so reviewers see only this health-contract change. Review/merge #82 first; then retarget this PR to master. Tracks Issues 9–11 and the Store-specific discovery portion of Issue 12 in the issue record. Readiness probes, lightweight Store topology and other documented lifecycle gaps remain follow-ups.


Upstream submission notes

Source community PR: hugegraph#83. This upstream PR reuses the same source repository and branch. Validation statements above are reports from the source task; they were not independently rerun during upstream submission. At submission preflight, source-head hosted checks: 15 skipped, 5 success. Upstream exact-head CI and current review feedback require separate confirmation; opening this PR does not establish merge or release readiness.

Dependency: #837. The description above preserves the community PR context, including its original PR numbers and branch-base statement. This ASF PR instead targets master because the parent branch is not present upstream. Its current full master diff includes the pending parent changes (24 commits / 41 files); the incremental health-contract change against the parent is 12 commits / 17 files. Review and merge the parent first; this is not an independent master-only change. No upstream base branch was created.

图解

数据健康与发现绑定边界

区分节点在线、指标可用与数据健康,并明确 Store 发现回退和 PD 指标绑定的边界。依赖诊断基础改动,不代表新增 readiness 探针或真实集群验收。

imbajin and others added 24 commits October 18, 2026 05:11
The disabled Text2GQL preview becomes a working natural-language query workspace. Ask a question about the selected graph, inspect or edit the generated Gremlin/Cypher, then run it immediately or submit a background task.
# Conflicts:
#	hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/service/op/LiveOperationsCollector.java
…le-health-contracts

# Conflicts:
#	hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/service/op/LiveOperationsCollector.java

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Independent cross-review at 40f9efc, reviewed incrementally against 🔗 Toolchain #837: scoped source-quality assessment 8/10, not merge or release acceptance. The incremental scope is 12 commits and 17 files, rather than the full master diff including its parent. No new blocking defect was established. Store discovery fallback is limited to 404/405; PD metrics require an unambiguous normalized identity match; embedded backend errors affect source health rather than falsely declaring the node DOWN. Independent bounded execution of the exact Models/DataService with dependency shims passed 22 assertions. Across the pair, 106 frontend helper/current-count assertions and one notice-generator test passed. Full application, rendered UI, live-cluster and performance validation were not run. Merge the dependency first and recheck the resulting diff and exact-head CI.

MrJs133
MrJs133 previously approved these changes Oct 22, 2026
@imbajin
imbajin merged commit 8f9f711 into apache:master Oct 22, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants