Skip to content

Fixes 36831: Hex components as charts, run history and app views (backport 2.0 #36836) - #36856

Merged
ulixius9 merged 5 commits into
2.0from
ulixius9/hex-assets-ingestion-fix-2.0
Nov 3, 2026
Merged

ulixius9 merged 5 commits into
2.0from
ulixius9/hex-assets-ingestion-fix-2.0

Conversation

@ulixius9

@ulixius9 ulixius9 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

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:

  • 0405c3925c8 Hex: ingest components as charts, run history and app views
  • 7ec67cc9e4f Hex: keep the charts of components a failed listing page leaves out
  • 0ca34390d26 Hex: write a zero usage row so app views that aged out stop showing

The 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's typing and ES_INDEX_MAP imports, and added datetime/timezone and filter_by_chart.
  • dashboardServiceMetadataPipeline.json: added only includeCustomProperties. includeMetrics exists on main only and is not part of this change.

Tests (on this branch, with Python models regenerated from the 2.0 schemas)

🤖 Generated with Claude Code


Summary by Gitar

  • Charts:
    • Ingests Hex components imported by each project as dashboard charts, with owners and filtering
    • Keeps existing charts of components a failed listing page leaves out
  • Usage:
    • Derives daily dashboard usage from Hex seven-day app views, writing a zero row so aged-out views stop counting
  • Custom properties:
    • Patches app views, last run status, run duration and last refresh onto dashboards behind the new includeCustomProperties flag
  • Lifecycle:
    • Sets created, updated and accessed lifecycle timestamps from Hex project analytics
  • Tests and docs:
    • Adds component, usage and custom property unit tests, integration usage tests, and two decision records

This will update automatically on new commits.

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)
@ulixius9
ulixius9 requested review from a team as code owners November 2, 2026 12:49
@ulixius9
ulixius9 requested review from karthicksharan and mohittilala and removed request for a team November 2, 2026 12:49
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

✅ Generated Sources Auto-Updated

The generated TypeScript types (src/generated/) and dereferenced JSON
schemas (src/jsons/, public/jsons/) have been automatically updated
based on JSON schema changes in this PR.

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 68%
68.53% (83364/121637) 53.51% (51786/96764) 54.2% (15380/28376)

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.
@gitar-bot

gitar-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown
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.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sonarqubecloud

sonarqubecloud Bot commented Nov 2, 2026

Copy link
Copy Markdown

@sonarqubecloud

sonarqubecloud Bot commented Nov 2, 2026

Copy link
Copy Markdown

@ulixius9
ulixius9 merged commit 272a412 into 2.0 Nov 3, 2026
88 of 94 checks passed
@ulixius9
ulixius9 deleted the ulixius9/hex-assets-ingestion-fix-2.0 branch November 3, 2026 09:30

This branch had an error being deployed

1 failed deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants