Skip to content

fix(governance): hold data product port changes for approval, keep approvals off their requester, fix the port picker and status rule display - #35740

Merged
yan-3005 merged 15 commits into
mainfrom
fix/gate-data-product-ports
Oct 22, 2026
Merged

yan-3005 merged 15 commits into
mainfrom
fix/gate-data-product-ports

Conversation

@yan-3005

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

Copy link
Copy Markdown
Contributor

Describe your changes:

Four fixes and one addition for data products, approvals and lifecycle workflows, found together while testing data product lifecycles and Enforce change approval.

  1. Port changes now wait for approval. Adding or removing a data product input/output port was written immediately even under an Enforce approval workflow: ports are relationships, not fields of the data product, so the approval gate never saw them. inputPorts/outputPorts were already data product trigger fields, so a workflow could name them and silently do nothing.
  2. An approval never goes back to its requester under assignAdmins. For a workflow running after an edit is published, when the only possible approver was the requester, the requester was put back on the task whenever the strategy was not wait. With assignAdmins that skipped the admin fallback, so the requester could approve their own change (seen on a lifecycle approval: no reviewers, owned by the editor).
  3. The port picker no longer offers table columns. It searches the dataAsset index, which includes columns, so a column could be picked and the server then refused it (... of type 'tableColumn' cannot be added as a port).
  4. A lifecycle's "Check starting stage" rule shows its operator in the workflow canvas. The rule tests whether an entity has no stage yet (entityStatus == null), which the rule builder reads as Is Not Set. The Status field offered only Is / Is Not, so the canvas showed the Operator placeholder beside "No value needed" instead of the rule.
  5. A rejected lifecycle approval can ask for a revision. A rejection could only move the asset to another stage (Draft, or a terminal Rejected) or leave it in place without telling anyone, and the reviewer's comment never reached the workflow. A lifecycle can now keep the asset in its stage and give its owners a Revise and resubmit task carrying the reviewer's comment; their next edit closes that task and opens the approval again. Decision record: docs/decisions/2026-10-21-a-rejected-lifecycle-approval-asks-for-a-revision-and-the-next-edit-resubmits-it.md.

Type of change:

  • Bug fix
  • New feature (5)

High-level design:

1. Port approval

  • The gate judges a data product with its ports as two list fields, inputPorts and outputPorts (entity references, identity = id). ApprovalGate.admitRelations admits such an edit through the same staging as a PATCH.
  • EntityRepository gains staged-relation hooks (getStagedRelationFields, addStagedRelations, validateStagedRelations, applyStagedRelations), empty by default; DataProductRepository implements them for ports.
  • The port endpoints check each row as before, then either submit one change request for the eligible ports (rows reported Pending approval: change request <id>, 202 through ApprovalGate.bulkResponse) or write them as before. Bots write through; impersonated requests are judged as the person (ChangeActor), like asset edits.
  • ChangeApplyService.currentTree adds the ports wherever the entity JSON is judged (applicability, moved, apply, rebase). Publishing splits ops: field ops through the JSON Patch path as before, port ops through applyStagedRelations, in the same transaction. A held field change and a held port change from the same person form one request.
  • Who gates what: only the data product's workflow gates its ports (the port's asset is not changed). Adding assets to a domain or data product is unchanged: each asset's workflow gates it.

2. Requester re-add — SetApprovalAssigneesImpl keeps the requester only under the none strategy (the case with no fallback); assignAdmins routes to the other admins, wait leaves the task unassigned. Change request reviews and workflow-managed tasks are unchanged.

3. Port picker — useAssetSelectionState combines a must_not entityType = tableColumn clause into the query filter for input/output port pickers only.

4. Status rule operator — JSONLogicSearchClassBase offers is_null / is_not_null (Is Not Set / Is Set) on the Status field alongside Is / Is Not; the exported JSON Logic is unchanged. QueryBuilderRuleRow gives the Operator column the same minimum width the Field column already has, so the label reads in full in narrow side panels.

5. Revise and resubmit

  • TaskWorkflowHandler: on a rejection, sets two global workflow variables before completing the Flowable task, rejectionComment and rejectedBy. The task page's Reject asks for no comment, so a rejection without its own comment takes the reviewer's latest comment on the task thread.
  • collectMetadataTask gains config.revision (request | resubmit). request, on the approval's reject edge, opens (or reopens, one per asset, workflow and stage) a MetadataCompletion task titled Revise and resubmit for the stage's assignees (owners; admins when there are none), with payload.revision {comment, requestedBy} and no transitions. resubmit, placed before the approval, completes it as Resubmitted for approval when the next edit reaches the approval again. It still closes like any Metadata Completion task when the asset leaves the stage.
  • UI: the task page and the task detail panel show the comment and who asked, label the task Revise and resubmit, and offer no action buttons (the edit is the resubmission). The canvas side panel of a collect node explains both modes.

Tests:

Use cases covered

  • A person adds an input port under an Enforce data product workflow: held (202), port not added, change request with an add inputPorts op; the reviewer approves and the port is added.
  • A person removes a port: held; the reviewer rejects and the port stays.
  • A bot adds a port: written directly.
  • A held description change and a held port add on the same data product: one request, approved together, both applied.
  • One request adding the same asset as an input and an output port: approval is refused (409), neither port is added.
  • An asset hard-deleted while its port addition awaits approval: approval is refused (409), no port to it is added.
  • An entity owned only by the editor, no reviewers, Default-mode workflow with assignAdmins: the approval goes to the admins, never the editor.
  • Port pickers do not list columns; the glossary (and other) pickers still do.
  • A lifecycle playbook's "Check starting stage" node in the workflow canvas reads Status · Is Not Set and Status · Is · Unprocessed.
  • A reviewer rejects a lifecycle approval with a comment: the asset stays In Review; the owners get Revise and resubmit with the comment and requester, and no actions. The owner's edit completes it (Resubmitted for approval) and a new approval opens; a second rejection without a comment reopens the same task; an approval then moves the asset on and leaves no revision open.
  • No owners: the revision goes to the admins. Owner-approved stage (domain): the owner's resubmitting edit sends the new approval to the admins, per fix 2.

Unit tests

  • org.openmetadata.service.governance.approval.*Test — 156 run, 0 failures.
  • useAssetSelectionState.test.ts — 3 new tests; the AssetsSelectionModal folder: 5 suites, 100 passed.
  • MetadataCollectionServiceTest (keepsOneRevisionTaskPerAssetWorkflowAndStage) and TaskWorkflowHandlerTest (aRejectionWithoutItsOwnCommentUsesTheReviewersLatestTaskComment): 30 run, 0 failures.
  • UI jest over InboxPage, Entity/Task, WorkflowBuilder/forms, ActivityFeed: 82 suites, 1075 passed, 0 failed. New: revision task offers no resolve actions (taskResolve.utils), no Action Required on the task tab (TaskTabNew); both fail without the change. Revision rendering in MetadataCompletionTask, taskDetail.utils, CollectMetadataForm. yarn ui-checkstyle:changed: 0 errors.
  • JSONLogicSearchClassBase.test.ts + the QueryBuilderCanvas folder — 123 passed, 0 failed, on this branch and on current main. The two new tests (lets a status rule ask whether a stage is set, should keep the operator column wide enough to read its label) fail without the change. yarn ui-checkstyle:changed clean.

Integration tests

  • Added to WorkflowDefinitionResourceIT: test_dataProductPortAddIsHeldUntilApproved, test_dataProductPortRemovalIsHeldAndARejectionKeepsThePort, test_botPortEditIsNotHeld, test_heldDescriptionAndPortChangesApplyTogether, test_dataProductPortCannotBecomeBothKindsThroughOneRequest, test_heldPortToAnAssetDeletedBeforeApprovalIsNotAdded, test_approvalWithOnlyTheRequesterToAskGoesToAdmins.
  • test_approvalWithOnlyTheRequesterToAskGoesToAdmins fails against the previous SetApprovalAssigneesImpl (Expected an open approval task assigned to <admin>) and passes with this change.
  • Run locally on the final commit (MySQL + Elasticsearch): the 8 WorkflowDefinitionResourceIT tests above plus test_changeRequestWithNoOtherReviewerGoesToAdminsWhenTheNodeAsks — 8 run, 0 failures; ChangeRequestAdmissionIT, ChangeRequestApplyIT, ChangeRequestImportAndBulkIT — passing; DataProductResourceIT + WorkflowTaskAssigneesIT — 281 run, 0 failures, 28 skipped by the suite itself.
  • Added test_rejectedApprovalAsksForARevisionAndTheNextEditResubmitsIt (start → resubmit → approve; reject → revise). At 2f75b1f8da, the 9 WorkflowDefinitionResourceIT tests matching *eject* (this one and every other rejection test in the class) — 9 run, 0 failures. Rejection regression after the TaskWorkflowHandler change: ChangeRequestDecisionIT, TagRecognizerFeedbackIT, TaskResourceIT — 305 run, 0 failures, 31 skipped by the suites themselves.
  • Note: test_heldDescriptionAndPortChangesApplyTogether timed out once in five local runs waiting for the review task of the superseding revision (no open task at all), and passed the other four, alone and with the class. It exercises the existing revision-supersede delivery; flagging it in case it shows in CI.

Manual testing

On a local Collate server built from this branch.

Held port: the approver's task shows the held port, the data product still shows 0 ports and 1 pending change; approving adds the port.

Approver task for a held port

Port picker: 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 lists the database, schema, table and data products, and no columns.

Port picker without columns

Status rule: Govern > Workflows > a data product lifecycle > Canvas > Check starting stage. Both rules show their operator; the same on the glossary lifecycle.

Status rule with Is Not Set

Revise and resubmit: a metric lifecycle whose In Review approval asks the reviewers, on rejection Revise and resubmit. The reviewer rejects; the owner's task shows the comment and who asked, with no action buttons, on the asset's Tasks tab and on the task page.

Owner's revision task with the reviewer's comment

Task page without actions

The compiled nodes in the canvas: Rejected: ask to revise in In Review on the approval's reject edge, and the step that closes the request before the approval.

Revise node in the canvas

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.

Summary by Gitar

  • Port changes held for approval:
    • Data product input and output port edits go through the approval gate, with approved changes applied in the same transaction as field edits
  • Revise and resubmit lifecycle task:
    • A rejected lifecycle approval opens a revision task carrying the reviewer's comment, closed by the next edit
  • Requester excluded from admin fallback:
    • Approval tasks under assignAdmins route to other admins, never back to the requester
  • Port picker and status rule UI:
    • Port pickers exclude table columns, and the status rule offers Is Not Set and Is Set operators

This will update automatically on new commits.

RetriggerView in GreptileConfidence Score: 4/5

The new helper must meet the repository's final parameter requirement before merging.

Findings

  1. P2 Unchanged parameters lack `final` ▶

Summary

The PR holds data product port edits for approval and adds revision tasks after rejected lifecycle approvals. It also fixes requester assignment, port choices, and status rule labels.

  • Data product port edits can wait for approval.
  • Rejected lifecycle approvals can ask owners to revise and resubmit.
  • Admin fallback approval tasks go to someone other than the requester.
  • Port pickers leave table columns out of the results.
  • Status rules can check whether a stage is set.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Edit[Port edit] --> Gate{Approval required?}
  Gate -->|Yes| Request[Pending change request]
  Gate -->|No| Write[Write ports]
  Request -->|Approved| Write
  Request -->|Rejected| Keep[Keep published ports]
  Approval[Lifecycle approval] -->|Rejected| Revision[Revise and resubmit task]
  Revision --> NextEdit[Next asset edit]
  NextEdit --> Close[Complete revision task]
  Close --> Approval
Loading

Reviews (11) · Last reviewed commit: "test(governance): make the output port o..." · Reviewed by Greptile

Adding or removing an input or output port wrote the relationship at once,
so an Enforce approval workflow on data products never held it. Ports are
relationships, not fields of the data product, so the gate could not see them.

The gate now judges a data product with its ports as the list fields
inputPorts and outputPorts, which are already trigger fields for data
products. A port change by a person is held as a change request reviewed by
the data product's workflow and written when it is approved; bots write
through. A held field change and a held port change on the same data product
form one request.
@yan-3005
yan-3005 requested a review from a team as a code owner October 19, 2026 11:57
@yan-3005
yan-3005 requested review from manerow and a balanced review from Copilot October 19, 2026 11:57
@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
…he admins

When the only person an approval could ask was the requester, a workflow
running after the edit gave the task back to the requester even when its
empty-assignee strategy was assignAdmins, so the requester could approve
their own change. The requester is now kept only under the none strategy;
assignAdmins routes the approval to the other admins, and wait leaves it
unassigned.
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:27

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.

@yan-3005 yan-3005 changed the title fix(governance): hold data product port changes for approval fix(governance): hold data product port changes for approval, keep approvals off their requester, keep columns out of the port picker Oct 19, 2026
@github-actions

github-actions Bot commented Oct 19, 2026 •

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), 15 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), 15 warning(s) across 5 changed file(s).

Count Rule
7 openmetadata-imports/no-lower-layer-page-imports
7 react-hooks/exhaustive-deps
1 openmetadata-imports/review-sequential-api-calls
All findings
Location Rule Message
🟡 src/components/ActivityFeed/TaskFeedCard/TaskFeedCardFromTask.component.tsx:41: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/ActivityFeed/TaskFeedCard/TaskFeedCardFromTask.component.tsx:42: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/ActivityFeed/TaskFeedCard/TaskFeedCardFromTask.component.tsx:192:9 react-hooks/exhaustive-deps The 'handleTaskLinkClick' function makes the dependencies of useMemo Hook (at line 228) change on every render. Move it inside the useMemo callback. Alternative
🟡 src/components/DataAssets/AssetsSelectionModal/AssetSelectionDrawer.tsx:18: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: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
🟡 src/components/Entity/Task/MetadataCompletionTask/MetadataCompletionTask.utils.ts:16: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/Entity/Task/TaskTab/TaskTabNew.component.tsx:70: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/Entity/Task/TaskTab/TaskTabNew.component.tsx:71: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/Entity/Task/TaskTab/TaskTabNew.component.tsx:751:9 react-hooks/exhaustive-deps The 'updateTaskData' function makes the dependencies of useCallback Hook (at line 859) change on every render. To fix this, wrap the definition of 'updateTaskDa
🟡 src/components/Entity/Task/TaskTab/TaskTabNew.component.tsx:1323:6 react-hooks/exhaustive-deps React Hook useMemo has unnecessary dependencies: 'onTaskDropdownClick', 'taskHandler.approvedValue', and 'taskHandler.rejectedValue'. Either exclude them or rem
🟡 src/components/Entity/Task/TaskTab/TaskTabNew.component.tsx:1358:6 react-hooks/exhaustive-deps React Hook useMemo has unnecessary dependencies: 'isPartOfAssigneeTeam' and 'task'. Either exclude them or remove the dependency array.
🟡 src/components/Entity/Task/TaskTab/TaskTabNew.component.tsx:1421:6 react-hooks/exhaustive-deps React Hook useMemo has unnecessary dependencies: 'onTaskResolve' and 'task'. Either exclude them or remove the dependency array.

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

make ui-checkstyle-changed

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 79%
79.01% (128203/162249) 65.38% (44984/68802) 68.4% (25700/37570)

…eted assets

A held request adding the same asset as an input and an output port passed
the checks, because each addition was checked only against the ports as
published. Approval now checks each addition against the published ports and
the other additions of the request, and refuses an asset that no longer
exists, so neither can be written.

Splits the port helpers into smaller methods, marks unchanged locals final,
names repeated test strings, and records the decision that a data product
port change is held as a list field of the data product, gated only by the
data product's workflow.
Copilot AI balanced review requested due to automatic review settings October 19, 2026 12:54

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.

A lifecycle playbook's "Check starting stage" rule tests whether an entity has
no stage yet (entityStatus == null). The Status field offered only Is / Is Not,
so the workflow canvas could not show the rule's operator and displayed the
Operator placeholder beside "No value needed".

- Offer Is Not Set / Is Set on the Status field.
- Keep the Operator column wide enough to read its label in narrow panels,
  as the Field column already is.
Copilot AI balanced review requested due to automatic review settings October 21, 2026 08:01
@yan-3005
yan-3005 requested a review from a team as a code owner October 21, 2026 08:01

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.

@anuj-kumary anuj-kumary left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the UI changes. No regressions found: the touched jest suites pass (81 suites, 1178 tests), eslint shows 0 errors and tsc shows no new errors. A few small follow-ups are inline.


const taskDisplayMessage = useMemo(() => {
const taskTypeLabel = t(TASK_ENTITY_TYPES[task.type] ?? 'label.task');
const taskTypeLabel = t(getTaskTypeMessageKey(task) ?? 'label.task');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getTaskTypeMessageKey(task) now reads task.payload, but this memo's deps (L640) still list only task.type, as does the header memo using it at L716 (deps ~L731). This adds two new react-hooks/exhaustive-deps warnings that main doesn't have. TaskFeedCardFromTask already got this fix (task.type → task); could both memos here get the same?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 3c389fb: both memos now depend on task (the title memo and the header memo), so the two new exhaustive-deps warnings are gone.

size="text-xs"
weight="medium">
{revision.requestedBy
? `${t('label.comment')} · ${t('label.requested-by')}: ${

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This header joins translated strings by concatenation (Comment · Requested By: <name>), so word order is fixed in English. That breaks in RTL locales (ar-sa, he-he, pr-pr). It also shows the raw username, not a display name. The inbox panel (taskDetail.utils) shows the same data as two separate rows. Could this match that, or use one translation key with interpolation? Rendering the requester with UserPopOverCard / getEntityName would also show a proper name.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 3c389fb: the note now has a "Comment" row and, as its own row, "Requested by" with the reviewer through UserPopOverCard, display name resolved with useUserProfile + getEntityName (falls back to the username). No more concatenated label, so word order follows each locale. Checked on a local server: it reads "Requested By · Karan" with the profile card.

onChange={setTaskAssignees}
/>

{taskAssignees === TaskAssignees.Candidates && (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AssigneeSection hides the radio group for revision === resubmit, but this candidates picker and the Save-disabled check (L312) still depend only on taskAssignees === Candidates. If a resubmit node arrives with taskAssignees: candidates, one of two things happens: with an empty list, Save is disabled and the reason isn't visible; otherwise a picker appears for a step that asks nobody. Could both also require config.revision !== Revision.Resubmit?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 3c389fb: a module-level asksCandidates(config, taskAssignees) (false for a resubmit step) gates the picker, the Save-disabled check and the saved candidates. Test: a resubmit node stored with taskAssignees: candidates shows no picker and saves with candidates: [].

};

// A port names a data asset. Columns share the data asset search index but cannot be ports.
const PORT_ASSETS_FILTER: QueryFilterInterface = {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor/cosmetic: this filter covers the result list, but the port pickers' quick-filter Type dropdown (DOMAIN_DATAPRODUCT_DROPDOWN_ITEMS includes entityType) loads its options through ExploreQuickFilters → getAggregationOptions on SearchIndex.ALL without it. So "Table Column" can still be offered there, and picking it gives an empty list. Maybe pass the same exclusion into the quick-filter aggregation as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 3c389fb: the hook returns its port filter as assetsFilter, and the picker passes it to ExploreQuickFilters as defaultQueryFilter, which the option aggregation already merges. Checked on a local server: the Entity types filter of Add Input Ports lists metric, dataProduct, tag, glossaryTerm, table, database, databaseSchema, and no tableColumn.

- The revision note shows the comment and, as its own row, who rejected
  it by display name with their profile card.
- A resubmit step neither shows nor requires specific users or teams.
- The port picker's quick filters count options with the same filter as
  its list, so no column is offered.
- Task title memos depend on the task, whose payload names a revision.
Copilot AI balanced review requested due to automatic review settings October 22, 2026 10:29

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.

@yan-3005
yan-3005 added this pull request to the merge queue Oct 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-10-22T13:45:03Z)

Blocked the queue: integration-tests-postgres-opensearch

…f the data product

An output port must be one of the data product's own assets, in its domain; the test now adds it as an asset first, through a helper the both-kinds test shares.
Copilot AI balanced review requested due to automatic review settings October 22, 2026 13:47
@gitar-bot

gitar-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 closed / 1 findings

🔴 High risk · Changing approval enforcement for data-product port relations could allow unapproved ports to publish if staged relation handling misapplies decisions.

Holds data product port add/remove changes for approval under Enforce workflows, keeps approvals off the requester under assignAdmins, excludes table columns from the port picker, shows the Is Not Set operator on lifecycle status rules, and adds a Revise and resubmit task after rejected lifecycle approvals. Resolved the missing docs/decisions record for the port approval contract and gating rule. No open issues found.

✅ 1 closed
✅ Quality: Port approval contract and gating rule are not recorded in docs/decisions

📄 openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DataProductRepository.java:110-114 📄 openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DataProductRepository.java:580-594 📄 openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DataProductRepository.java:675-689 📄 openmetadata-service/src/main/java/org/openmetadata/service/governance/approval/ChangeApplyService.java:379-393 📄 openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityRepository.java:6307-6321
This PR adds a contract that the UI task view, change request consumers and later staged-relation implementers all have to agree with, and no record in docs/decisions/ states it. A change request now names a data product's ports as inputPorts/outputPorts list ops (add/remove, key = reference id, value = the EntityReference JSON). Those ops are applied through applyStagedRelations rather than the JSON Patch path. The PR also sets an ownership rule that exists only in its description: "only the data product's workflow gates its ports (the port's asset is not changed)". Since the repo squash-merges, that sentence will not survive in the tree.

The record would say: "A relation the entity JSON does not carry (a data product's input/output ports) is held as a list field of the owning entity, named by getStagedRelationFields, with identity = reference id. It is published by applyStagedRelations in the same transaction as the field ops. Only the owning entity's approval workflow gates it, not the related asset's." Please add it, e.g. docs/decisions/2026-10-19-data-product-ports-are-held-as-list-fields-of-the-data-product.md, and point to it from getStagedRelationFields as ADR:<date>-<slug>.

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

@yan-3005
yan-3005 enabled auto-merge October 22, 2026 13:59

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.

@sonarqubecloud

Copy link
Copy Markdown

@yan-3005
yan-3005 added this pull request to the merge queue Oct 22, 2026
@sonarqubecloud

Copy link
Copy Markdown

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-10-22T15:43:24Z)

Blocked the queue: py-tests-status

  • py-tests — py-tests-status, python / Verify Expected Jobs, python / Integration Tests (shard-2), python / Integration Tests (shard-2), python / Integration Tests (shard-2), python / Integration Tests (shard-3)
  • Maven Collate Tests — maven-collate-ci

@yan-3005
yan-3005 added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 0d7426d Oct 22, 2026
99 of 102 checks passed
@yan-3005
yan-3005 deleted the fix/gate-data-product-ports branch October 22, 2026 21:26
anuj-kumary added a commit that referenced this pull request Nov 4, 2026
…show why a port is rejected (#36729) (#36984)

* fix(data-products): keep port pickers to assets that can be ports and show why a port is rejected

- Output port picker hides the data product's input ports, input port picker
  hides its output ports (ES `ids` exclusion; `id` is text-mapped).
- Asset selection shows the per-asset reasons of an all-failed bulk add (400
  BulkOperationResult) instead of the generic "Error while adding assets!" toast.
- Clearer backend message: "Asset 'X' is already an input port of this data
  product; an asset cannot be both an input and an output port".

* fix(data-products): keep each port picker's exclusions separate

A late port fetch for one picker could overwrite the other picker's
exclusion list when both Add Port buttons were clicked before the first
fetch returned.

* chore(ui): organize imports in InputOutputPortsTab test

2.0 backport notes:
- Includes the column exclusion (PORT_ASSETS_FILTER) from #35740, which 2.0 lacks.
- Adds ids to QueryFieldInterface, as on main, so the ids exclusion type-checks.
- Drops the held-port-change test edit (WorkflowDefinitionResourceIT); 2.0 has no port approvals.
- InputOutputPortsTab test keeps only the port picker suite.

(cherry picked from commit 97af5ab)
@yan-3005 yan-3005 self-assigned this Nov 19, 2026
yan-3005 added a commit that referenced this pull request Nov 26, 2026
…) (#38829)

Backport of #38708, ported by hand: 2.0 has no "wait" empty-assignee
strategy and gave the requester back under every strategy, so the
assignAdmins fallback never ran for an event-driven approval.

The requester is now never an assignee of an approval their own edit
started. An emptied list goes to the node's empty-assignee strategy: none
approves automatically, assignAdmins assigns the other admins and, as on
main since #35740, keeps the task open when the requester is the only
admin instead of approving it.
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.

4 participants