Skip to content

Fixes 34856: Parse run_pipeline trigger response as PipelineServiceClientResponse - #35366

Merged
ulixius9 merged 2 commits into
open-metadata:mainfrom
LubabaKhalid:fix/run-pipeline-trigger-response
Oct 19, 2026
Merged

ulixius9 merged 2 commits into
open-metadata:mainfrom
LubabaKhalid:fix/run-pipeline-trigger-response

Conversation

@LubabaKhalid

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #34856

I worked on this because OpenMetadata.run_pipeline() always raises after successfully triggering a run. The POST /v1/services/ingestionPipelines/trigger/{id} endpoint returns a PipelineServiceClientResponse (code, reason, platform, version, runId), but the SDK parsed it as an IngestionPipeline. That failed with KeyError: 'sourceConfig' and then a pydantic ValidationError, so callers could not tell a failed trigger from a successful one.

run_pipeline() now validates the response as PipelineServiceClientResponse and returns it, so callers can read code, reason, platform and runId.

Type of change:

  • Bug fix

High-level design:

N/A — small change.

Tests:

Use cases covered

  • Triggering a pipeline whose orchestrator returns a runId (e.g. Kubernetes) returns the parsed trigger response instead of raising.
  • Triggering a pipeline whose orchestrator does not return a runId (e.g. Airflow) returns the parsed response with runId unset.

Unit tests

  • I added unit tests for the new/changed logic.
  • Files added/updated: ingestion/tests/unit/metadata/ingestion/ometa/test_ingestion_pipeline_mixin.py
  • Both tests fail on main with the reported KeyError / ValidationError and pass with this change.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (SDK client change only, covered by unit tests).

Playwright (UI) tests

  • Not applicable (no UI changes).

Manual testing performed

  1. Ran the offline reproduction from the issue against main: run_pipeline() raises KeyError: 'sourceConfig'.
  2. Ran it with this change: run_pipeline() returns a PipelineServiceClientResponse with the expected code, platform and runId.
  3. ruff check and ruff format --check pass on the changed files.

UI screen recording:

Not applicable — ingestion SDK fix with no UI impact.

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.

  • 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.

  • Decision check: this PR aligns the SDK with the existing API contract and does not introduce a new decision.

  • I have added a test that covers the exact scenario we are fixing.

@LubabaKhalid
LubabaKhalid requested a review from a team as a code owner October 13, 2026 15:14
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

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

@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@LubabaKhalid

Copy link
Copy Markdown
Contributor Author

Hi @stout-yeoman @open-metadata/ingestion, could you please add the safe to test label and approve the pending workflow runs? The fix and its unit tests pass locally, and ruff lint and format checks are clean. The failing checks are only waiting on the label. Thank you!

@ulixius9 ulixius9 added the safe to test Add this label to run secure Github workflows on PRs label Oct 15, 2026
@github-actions github-actions Bot removed the safe to test Add this label to run secure Github workflows on PRs label Oct 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@gitar-bot

gitar-bot Bot commented Oct 15, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🔴 High risk · Changing run_pipeline() from IngestionPipeline to PipelineServiceClientResponse alters the SDK interface and could break callers that access pipeline-specific fields.

Fixes OpenMetadata.run_pipeline() so it parses the trigger response from POST /v1/services/ingestionPipelines/trigger/{id} as PipelineServiceClientResponse instead of IngestionPipeline, removing the spurious KeyError: 'sourceConfig' and ValidationError after a successful trigger. Callers can now read code, reason, platform and runId. 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

@ulixius9 ulixius9 added the safe to test Add this label to run secure Github workflows on PRs label Oct 19, 2026
@ulixius9
ulixius9 enabled auto-merge October 19, 2026 11:18
@ulixius9
ulixius9 added this pull request to the merge queue Oct 19, 2026
@sonarqubecloud

Copy link
Copy Markdown

Merged via the queue into open-metadata:main with commit aa3b2c7 Oct 19, 2026
95 of 115 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

[Ingestion] OpenMetadata.run_pipeline() always raises: the /trigger response (PipelineServiceClientResponse) is parsed as an IngestionPipeline

2 participants