Skip to content

fix(ui): leave columns out of the data product port picker - #35744

Closed
yan-3005 wants to merge 1 commit into
mainfrom
fix/port-picker-data-assets-only
Closed

yan-3005 wants to merge 1 commit into
mainfrom
fix/port-picker-data-assets-only

Conversation

@yan-3005

@yan-3005 yan-3005 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

The data product input/output port picker no longer offers table columns.

The picker searches the dataAsset index, and the column index (column_search_index) is one of its parents since #25622. So a column could be picked as a port, and the server then refused it (Asset '<column>' of type 'tableColumn' cannot be added as a port; ports must reference a data asset, added in #30186). The picker now leaves columns out for input and output ports only; every other asset picker is unchanged.

Type of change:

  • Bug fix

High-level design:

N/A — small change in useAssetSelectionState: a must_not entityType = tableColumn clause is combined into the picker's query filter when it picks ports.

Tests:

Use cases covered

  • Input and output port pickers do not list columns; the table, schema and database still appear.
  • The glossary (and other) asset pickers still list columns.

Unit tests

  • useAssetSelectionState.test.ts: leaves columns out of the DATA_PRODUCT_INPUT_PORT picker, ... DATA_PRODUCT_OUTPUT_PORT picker, keeps columns in the glossary picker — file 41 passed; AssetsSelectionModal folder 5 suites, 100 passed.

Manual testing

Local server, a table loyalty_members with columns member_id and loyalty_points. A plain dataAsset search for loyalty returns both columns; the Add Input Ports picker for the same search lists the database, schema, table and data products, and no columns:

Port picker without columns

Checklist:

  • I have read the CONTRIBUTING document.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.

RetriggerView in GreptileConfidence Score: 4/5

The change appears safe to merge, with a non-blocking gap in pagination tests.

Findings

  1. P2 Later pages lack test coverage ▶

Summary

Excludes table columns from data product input and output port searches.

  • Input and output port pickers leave table columns out of their results.

Reviews (1) · Last reviewed commit: "fix(ui): leave columns out of the data p..." · Reviewed by Greptile

The input and output port picker searches the data asset index, which also
holds table columns, so a column could be picked and the server then refused
it as a port. The picker now excludes columns, matching what the server
accepts as a port.
Copilot AI balanced review requested due to automatic review settings October 19, 2026 12: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:

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

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 added backend safe to test Add this label to run secure Github workflows on PRs labels Oct 19, 2026
@gitar-bot

gitar-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Filtering columns from both data-product port pickers changes available selections; an overly broad filter could omit assets users need to associate.

Excludes table columns from the data product input and output port pickers by adding a must_not entityType = tableColumn clause in useAssetSelectionState, while other asset pickers keep columns. 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

Comment on lines +210 to +214
const { queryFilter } = (searchQuery as jest.Mock).mock.calls[0][0];

expect(queryFilter.query.bool.must_not).toEqual(
expect.arrayContaining([{ term: { entityType: 'tableColumn' } }])
);

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.

P2 Later pages lack test coverage

The new port tests check only the first search request. The separate onScroll path also changed, but existing scroll tests use the glossary picker and check only the page number. Removing the exclusion from onScroll would leave these tests passing while columns reappear on later pages. Extend the parameterized test to scroll and assert that the next request still excludes tableColumn.

@github-actions

Copy link
Copy Markdown
Contributor

❌ UI Checkstyle Failed

❌ Bundle Runtime Check

A route chunk loads but one of its chunks still exports undefined: a chunking change broke module initialisation. Run yarn build && yarn bundle:runtime locally.

🔍 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 1 changed file(s).

Count Rule
2 react-hooks/exhaustive-deps
1 openmetadata-imports/no-lower-layer-page-imports
1 openmetadata-imports/review-sequential-api-calls
All findings
Location Rule Message
🟡 src/components/DataAssets/AssetsSelectionModal/useAssetSelectionState.ts:48: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/DataAssets/AssetsSelectionModal/useAssetSelectionState.ts:199:5 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'activeFilter'. Either include it or remove the dependency array.
🟡 src/components/DataAssets/AssetsSelectionModal/useAssetSelectionState.ts:270:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'fetchEntities'. Either include it or remove the dependency array.
🟡 src/components/DataAssets/AssetsSelectionModal/useAssetSelectionState.ts:433:15 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

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

make ui-checkstyle-changed

@yan-3005

Copy link
Copy Markdown
Contributor Author

Folded into #35740, which now carries this change together with the related governance fixes.

@yan-3005 yan-3005 closed this Oct 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 78%
78.71% (130512/165805) 65.47% (82939/126664) 66.84% (27743/41503)

@sonarqubecloud

Copy link
Copy Markdown

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

Labels

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

2 participants