Repository navigation
Fixes 36831: Hex components as charts, run history and app views (backport 2.0 #36836) - #36856
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. (cherry picked from commit 0405c39)
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)
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)
❌ 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 ( |
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.
Code Review ✅ Approved🟡 Medium risk · Hex ingestion now creates component charts and writes derived usage and custom properties; calculation or API-shape errors could misstate dashboard analytics. Backports the Hex integration to 2.0, ingesting components as dashboard charts, deriving daily usage from seven-day app views, and setting lifecycle timestamps from project analytics. No issues found. 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 |
|
|



Backport of #36836 to
2.0(fixes #36831). The source PR is still open, so changes made to it in review need to be brought here too.Cherry-picked with
-x:0405c3925c8Hex: ingest components as charts, run history and app views7ec67cc9e4fHex: keep the charts of components a failed listing page leaves out0ca34390d26Hex: write a zero usage row so app views that aged out stop showingThe main merge and the generated TypeScript types commit are not cherry-picked; CI regenerates the types for
2.0.Conflict resolution
hex/models.py: took the PR's models. 2.0 still had the snake_case aliases (app_views,last_seven_days, …) and the old run fields that the PR replaces with Hex's actual camelCase fields.hex/metadata.py: imports only. Kept 2.0'stypingandES_INDEX_MAPimports, and addeddatetime/timezoneandfilter_by_chart.dashboardServiceMetadataPipeline.json: added onlyincludeCustomProperties.includeMetricsexists on main only and is not part of this change.Tests (on this branch, with Python models regenerated from the 2.0 schemas)
tests/unit/topology/dashboard/: 875 passed, including the 176 Hex tests.test_ometa_dashboard_api.pyusage integration tests were not run against a 2.0 server; they pass against main in Fixes 36831: Hex components as charts, run history and app views #36836. The server's usage SQL (UsageDAO) is identical on 2.0 and main.🤖 Generated with Claude Code
Summary by Gitar
includeCustomPropertiesflagThis will update automatically on new commits.