Skip to content

fix(hubble): preserve schema-typed vertex update IDs - #857

Merged
imbajin merged 9 commits into
apache:masterfrom
hugegraph:fix/hubble-typed-vertex-update-20261025
Oct 27, 2026
Merged

imbajin merged 9 commits into
apache:masterfrom
hugegraph:fix/hubble-typed-vertex-update-20261025

Conversation

@imbajin

@imbajin imbajin commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Editing a CUSTOMIZE_NUMBER vertex in Hubble could fail with “Vertex does not exist” even though the same numeric ID was readable from Server. Hubble already resolved the ID using the label's schema, but passed the raw path string to a String-only SDK update overload, which encoded it as a different string ID.

Use the existing typed appendVertexProperty(Vertex) API when the built vertex has a schema-resolved ID. Both SDK methods perform the same append action. Numeric IDs retain their numeric encoding; numeric-looking CUSTOMIZE_STRING IDs remain strings. The existing non-custom fallback remains unchanged; there is no parse-by-appearance or retry against another identity.

Validation:

  • Checkstyle, compilation and 18 focused tests passed. Three new regressions inspect the real SDK PUT path and body for 9000001, Long.MAX_VALUE, string IDs "9000001"/"001", and the existing primary-key fallback. The numeric regression fails on master with an unexpectedly quoted ID.
  • Actual Chromium UI against isolated candidate Hubble (FE3101 → BE8091 with fresh H2 → existing Server/PD/Store), without API mocks or authentication substitution: created only temporary numeric Person 9000001, edited its name through the normal detail drawer, received PUT 200, verified the updated property through the public Server GET, and reopened the UI detail showing the saved value. No browser page errors occurred.
  • Cleaned only that owned temporary vertex through the visible Gremlin editor using the explicitly scoped g.V(9000001).drop(). The public GET then returned 404. Full-record hashes restored the original 3000 vertices and 6000 edges exactly; Person1 and schema were unchanged.

The current interface has no standard Server vertex-delete button, so cleanup is not presented as delete-button coverage. No edge CRUD cycle or old identity/pass-through validation matrix is claimed.

Before/after screenshots and the detailed verification receipt are retained outside Git and referenced from issue 40 of the Hubble bug record, available to authorized Page readers. The available tooling cannot upload a persistent public GitHub image attachment; no temporary/raw-branch image links or screenshot assets are added to Git. The final after screenshot shows the reopened numeric ID 9000001 detail with “Hubble typed ID updated” and the save-success notification.

Current-head Actions runs remain the source of CI status; the local targeted checks above do not imply that remote CI has finished.

Source review: hugegraph#102

Visual overview

Schema-resolved vertex identity through editing and serialization

Schema-resolved vertex updates preserve numeric, string and UUID identity. AUTOMATIC numeric IDs carry an explicit NUMBER marker through serialization and editing; numeric-looking strings are not guessed. The no-marker/primary-key compatibility path remains, and older cached data may need refresh. Static-path illustration, not a new end-to-end or RC acceptance claim.

MrJs133
MrJs133 previously approved these changes Oct 25, 2026
@codecov

codecov Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.97%. Comparing base (b34007e) to head (8a1baa3).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #857      +/-   ##
============================================
- Coverage     55.40%   53.97%   -1.44%     
+ Complexity     5989     3484    -2505     
============================================
  Files           619      282     -337     
  Lines         32582    19253   -13329     
  Branches       4217     2896    -1321     
============================================
- Hits          18052    10391    -7661     
+ Misses        12952     7762    -5190     
+ Partials       1578     1100     -478     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bitflicker64 bitflicker64 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Blocking: no. Summary: The typed appendVertexProperty(Vertex) path fixes CUSTOMIZE_NUMBER and CUSTOMIZE_UUID updates, and the palette and scope-ref changes hold; AUTOMATIC vertices still take the string fallback and fail the same way.

this.checkParamsValid(client, entity, false);
GraphManager graph = client.graph();
Vertex vertex = this.buildVertex(client, entity);
if (vertex.id() != null) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important: AUTOMATIC labels have Snowflake numeric IDs, but buildVertex sets no ID for them, so their updates still go through updateVertexProperty(String, ...), which sends a quoted string ID that misses the numeric vertex. Convert the ID as a number for AUTOMATIC too, as QueryService.getRealVertexId does.

@imbajin
imbajin merged commit 8b80b0c into apache:master Oct 27, 2026
20 checks passed
@imbajin
imbajin deleted the fix/hubble-typed-vertex-update-20261025 branch October 27, 2026 03:22
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.

3 participants