fix(ingestion): adapt Dagster test query to 1.x GraphQL Runs type#29186
fix(ingestion): adapt Dagster test query to 1.x GraphQL Runs type#29186malon64 wants to merge 1 commit into
Conversation
…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.
❌ 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 |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ ApprovedUpdates the Dagster connection test query to use the 1.x GraphQL OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
Describe your changes
Fixes #29172
The Dagster pipeline connector's test-connection query used the deprecated GraphQL union type
PipelineRuns. In Dagster 1.x thepipelineRunsOrErrorfield's union member was renamedPipelineRuns→Runs, so GraphQL schema validation rejects the inline fragment... on PipelineRunsand the connection test fails before metadata ingestion can start (reported against Dagster 1.13.6).Change
queries.py—TEST_QUERY_GRAPHQL:... on PipelineRuns→... on Runs. ThepipelineRunsOrErrorfield 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.test_test_query_uses_dagster_1x_runs_typeasserting the query targetsRunsand never the deprecatedPipelineRunstype.The other connector queries (
repositoriesOrError,pipelineOrError,graphOrError,assetNodes) use types still valid in Dagster 1.x and were left unchanged.Type of change
How was this tested?
Local Python 3.11 venv with the ingestion package +
dagsterextra:ruff check(repoingestion/pyproject.toml) → All checks passedruff format --check→ already formattedChecklist
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
PipelineRunstoRunsinTEST_QUERY_GRAPHQL. ThepipelineRunsOrErrorfield name itself is unchanged, only the union member type annotation is updated.queries.py: Single-line change inTEST_QUERY_GRAPHQL—... on PipelineRuns→... on Runs— matching the Dagster 1.x GraphQL schema where the union member was renamed.test_connection.py: Addstest_test_query_uses_dagster_1x_runs_typewhich asserts the query targetsRunsand no longer containsPipelineRuns, 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
PipelineRunstoRunsfor Dagster 1.x compatibility; all other queries are unchanged.TEST_QUERY_GRAPHQLcontains... on Runsand does not contain the deprecatedPipelineRunsfragment 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%%{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 OKReviews (1): Last reviewed commit: "fix(ingestion): adapt Dagster test query..." | Re-trigger Greptile