Skip to content

fix(ingestion): adapt Dagster test query to 1.x GraphQL Runs type#29186

Open
malon64 wants to merge 1 commit into
open-metadata:mainfrom
malon64:fix/dagster-graphql-runs-type-29172
Open

fix(ingestion): adapt Dagster test query to 1.x GraphQL Runs type#29186
malon64 wants to merge 1 commit into
open-metadata:mainfrom
malon64:fix/dagster-graphql-runs-type-29172

Conversation

@malon64

@malon64 malon64 commented Jun 18, 2026

Copy link
Copy Markdown

Describe your changes

Fixes #29172

The Dagster pipeline connector's test-connection query used the deprecated GraphQL union type PipelineRuns. In Dagster 1.x the pipelineRunsOrError field's union member was renamed PipelineRunsRuns, so GraphQL schema validation rejects the inline fragment ... on PipelineRuns and the connection test fails before metadata ingestion can start (reported against Dagster 1.13.6).

Change

  • queries.pyTEST_QUERY_GRAPHQL: ... on PipelineRuns... on Runs. The pipelineRunsOrError field name is unchanged and remains valid in Dagster 1.x; only the union member type needed updating. This matches the issue's suggested fix and the reporter's tested schema.
  • Added a regression unit test test_test_query_uses_dagster_1x_runs_type asserting the query targets Runs and never the deprecated PipelineRuns type.

The other connector queries (repositoriesOrError, pipelineOrError, graphOrError, assetNodes) use types still valid in Dagster 1.x and were left unchanged.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How was this tested?

Local Python 3.11 venv with the ingestion package + dagster extra:

tests/unit/source/pipeline/dagster/test_connection.py ... 4 passed
  • ruff check (repo ingestion/pyproject.toml) → All checks passed
  • ruff format --check → already formatted

Checklist

  • I have read the CONTRIBUTING document.
  • My PR includes tests for the changes I made (where applicable).

Greptile Summary

This PR fixes the Dagster connector's test-connection query to be compatible with Dagster 1.x by renaming the inline fragment type from the deprecated PipelineRuns to Runs in TEST_QUERY_GRAPHQL. The pipelineRunsOrError field name itself is unchanged, only the union member type annotation is updated.

  • queries.py: Single-line change in TEST_QUERY_GRAPHQL... on PipelineRuns... on Runs — matching the Dagster 1.x GraphQL schema where the union member was renamed.
  • test_connection.py: Adds test_test_query_uses_dagster_1x_runs_type which asserts the query targets Runs and no longer contains PipelineRuns, acting as a permanent regression guard.

Confidence Score: 5/5

Safe to merge — a surgical one-line fix to an inline GraphQL fragment type, validated by a new regression test.

The change is minimal and well-scoped: exactly one token in one query string is updated to match the renamed union member in Dagster 1.x. The rest of the connector queries are unaffected. The added regression test directly asserts both the presence of the correct type and the absence of the deprecated one, preventing future regressions.

No files require special attention.

Important Files Changed

Filename Overview
ingestion/src/metadata/ingestion/source/pipeline/dagster/queries.py Renames the inline fragment type in TEST_QUERY_GRAPHQL from the deprecated PipelineRuns to Runs for Dagster 1.x compatibility; all other queries are unchanged.
ingestion/tests/unit/source/pipeline/dagster/test_connection.py Adds a regression test that asserts TEST_QUERY_GRAPHQL contains ... on Runs and does not contain the deprecated PipelineRuns fragment type.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant OM as OpenMetadata
    participant DagConn as DagsterConnection
    participant Dagster as Dagster 1.x GraphQL

    OM->>DagConn: test_connection()
    DagConn->>Dagster: "pipelineRunsOrError(limit:1) { ... on Runs { ... } }"
    Note over Dagster: Dagster 1.x: union member is "Runs"<br/>(was "PipelineRuns" in 0.x)
    Dagster-->>DagConn: "{ __typename: "Runs", results: [...] }"
    DagConn-->>OM: connection OK
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant OM as OpenMetadata
    participant DagConn as DagsterConnection
    participant Dagster as Dagster 1.x GraphQL

    OM->>DagConn: test_connection()
    DagConn->>Dagster: "pipelineRunsOrError(limit:1) { ... on Runs { ... } }"
    Note over Dagster: Dagster 1.x: union member is "Runs"<br/>(was "PipelineRuns" in 0.x)
    Dagster-->>DagConn: "{ __typename: "Runs", results: [...] }"
    DagConn-->>OM: connection OK
Loading

Reviews (1): Last reviewed commit: "fix(ingestion): adapt Dagster test query..." | Re-trigger Greptile

…en-metadata#29172)

Dagster 1.x renamed the pipelineRunsOrError union member from
PipelineRuns to Runs. The connector test query still used
'... on PipelineRuns', so GraphQL validation rejected the inline
fragment and the test connection failed before ingestion could start.

Update the test query fragment to '... on Runs' and add a regression
unit test guarding against the deprecated type.
@malon64 malon64 requested a review from a team as a code owner June 18, 2026 11:27
@github-actions

github-actions Bot commented Jun 18, 2026

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!

@gitar-bot

gitar-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Updates the Dagster connection test query to use the 1.x GraphQL Runs union type instead of the deprecated PipelineRuns type. Includes a regression unit test to ensure compatibility.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dagster connector uses deprecated PipelineRuns GraphQL type with Dagster 1.x

1 participant