Repository navigation
Fixes 36831: Hex components as charts, run history and app views - #36836
Conversation
Bring the Hex connector to parity with DataHub's Hex source: - Components imported by a project become Charts on its dashboard (read from the project export, shared with the data model and lineage stages). A failed export keeps the dashboard's existing charts. - Dashboards and charts get a lifeCycle: created, updated (published results refreshed) and accessed (last viewed). - App views become dashboard usage, derived so OpenMetadata's weekly count equals Hex's seven-day views. - Behind a new dashboard pipeline option, includeCustomProperties (default false), dashboards get appViewsLast7Days, appViewsAllTime, lastRunStatus, lastRunElapsedSeconds and lastRefreshed. They are patched in by a new dashboard topology stage after the dashboard is saved, since a bot PUT keeps the stored extension. Also fix the Hex models' snake_case aliases, which dropped every camelCase field Hex returns (lastPublishedAt, analytics), so published projects linked to the editor instead of the app; and honour includeOwners, which the Hex connector ignored.
A component the project imports but the project listing lacks (a failed listing page returns the items read so far) was skipped, so its chart was unlinked from the dashboard and soft-deleted. It now keeps the chart the dashboard already has, linked and marked as seen. Also test close() computing usage percentiles only with includeUsage, and pin the usage window and additive PUT that the Hex usage arithmetic relies on in an ometa integration test.
|
Local Java test run: PASSED — details
Tests run locally
Per-class counts come from the test reports, which can credit a test to the wrong class when classes run concurrently, and keep only the last run of a nested class that several test classes inherit. The summary's step totals are Maven's own counts. Why these tests
Commandsmvn -B package -pl openmetadata-service -am -Dspring-boot.repackage.skip=true -Dtest=CreateIngestionPipelineImplTest -Dsurefire.failIfNoSpecifiedTests=false
mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=parallel -Dit.test=ConfigResourceIT,DatabaseSmokeIT,GlossaryTermResourceIT,IngestionPipelineAgentTypeIT,IngestionPipelineLogStreamIT,IngestionPipelineLogStreamingResourceIT,IngestionPipelineOwnerInheritanceIT,IngestionPipelineProgressStreamIT,IngestionPipelineResourceIT,IngestionPipelineSortIT,K8sEnvVarSerializationIT,K8sOMJobOperatorIT,K8sPipelineEnvVarIT,OrphanIngestionPipelineCleanupIT,PipelineStatusAuthorizationIT,RunIngestionPipelineForEntityIT,SeedDataPresenceIT,TableResourceIT,TestConnectionDefinitionResourceIT,UserResourceIT,WorkflowRedeploySignalIT,WorkflowResourceIT,WorkflowSignalDeliveryIT,WorkflowTaskAssigneesIT,WorkflowTriggerPermissionsIT -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false
mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=global-state -Dit.test=WorkflowDefinitionResourceIT -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false |
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
✅ Generated Sources Auto-UpdatedThe generated TypeScript types ( |
There was a problem hiding this comment.
🟡 Changes recommended
Export-permission and preservation-lookup failures can remove existing chart links and trigger chart soft-deletion, while zero-view runs leave usage totals stale.
3 open issues
What changed in this PR
Extends OpenMetadata’s Hex connector with component charts, lifecycle metadata, app-view usage, and optional run-history custom properties, addressing #36831.
Changes:
- Ingests imported Hex Components as charts and shares project exports across chart, data-model, and lineage stages.
- Adds usage reporting and opt-in custom properties through a post-save dashboard patch stage.
- Corrects camelCase parsing for published-app links and analytics, honours
includeOwners, and adds tests and decision records.
| File | Description |
|---|---|
openmetadata-ui/src/main/resources/ui/public/locales/en-US/Dashboard/workflows/metadata.md |
Documents the custom-properties option. |
openmetadata-spec/src/main/resources/json/schema/metadataIngestion/dashboardServiceMetadataPipeline.json |
Adds default-off includeCustomProperties. |
ingestion/tests/unit/topology/dashboard/test_hex.py |
Removes the obsolete no-charts test. |
ingestion/tests/unit/topology/dashboard/test_hex_components_runs_usage.py |
Tests components, lifecycle, usage, owners, and custom properties. |
ingestion/tests/unit/topology/dashboard/test_hex_client.py |
Updates listing and camelCase parsing expectations. |
ingestion/tests/integration/ometa/test_ometa_dashboard_api.py |
Tests usage windows and additive writes. |
ingestion/src/metadata/ingestion/source/dashboard/hex/models.py |
Corrects API field names and run models. |
ingestion/src/metadata/ingestion/source/dashboard/hex/metadata.py |
Implements charts, usage, lifecycle, and custom properties. |
ingestion/src/metadata/ingestion/source/dashboard/hex/client.py |
Adds component discovery, export caching, and latest-run retrieval. |
ingestion/src/metadata/ingestion/source/dashboard/dashboard_service.py |
Adds the post-save extension stage. |
ingestion/src/metadata/ingestion/ometa/mixins/dashboard_mixin.py |
Adds dashboard usage retrieval. |
ingestion/.basedpyright/baseline.json |
Removes obsolete type-check baseline entries. |
docs/decisions/2026-11-02-run-changing-dashboard-custom-properties-are-patched-after-the-dashboard.md |
Records custom-property update and preservation semantics. |
docs/decisions/2026-11-02-hex-daily-usage-follows-its-seven-day-app-views.md |
Records the rolling-total usage calculation. |
Review effort: Balanced
The dashboard's usage summary is read from its latest usage row, so a project whose views dropped to zero kept its old weekly count.
Code Review ✅ Approved🟡 Medium risk · Hex ingestion now writes component charts, usage counts, and opt-in run/view properties; incorrect source data or arithmetic could misstate dashboards. Adds Hex Components as dashboard Charts, run history and app view usage, with opt-in custom properties for app view counts and last run status, duration and refresh time. Also fixes the camelCase field aliases so published projects link to the app and honours VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
|
🚦 Removed from the merge queue —
|
…kport 2.0 #36836) (#36856) * Hex: ingest components as charts, run history and app views Bring the Hex connector to parity with DataHub's Hex source: - Components imported by a project become Charts on its dashboard (read from the project export, shared with the data model and lineage stages). A failed export keeps the dashboard's existing charts. - Dashboards and charts get a lifeCycle: created, updated (published results refreshed) and accessed (last viewed). - App views become dashboard usage, derived so OpenMetadata's weekly count equals Hex's seven-day views. - Behind a new dashboard pipeline option, includeCustomProperties (default false), dashboards get appViewsLast7Days, appViewsAllTime, lastRunStatus, lastRunElapsedSeconds and lastRefreshed. They are patched in by a new dashboard topology stage after the dashboard is saved, since a bot PUT keeps the stored extension. Also fix the Hex models' snake_case aliases, which dropped every camelCase field Hex returns (lastPublishedAt, analytics), so published projects linked to the editor instead of the app; and honour includeOwners, which the Hex connector ignored. (cherry picked from commit 0405c39) * Hex: keep the charts of components a failed listing page leaves out A component the project imports but the project listing lacks (a failed listing page returns the items read so far) was skipped, so its chart was unlinked from the dashboard and soft-deleted. It now keeps the chart the dashboard already has, linked and marked as seen. Also test close() computing usage percentiles only with includeUsage, and pin the usage window and additive PUT that the Hex usage arithmetic relies on in an ometa integration test. (cherry picked from commit 7ec67cc) * Hex: write a zero usage row so app views that aged out stop showing The dashboard's usage summary is read from its latest usage row, so a project whose views dropped to zero kept its old weekly count. (cherry picked from commit 0ca3439) * Update generated TypeScript types and dereferenced schemas * Hex: baseline the dashboard extension NodeStage call on 2.0 2.0's basedpyright baseline holds one reportCallIssue per existing NodeStage call in dashboard_service.py; main carries a spare, so the backport's extra stage was the only new error. --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>





Describe your changes:
Fixes #36831
The Hex connector ingested projects as dashboards but nothing about Hex Components, runs or app views, which DataHub's Hex source does. This PR ingests Components imported by a project as Charts on its dashboard, sets each dashboard's life cycle, turns app views into dashboard usage, and — behind a new opt-in
includeCustomPropertiesoption — adds app view counts and the last run's status, duration and refresh time as dashboard custom properties. It also fixes the Hex models' snake_case aliases, which silently dropped every camelCase field Hex returns (lastPublishedAt,analytics), so every published project linked to the editor-only notebook instead of the app; and makes Hex honourincludeOwners, which it ignored.Type of change:
High-level design:
Components → Charts.
get_projectslists withincludeComponents=true; components are split off bytype. The components a project imports come fromCOMPONENT_IMPORTcells in the project export (also nested in collapsible sections). The export is now fetched once per project and shared by the chart, data model and lineage stages (single-slot cache inHexApiClient). A transient export failure keeps the dashboard's existing charts rather than unlinking and deleting them; a token that can't export sees no components. Charts get name = component id, link, owner,chartType=Other,lifeCycle, and honourchartFilterPattern.Life cycle. Dashboards and charts get
created(createdAt),updated(analytics.publishedResultsUpdatedAt) andaccessed(analytics.lastViewedAt) from the listing — no extra Hex calls; the server only moves them forward.Usage. OpenMetadata keeps a count per day and a usage PUT adds to it; Hex reports only rolling totals. Today's count is
max(0, lastSevenDays − the six previous stored days)minus what today already holds, so OpenMetadata's weekly count equals Hex's and a same-day re-run sends nothing (ADR:2026-11-02-hex-daily-usage-follows-its-seven-day-app-views). AddsOMetaDashboardMixin.get_dashboard_usage(GET /v1/usage/dashboard/{id}). The Looker/Tableau "total − latest daily" pattern was not copied: it subtracts a daily figure from a cumulative one.Custom properties. With
includeCustomProperties(new, default false — definitions are global to the Dashboard type), dashboards getappViewsLast7Days,appViewsAllTime(integer), and for published projectslastRunStatus(string),lastRunElapsedSeconds(integer),lastRefreshed(timestamp, end of the last COMPLETED run) fromGET /projects/{id}/runs(one call, a second only when the latest run didn't complete). A bot PUT keeps the stored extension unlessoverrideMetadata, so these are set by a new dashboard topology stage,yield_dashboard_extension, that runs after the dashboard is saved and yields aPatchRequest(override_metadata=True) replacing only the connector's keys — user properties are kept, nothing is removed, and an unknown value is omitted rather than cleared (ADR:2026-11-02-run-changing-dashboard-custom-properties-are-patched-after-the-dashboard). Definitions are registered once per run; a name already defined with another type is left alone. Alternatives rejected: run status inlifeCycleonly (no status/duration), a newdashboard.jsonfield (schema + UI + migration for one connector).Backward compatibility.
includeCustomPropertiesis an additive optional field defaulting to false.sourceUrlchanges from/hex/to/app/on the next run (the alias fix makes fix(hex): build dashboard source URLs that resolve in the Hex UI #36335 take effect).includeOwners(default false, like every other dashboard connector): new Hex dashboards/charts get no owner unless the pipeline enables it; owners already set are kept (a bot PUT without owners never removes them).Tests:
Use cases covered
lastPublishedAt,analytics), and published projects link to/app/lastRefreshedfrom the last completed run; user properties kept; a property of another type left alone; unpublished projects get views without a runs call; nothing without the flagincludeOwnersis offUnit tests
ingestion/tests/unit/topology/dashboard/test_hex_components_runs_usage.py(20 tests: the real Hex client and source against fakes of the Hex API, shaped from its OpenAPI spec, and of the OpenMetadata server; the custom-property patch goes through the realbuild_patch). Updatedtest_hex.py,test_hex_client.py; addedtest_get_dashboard_usagetotests/integration/ometa/test_ometa_dashboard_api.py(pins the usage window and the additive usage PUT the arithmetic relies on).python -m pytest -n 8 <files> --cov=…→ 740 passed.hex/metadata.py91%,hex/client.py91%,hex/models.py100%,dashboard_service.py77% (only the new no-op stage added there).override_metadata=True, the same-day subtraction, theincludeOwnersguard, or the unlisted-component fallback each fails a test.Backend integration tests
dashboardServiceMetadataPipeline.json) selects the tests below.Local Java test run: PASSED
7ec67cc9e4ff(baseorigin/main)Ingestion integration tests
tests/integration/ometa/test_ometa_dashboard_api.py+tests/integration/tableau/test_backfill.py→ 12 passed. There is notests/integration/hex/.tests/integration/ometa/test_ometa_dashboard_api.pyPlaywright (UI) tests
locales/en-US/Dashboard/workflows/metadata.md).Manual testing performed
Local stack (
docker compose -f docker/development/docker-compose.yml up -d --no-build mysql elasticsearch execute-migrate-all openmetadata-server) and a real Hex workspace (2 published demo projects, no components):includeUsage,includeCustomProperties,includeOwners: 0 errors, 0 warnings. Both dashboards gotlifeCycle,/app/links, andappViewsLast7Days/appViewsAllTime/lastRunStatus/lastRunElapsedSeconds/lastRefreshedmatching Hex's runs API (e.g. COMPLETED, 29 s). Registered types: integer/integer/string/integer/timestamp.team=financeandlastRunStatus=STALEby hand: run 2 restoredCOMPLETEDand keptteam.allTime0→1/2 immediately andappViewsAllTimefollowed on the next run (lastSevenDays/lastViewedAtupdate later on Hex's side).lastSevenDays10→10→12 (day 1), 15→5 (day 2): stored 10, nothing, +2; then 3 (weekly 15); then nothing.includeOwners: trueboth dashboards got it as owner.Not verified live: components as charts (this Hex workspace has none — covered by unit tests).
UI screen recording:
Not applicable — ingestion connector change; the UI is unchanged and only displays the new values through existing custom-property and usage views.
Checklist:
I have read the CONTRIBUTING document.
My PR title is
Fixes <issue-number>: <short explanation>My PR is linked to a GitHub issue via
Fixes #<issue-number>above.I have commented on my code, particularly in hard-to-understand areas.
For JSON Schema changes: I updated the migration scripts or explained why it is not needed. (Additive optional pipeline option with a default; no stored data changes.)
For a UI feature or feature task: as part of PR creation, I ran the PR build in Docker with sample data and embedded a verified GitHub-hosted recording plus build/health evidence above (or explained why this requirement is not applicable).
I have added tests (unit / integration / Playwright as applicable) and listed them above.
Self-review: I reviewed the final diff against
REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.Reviewed
7ec67cc9e4fwith a fresh-context reviewer. Fixed the one 🔴 (a failed project-listing page unlinked and soft-deleted the charts of components it left out) with a test; added the two 🟡 tests (close()percentiles, the usage-window integration test). Second pass: no 🔴. Pre-existing and not widened here: a failed listing page can still soft-delete the dashboards it leaves out.Decision check: adds
docs/decisions/2026-11-02-run-changing-dashboard-custom-properties-are-patched-after-the-dashboard.mdanddocs/decisions/2026-11-02-hex-daily-usage-follows-its-seven-day-app-views.md.The issue properly describes why the new feature is needed, what's the goal, and how we are building it.
I have updated the documentation.
I have added tests around the new logic.
🤖 Generated with Claude Code