Skip to content

fix(data-quality): point test suite pipeline entityFullyQualifiedName at the table - #33839

Merged
ShaileshParmar11 merged 4 commits into
mainfrom
fix/test-suite-pipeline-entity-fqn
Sep 23, 2026
Merged

ShaileshParmar11 merged 4 commits into
mainfrom
fix/test-suite-pipeline-entity-fqn

Conversation

@TeddyCr

@TeddyCr TeddyCr commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Describe your changes:

fix #33840

buildTestSuitePipelinePayload wrote the test suite's FQN into
sourceConfig.config.entityFullyQualifiedName when creating a TestSuite ingestion pipeline from the
test case drawer. Per testSuitePipeline.json, that field is the FQN of "the entity to be tested,
if we're working with a basic suite"
— i.e. the table:

// before
entityFullyQualifiedName: ctx.testSuite.fullyQualifiedName,   // "<tableFQN>.testSuite"
// after
entityFullyQualifiedName: tableFqn,                           // "<tableFQN>"

TestSuiteSource._get_table_entity looks that value up as a Table, gets None back, and _iter
then silently falls through to _process_logical_suite — the path meant for logical suites. The run
usually still produces correct results, because the logical path recovers the table from each test
case's entityLink, so this has been masked in practice.

It stops being masked when the suite's name and fullyQualifiedName differ. _process_logical_suite
resolves the suite via get_by_name(..., fqn=config.source.serviceName), and serviceName is the
pipeline's service.name. For a suite created by TestCaseRepository.getOrCreateTestSuite, name and
FQN are the same string, so passing a name where an FQN is expected happens to work. Suites created by
older flows with a non-canonical name do not satisfy that, the lookup 404s, and the run fails with a
misleading Test Suite not found naming an entity that exists.

The correct value is already in the builder's context — it is what the display name is derived from.
It must be the raw FQN, not the replaceAllSpacialCharWith_ result, which would mangle a service
name containing a space.

Two secondary cleanups:

  • PipelinePayloadContext.testSuite narrowed from TestSuite to Pick<TestSuite, 'id'>. id is the
    only field read, and callers pass TestCase.testSuite, which is an EntityReference, not a
    TestSuite. The old as TestSuite | undefined cast in TestCaseFormDrawer was unsound and made
    fullyQualifiedName/basicEntityReference look available when they are not. The narrower type now
    makes the regression fail to compile.
  • Removed the resulting unused import.

Not changed here: the ingestion-side silent fallthrough, and the fact that a name is passed where an
fqn is expected. Both are worth addressing separately — this PR fixes the payload that starts it.

Type of change:

  • Bug fix

High-level design:

N/A — small change.

Tests:

Use cases covered

  • Creating a test case with the scheduler enabled produces a pipeline whose entityFullyQualifiedName
    is the table FQN, so the run takes the basic-suite path rather than the logical-suite fallback
  • The table FQN is resolved from selectedTable, falling back to the table entity
  • A table FQN containing special characters (e.g. a space in the service name) is passed through
    unmodified, while only the pipeline display name is sanitised

Unit tests

  • Added unit tests for the changed logic.
  • Files updated: transformTestCaseFormData.test.ts (3 new cases in buildTestSuitePipelinePayload)
  • src/components/DataQuality/AddDataQualityTest/ — 9 suites / 179 tests pass
  • Verified the tests actually guard: reintroducing the old expression fails all 3 (and no longer
    compiles without an explicit any)

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Not applicable — no visual or interaction change; this alters only the payload posted to
    createIngestionPipeline, which is asserted in unit tests.

Manual testing performed

  1. Ran a TestSuite workflow against a local server with entityFullyQualifiedName set to a suite FQN
    and a suite whose name differs from its fullyQualifiedName — reproduced the failure
    (Table not found → Processing logical test suite → Test Suite not found)
  2. Re-ran with entityFullyQualifiedName set to the table FQN — resolves on the basic path
    (Using existing test suite for table ...), workflow succeeds
  3. yarn jest src/components/DataQuality/AddDataQualityTest/ — all green
  4. ESLint/Prettier/organize-imports on the changed files — 0 errors, idempotent; the 3 remaining
    warnings are present on the base branch unchanged
  5. tsc --noEmit — no new errors in the changed files

UI screen recording / screenshots:

Not applicable — no visual change.

Checklist:

  • I have read the CONTRIBUTING document.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For UI changes: no screen recording — the change has no visual surface (payload only).
  • I have added tests and listed them above.
  • I have added a test that covers the exact scenario we are fixing.

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the previous table-FQN and regression-test findings are resolved, with no new actionable defects identified.

Summary

This PR corrects basic test-suite pipeline creation so the source configuration targets the table FQN rather than the suite FQN.

  • Propagates the raw, synchronous table FQN from the form context.
  • Uses that FQN for both test-case entity-link resolution and pipeline payload construction.
  • Narrows the pipeline builder’s suite dependency to the only required field.
  • Adds regression coverage for unresolved table data, fallback behavior, and special characters in FQNs.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Selected table form field] --> B[selectedTableFqn]
  B --> C[TestCaseFormDrawer]
  C --> D[Resolve test-case entity link]
  C --> E[Build test-suite pipeline payload]
  E --> F[entityFullyQualifiedName = table FQN]
  F --> G[Basic-suite ingestion path]
Loading

Reviews (4) · Last reviewed commit: "chore(playwright): seed the timing basel..."

… at the table

`buildTestSuitePipelinePayload` wrote the test suite's own FQN into
`sourceConfig.config.entityFullyQualifiedName`. Per testSuitePipeline.json that
field is the FQN of "the entity to be tested" — the table — so the ingestion
workflow looks the value up as a Table, gets nothing back, and silently falls
through to the logical-suite path instead of running the basic suite.

Take the table FQN from the context the builder already holds. Note it must be
the raw FQN, not the `replaceAllSpacialCharWith_` result used for the display
name, which would mangle a service name containing a space.

Also narrow `PipelinePayloadContext.testSuite` to `Pick<TestSuite, 'id'>`: `id`
is the only field read, and callers pass `TestCase.testSuite`, which is an
`EntityReference` rather than a `TestSuite`. The previous cast was unsound and
made the wrong field look available.
Copilot AI lite review requested due to automatic review settings September 22, 2026 21:26

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Sep 22, 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 github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Sep 22, 2026
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 4 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 4 warning(s) across 3 changed file(s).

Count Rule
3 openmetadata-imports/no-lower-layer-page-imports
1 openmetadata-imports/review-sequential-api-calls
All findings
Location Rule Message
🟡 src/components/DataQuality/AddDataQualityTest/components/TestCaseFormBody.tsx:68:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/DataQuality/AddDataQualityTest/components/TestCaseFormDrawer.tsx:39:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/DataQuality/AddDataQualityTest/components/TestCaseFormDrawer.tsx:235:9 openmetadata-imports/review-sequential-api-calls Review these sequential API requests. If they are independent, start them together with Promise.all/Promise.allSettled; keep sequencing only when data-dependent
🟡 src/components/DataQuality/AddDataQualityTest/components/transformTestCaseFormData.ts:32:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.

Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 70b5c8079dafc104f5503b1bee9ebc80fc0549ab in Playwright run 35792561692, attempt 1.

✅ 883 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 50m 4s

⏱️ Max setup 4m 37s · max shard execution 18m 15s · max shard-job elapsed before upload 21m 55s · reporting 6s

🌐 241.93 requests/attempt · 2.35 app boots/UI scenario · 17.08% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 17.08% (convergence target: at most 15%).
  • Browser traffic was 241.93 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.35 per UI scenario (2198 boots / 934 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 130 0 0 0 0 0
✅ Shard chromium-02 121 0 0 0 0 0
✅ Shard chromium-03 128 0 0 0 0 0
✅ Shard chromium-04 147 0 0 0 0 0
✅ Shard chromium-05 125 0 0 0 0 0
✅ Shard data-asset-rules-01 65 0 0 0 0 0
✅ Shard domain-isolation-01 16 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard import-export-01 26 0 0 0 0 0
✅ Shard ingestion-01 34 0 0 0 0 0
✅ Shard reindex-01 17 0 0 0 0 0
✅ Shard search-01 11 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0

📦 Download artifacts

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

`canCreatePipeline` is gated on `selectedTableFqn` — derived synchronously from
the form field — but the form context only exposed `selectedTableData`, which is
fetched from that FQN. The two diverge while the fetch is in flight, or
permanently if it fails, and with no `table` prop both of the drawer's sources
are then undefined.

That left `entityFullyQualifiedName` omitted on the pipeline payload, and would
also collapse `resolveEntityLink`'s three-source fallback to a single effective
source, since the drawer fed all of them from the same fetched entity.

Expose `selectedTableFqn` on `TestCaseFormContext` and prefer it at both call
sites.
Copilot AI review requested due to automatic review settings September 22, 2026 21:38

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 72%
72.47% (103668/143043) 57.58% (63146/109654) 58.63% (20663/35238)

…-builder call

The FQN regression test asserted on the mocked buildTestSuitePipelinePayload's
arguments, so it would have stayed green on a wrong pipeline payload. Run the
real builder for that one call and assert on the CreateIngestionPipeline body
handed to addIngestionPipeline instead, with no table prop so the builder's
table fallback cannot mask a missing FQN.
Copilot AI review requested due to automatic review settings September 22, 2026 22:08

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

plan-playwright hard-fails when every planned test in a spec file falls
through to FALLBACK_TEST_MS, because the planner then under-budgets the
shard holding them and the merge-queue wrapper times out (#30812).

Features/DataQuality/RunTestCase.spec.ts landed in #33499 on 22 Sep, a day
after the last baseline refresh (run 35555097423, #33690), so its five tests
have no history at all and every targeted plan that impact-maps a
DataQuality source file trips the gate. The planner only reaches back
through the last 50 successful runs for organic history, and the full run
that did cover the spec is already past that window, so the checked-in
baseline has to carry it.

Durations are real, not estimates: taken from the coverage-complete
full-mode run 35691431799 (4516/4516 accounted, no missing IDs), where all
five tests passed on the first attempt. Only those passing results are
recorded, with outcome: expected. The stable IDs match what
`playwright test --list` discovers today, so the planner weights them by ID
rather than falling back to the (file, title) identity match.
Copilot AI review requested due to automatic review settings September 22, 2026 22:28

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gitar-bot

gitar-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Changes ingestion pipeline entity targeting and test-suite execution behavior.

Corrects test-suite pipeline construction to identify the table under test rather than the test suite in entityFullyQualifiedName, preventing silent fallthrough to the logical-suite path. Propagates the raw table FQN through form context and uses it in pipeline payloads, with resolved table entity as fallback. Type narrowing on PipelinePayloadContext.testSuite prevents similar regressions. Comprehensive unit tests cover unresolved table data, fallback behavior, and special characters. No issues found.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

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

Copy link
Copy Markdown

@ShaileshParmar11
ShaileshParmar11 added this pull request to the merge queue Sep 23, 2026
Merged via the queue into main with commit aa6f8c2 Sep 23, 2026
110 of 113 checks passed
@ShaileshParmar11
ShaileshParmar11 deleted the fix/test-suite-pipeline-entity-fqn branch September 23, 2026 05:48
TeddyCr added a commit that referenced this pull request Sep 23, 2026
… at the table (#33839) (#33907)

* fix(data-quality): point test suite pipeline entityFullyQualifiedName at the table

`buildTestSuitePipelinePayload` wrote the test suite's own FQN into
`sourceConfig.config.entityFullyQualifiedName`. Per testSuitePipeline.json that
field is the FQN of "the entity to be tested" — the table — so the ingestion
workflow looks the value up as a Table, gets nothing back, and silently falls
through to the logical-suite path instead of running the basic suite.

Take the table FQN from the context the builder already holds. Note it must be
the raw FQN, not the `replaceAllSpacialCharWith_` result used for the display
name, which would mangle a service name containing a space.

Also narrow `PipelinePayloadContext.testSuite` to `Pick<TestSuite, 'id'>`: `id`
is the only field read, and callers pass `TestCase.testSuite`, which is an
`EntityReference` rather than a `TestSuite`. The previous cast was unsound and
made the wrong field look available.

* fix(data-quality): prefer the raw form FQN over the fetched table entity

`canCreatePipeline` is gated on `selectedTableFqn` — derived synchronously from
the form field — but the form context only exposed `selectedTableData`, which is
fetched from that FQN. The two diverge while the fetch is in flight, or
permanently if it fails, and with no `table` prop both of the drawer's sources
are then undefined.

That left `entityFullyQualifiedName` omitted on the pipeline payload, and would
also collapse `resolveEntityLink`'s three-source fallback to a single effective
source, since the drawer fed all of them from the same fetched entity.

Expose `selectedTableFqn` on `TestCaseFormContext` and prefer it at both call
sites.

* test(data-quality): assert the pipeline request body, not the payload-builder call

The FQN regression test asserted on the mocked buildTestSuitePipelinePayload's
arguments, so it would have stayed green on a wrong pipeline payload. Run the
real builder for that one call and assert on the CreateIngestionPipeline body
handed to addIngestionPipeline instead, with no table prop so the builder's
table fallback cannot mask a missing FQN.

* chore(playwright): seed the timing baseline for RunTestCase.spec.ts

plan-playwright hard-fails when every planned test in a spec file falls
through to FALLBACK_TEST_MS, because the planner then under-budgets the
shard holding them and the merge-queue wrapper times out (#30812).

Features/DataQuality/RunTestCase.spec.ts landed in #33499 on 22 Sep, a day
after the last baseline refresh (run 35555097423, #33690), so its five tests
have no history at all and every targeted plan that impact-maps a
DataQuality source file trips the gate. The planner only reaches back
through the last 50 successful runs for organic history, and the full run
that did cover the spec is already past that window, so the checked-in
baseline has to carry it.

Durations are real, not estimates: taken from the coverage-complete
full-mode run 35691431799 (4516/4516 accounted, no missing IDs), where all
five tests passed on the first attempt. Only those passing results are
recorded, with outcome: expected. The stable IDs match what
`playwright test --list` discovers today, so the planner weights them by ID
rather than falling back to the (file, title) identity match.

(cherry picked from commit aa6f8c2)

This branch was previously deployed

1 inactive 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.

point test suite pipeline entityFullyQualifiedName at the table

3 participants