Skip to content

Fixes #36556: Record the asset's change event when an approved task changes it (backport 2.0 #36682) - #36694

Merged
manerow merged 2 commits into
2.0from
fix/36556-task-apply-change-events-2.0
Nov 3, 2026
Merged

manerow merged 2 commits into
2.0from
fix/36556-task-apply-change-events-2.0

Conversation

@manerow

@manerow manerow commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Issue

Fixes #36556

Port of PR #36682 to the 2.0 release branch. The change to TaskWorkflowHandler and FieldPathUtils is the same as on main; only the types differ, because EntityInterface is not generic on 2.0. The tests were adapted to the smaller 2.0 test files. PR #36682 explains the problem.

What changes

  • When an approved task changes its asset (a description, column description, owners, domains or an AI suggestion), the asset's change event is recorded, as for a direct edit. Asset alerts and the audit log now see these changes.
  • Every asset write an approved task makes goes through one step, saveChange, that saves the change and records its event.
  • FieldPathUtils no longer writes to the database; the removed updateFieldDescription had no other callers in OpenMetadata or Collate 2.0.

How it was tested on 2.0

  • Unit tests: TaskWorkflowHandlerTest (three new cases for saveChange), FieldPathUtilsTest, EntityFieldUtilsTest (58 tests, all pass).
  • Integration tests on MySQL: the apply and reject cases in TaskResourceIT, which now assert exactly one change event on the asset by the approver, plus TaskChangeEventIT and ChangeSummaryResourceIT: 12, 6 and 15 cases, all pass.
  • Checked by hand on a local Collate 2.0: approving a description suggestion records one table change event by the approver, fires a table alert and adds an audit log entry.

@manerow manerow added safe to test Add this label to run secure Github workflows on PRs backend skip-pr-checks Bypass PR metadata validation check labels Oct 30, 2026
@manerow manerow self-assigned this Oct 30, 2026
@manerow
manerow marked this pull request as ready for review October 30, 2026 11:47
@manerow
manerow requested a review from a team as a code owner October 30, 2026 11:47
@manerow
manerow requested review from sonika-shah and removed request for a team October 30, 2026 11:47
@gitar-bot

gitar-bot Bot commented Oct 30, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Centralizing approved-task asset writes in saveChange changes persistence and event recording; a faulty diff could apply unintended metadata or emit misleading audit events.

Records the asset's change event when an approved task modifies it (description, column description, owners, domains, or AI suggestion), routing all such writes through a single saveChange step so alerts and audit logs see them. 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

@manerow
manerow merged commit 16d5721 into 2.0 Nov 3, 2026
63 of 64 checks passed
@manerow
manerow deleted the fix/36556-task-apply-change-events-2.0 branch November 3, 2026 07:29

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

backend safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants