Skip to content

feat(ingestion-progress): total assets, run-start emit, agent on discovery#29753

Open
ulixius9 wants to merge 3 commits into
mainfrom
port-louis
Open

feat(ingestion-progress): total assets, run-start emit, agent on discovery#29753
ulixius9 wants to merge 3 commits into
mainfrom
port-louis

Conversation

@ulixius9

@ulixius9 ulixius9 commented Jul 6, 2026

Copy link
Copy Markdown
Member

Describe your changes:

Follow-up to #29365 (hierarchical progress SSE).

I made the ingestion progress stream tell the UI three things it was missing: how many assets a run ingested, that a run has started (even very short runs), and which agent a run belongs to. These came out of testing the live SSE stream against an autopilot run, where short runs appeared to emit nothing, the final asset count was absent, and newly created agents weren't discoverable from the stream.

Type of change:

  • Improvement

High-level design:

  • totalAssetsIngested — new additive field on progressUpdate.json, populated from the registry's monotonic leaf-asset counter (tables + stored procedures) and sent on every update including the terminal one, so the final count is authoritative and survives scope pruning.
  • Run-start emitBaseWorkflow.execute() now fires an initial DISCOVERY update immediately (the reporting timer's first tick is a full interval away, so sub-interval runs previously emitted only their terminal event).
  • Agent discoveryserviceProgressEvent.json gains an optional ingestionPipeline ($ref). The server loads the entity only on the DISCOVERY update (IngestionPipelineRepository.updateProgressdiscoveredPipeline) and IngestionProgressTracker attaches it to the ServiceProgressEvent, so the UI can discover a newly created autopilot agent from the stream itself. getFields("") excludes openMetadataServerConnection, so no secrets are exposed (same data the existing REST list already returns).

Tests:

Unit tests

  • Added unit tests for the new/changed logic.
  • Python: test_status_mixin_progress.py (totalAssetsIngested on processing + terminal), test_progress_rendering.py (reporter asset total), test_base_workflow.py (initial DISCOVERY before work).
  • Java: IngestionProgressTrackerTest (ServiceProgressEvent carries the pipeline on DISCOVERY, null otherwise).

Backend integration tests

  • Not applicable — no new endpoints; existing /progress/* SSE contract is unchanged except for additive fields.

Ingestion integration tests

  • Covered by the ingestion unit suite above.

Playwright (UI) tests

  • Not applicable — only generated types change; no rendered UI surface.

Manual testing performed

  • Streamed a live autopilot run through the SSE endpoint and confirmed the run-start event, the final totalAssetsIngested, and the agent entity on DISCOVERY. mvn spotless:check -pl openmetadata-service clean; Java tracker tests 14/14; ingestion workflow unit suite green.

UI screen recording / screenshots:

Not applicable.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR is linked to a GitHub issue (follow-up to feat(ingestion): hierarchical progress tracking (lazy tree + SSE stream) #29365; no standalone issue).
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: changes are additive (totalAssetsIngested, optional ingestionPipeline); no data migration needed.
  • For UI changes: not applicable (generated types only).
  • I have added tests and listed them above.

Note: openmetadata-ui/.../serviceProgressEvent.ts still needs make update_typescript_types to inline the new ingestionPipeline field — deferred to the UI-consumption work.

🤖 Generated with Claude Code

Greptile Summary

This PR improves ingestion progress events for live run tracking. The main changes are:

  • Adds totalAssetsIngested to progress updates.
  • Emits an initial discovery update when a workflow starts.
  • Attaches the ingestion pipeline to discovery service progress events.
  • Updates the related JSON schemas and generated UI types.
  • Adds Python and Java tests for the new progress fields.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
ingestion/src/metadata/workflow/base.py Adds an initial discovery progress update before workflow execution begins.
ingestion/src/metadata/workflow/workflow_status_mixin.py Adds the reporter asset count to emitted progress updates.
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/IngestionPipelineRepository.java Loads the ingestion pipeline for discovery progress events when available.
openmetadata-service/src/main/java/org/openmetadata/service/monitoring/IngestionProgressTracker.java Carries the optional ingestion pipeline through service progress events.
openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/progressUpdate.ts Adds totalAssetsIngested to the generated progress update type.
openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/serviceProgressEvent.ts Adds the optional ingestionPipeline payload to the generated service event type.

Reviews (3): Last reviewed commit: "Merge branch 'main' into port-louis" | Re-trigger Greptile

Context used (3)

  • Context used - CLAUDE.md (source)
  • Context used - openmetadata-ui-core-components/CLAUDE.md (source)
  • Context used - AGENTS.md (source)

…on discovery

Follow-ups to the hierarchical progress SSE feature (PR #29365):

- Add ProgressUpdate.totalAssetsIngested (leaf assets: tables + stored
  procedures) and send it on every update including the terminal one, so the
  final asset count is authoritative and survives scope pruning.
- Emit an initial DISCOVERY progress update at run start so a run shorter than
  the reporting interval still surfaces live (a start + end event pair) instead
  of appearing to emit nothing.
- Attach the IngestionPipeline entity to the DISCOVERY ServiceProgressEvent,
  loaded server-side once per run, so the UI can discover a newly created
  autopilot agent from the stream itself.

Note: openmetadata-ui serviceProgressEvent.ts still needs `make
update_typescript_types` to pick up the ingestionPipeline field (deferred to
the UI-consumption work).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ulixius9 ulixius9 requested review from a team as code owners July 6, 2026 05:07
Copilot AI review requested due to automatic review settings July 6, 2026 05:07
@github-actions

github-actions Bot commented Jul 6, 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 Jul 6, 2026
Comment thread ingestion/src/metadata/workflow/workflow_status_mixin.py

Copilot AI 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.

Pull request overview

Refines the ingestion progress streaming contract (SSE + CLI/UI typing) to expose an authoritative run-level ingested-asset total, ensure an initial “run started” event is emitted for short runs, and optionally attach the owning ingestion pipeline entity to the run’s DISCOVERY event for agent discovery.

Changes:

  • Add totalAssetsIngested to ProgressUpdate (schema + generated UI types) and populate it from the monotonic leaf counter in the progress registry/reporting path.
  • Emit an initial DISCOVERY progress update at the start of BaseWorkflow.execute() to ensure sub-interval runs still show up live.
  • Add optional ingestionPipeline to ServiceProgressEvent (schema) and attach it on DISCOVERY via backend repository lookup + tracker propagation.

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/serviceProgressEvent.ts Updates generated ProgressUpdate typing to include totalAssetsIngested.
openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/progressUpdate.ts Updates generated ProgressUpdate typing to include totalAssetsIngested.
openmetadata-spec/src/main/resources/json/schema/entity/services/ingestionPipelines/serviceProgressEvent.json Adds optional ingestionPipeline reference to service-scoped SSE event schema.
openmetadata-spec/src/main/resources/json/schema/entity/services/ingestionPipelines/progressUpdate.json Adds totalAssetsIngested field to progress update schema.
openmetadata-service/src/main/java/org/openmetadata/service/monitoring/IngestionProgressTracker.java Extends tracker API to optionally carry IngestionPipeline into ServiceProgressEvent.
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/IngestionPipelineRepository.java Loads pipeline entity on DISCOVERY (best-effort) and passes it to tracker for service stream.
openmetadata-service/src/test/java/org/openmetadata/service/monitoring/IngestionProgressTrackerTest.java Adds unit tests asserting pipeline entity is present only when provided.
ingestion/src/metadata/workflow/workflow_status_mixin.py Includes totalAssetsIngested in emitted progress payload.
ingestion/src/metadata/workflow/progress_render.py Exposes monotonic assets_ingested() and uses it for rendering/payload.
ingestion/src/metadata/workflow/base.py Emits initial DISCOVERY progress update at workflow start.
ingestion/tests/unit/workflow/test_status_mixin_progress.py Adds tests for totalAssetsIngested presence on processing/terminal events and null when no registry.
ingestion/tests/unit/workflow/test_progress_rendering.py Adds tests for reporter counting leaf types and surviving pruning.
ingestion/tests/unit/workflow/test_base_workflow.py Updates ordering expectations and asserts initial DISCOVERY emit occurs before work.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

✅ TypeScript Types Auto-Updated

The generated TypeScript types have been automatically updated based on JSON schema changes in this PR.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.77% (72719/114023) 46.91% (42298/90161) 48.19% (13011/26994)

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

🔴 Playwright Results — 1 failure(s), 15 flaky

✅ 4504 passed · ❌ 1 failed · 🟡 15 flaky · ⏭️ 37 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 441 0 1 16
🟡 Shard 2 821 0 3 8
✅ Shard 3 801 0 0 7
🟡 Shard 4 814 0 2 5
🔴 Shard 5 858 1 4 0
🟡 Shard 6 769 0 5 1

Genuine Failures (failed on all attempts)

Pages/ExploreBrowse.spec.ts › service type drill-down disables unrelated roots and query-panel Clear resets it (shard 5)
�[31mTest timeout of 180000ms exceeded.�[39m
🟡 15 flaky test(s) (passed on retry)
  • Pages/Roles.spec.ts › Roles page should work properly (shard 1, 1 retry)
  • Features/BulkEditOperationBadges.spec.ts › Database service bulk edit search filters rows and clear restores them (shard 2, 1 retry)
  • Features/BulkImport.spec.ts › Database Schema (shard 2, 1 retry)
  • Features/Glossary/GlossaryHierarchy.spec.ts › should move term with children to different glossary (shard 2, 1 retry)
  • Features/Workflows/WorkflowOssRestrictions.spec.ts › clicking a node in view mode opens read-only config sidebar (no save or delete buttons) (shard 4, 1 retry)
  • Pages/CustomProperties.spec.ts › Set & Update all CP types on chart (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Domain owner should able to edit description of domain (shard 5, 1 retry)
  • Pages/EntityDataConsumer.spec.ts › Tag Add, Update and Remove for child entities (shard 5, 1 retry)
  • Pages/EntityDataSteward.spec.ts › Tag Add, Update and Remove for child entities (shard 5, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify Impact Analysis service filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab is NOT visible for pipelineService in platform lineage (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab is NOT visible for apiService in platform lineage (shard 6, 1 retry)
  • Pages/ServiceEntity.spec.ts › Announcement create, edit & delete (shard 6, 1 retry)
  • Pages/UserDetails.spec.ts › Admin user can get all the roles hierarchy and edit roles (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

Copilot AI review requested due to automatic review settings July 6, 2026 09:11
@gitar-bot

gitar-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 resolved / 1 findings

Refines ingestion progress streaming by adding total asset counts, initial run-start events, and agent pipeline discovery. All findings were resolved, and no issues were found.

✅ 1 resolved
Quality: Generated UI type missing top-level ingestionPipeline field

📄 openmetadata-spec/src/main/resources/json/schema/entity/services/ingestionPipelines/serviceProgressEvent.json:21-23 📄 openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/serviceProgressEvent.ts
The schema serviceProgressEvent.json now declares the optional ingestionPipeline $ref, and the backend (IngestionProgressTracker) populates it on DISCOVERY events. However, the generated TypeScript type serviceProgressEvent.ts was only updated for the embedded progressUpdate shape and does not expose the new top-level ingestionPipeline field. The PR description acknowledges this is deferred (make update_typescript_types still needed). Until the type is regenerated, UI consumers cannot type-safely read the agent entity the backend now emits, so the stated goal (agent discovery from the stream) is not yet achievable on the client. Suggest running make update_typescript_types (or make generate) and committing the regenerated type so the emitted field is consumable, avoiding a stale generated artifact drifting from the schema.

Options

Display: compact → Showing less information.

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

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Copilot AI 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.

Pull request overview

Copilot reviewed 11 out of 13 changed files in this pull request and generated no new comments.

@sonarqubecloud

sonarqubecloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

@sonarqubecloud

sonarqubecloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

@ulixius9 ulixius9 enabled auto-merge (squash) July 6, 2026 14:21
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.

4 participants