Repository navigation
Description
Affected module
Backend
Describe the bug
While rolling out OpenMetadata 2.0.5 for a customer (Snowflake warehouse, approval workflows on glossary terms and
on metrics), the reviewers noticed that the "Proposed Changes" panel of an approval task does not show the change
they are asked to approve.
Looking at the task entity (GET /api/v1/tasks/name/TASK-NNNNN?fields=*), the diff is stored once at task creation
in payload.proposedChanges, and it is computed incorrectly in two ways:
- Glossary terms. When an Approved term is edited several times (each edit cancels the previous task and opens a
new one, which is expected), every new task carries exactly the sameproposedChangesas the first one. Later
edits never appear in the panel. - Metrics (approval workflow cloned from
GlossaryTermApprovalWorkflow, triggereventBasedEntityonmetric,
eventsCreated/Updated, excludeentityStatus).proposedChangesonly containsentityStatus; the edited
descriptionis missing, although the entity version created by the edit has it inchangeDescription.
In both cases the entity version history shows the real change, and writing a correct diff into
payload.proposedChanges with PATCH /api/v1/tasks/{id} makes the UI render it properly. So the task model and the
panel are fine; what is wrong is the computation of proposedChanges when the task is created.
To Reproduce
Glossary term:
- Glossary with a reviewer team. Term
Tis Approved with descriptionD0. - As a user who is not a reviewer, change the description to
D1. TaskAis created, term is In Review.
payload.proposedChanges.description={added: [D1], removed: [D0]}(correct). - The reviewer approves. Term is Approved with
D1. - The same non-reviewer appends text:
D1 + " This is a test". TaskBis created. GET /api/v1/tasks/name/TASK-<B>?fields=*:proposedChanges.descriptionis still{added: [D1], removed: [D0]}.
The panel showsD0struck through andD1in green; the appended text never appears. We observed four
consecutive tasks with identical payloads.
Metric:
- Deploy a workflow for
metricwith the same nodes asGlossaryTermApprovalWorkflow. - Metric
Mis Approved and has a reviewer. As a non-reviewer,PATCH /api/v1/metrics/{id}adding text todescription. - The metric goes to In Review (version n -> n+0.1).
GET /api/v1/metrics/name/Mshows bothdescriptionand
entityStatusinchangeDescription.fieldsUpdated. - The approval task has
payload.proposedChanges = {"entityStatus": {"added": ["In Review"], "removed": ["Draft", "Approved"]}}.
Nodescriptionentry.
The entity's incrementalChangeDescription for that version only contains entityStatus (the status update made by
the workflow itself), which suggests proposedChanges is derived from the incremental change of the last version
instead of the diff between the last Approved version and the version under review.
Expected behavior
proposedChanges is the diff between the last Approved version of the entity and the version under review, for
every field that changed (description, display name, tags, synonyms, related terms, expression...), recomputed for
each new task.
OS
Linux (Docker Compose deployment)
Python version
No response
OpenMetadata version
2.0.5 (also 2.0.2)
OpenMetadata Ingestion package version
2.0.5
Additional context
Workaround in use: a job recomputes the diff from /api/v1/<entity>/{id}/versions (last Approved vs current) and
writes it to /payload/proposedChanges of the open approval task; the panel then shows the right content.
Pre-submission checklist
- I searched for duplicate issues.
- I removed credentials, hostnames, emails, and other sensitive data from logs and config.
Activity
Vamsi-klu commentedon Nov 26, 2026
I looked into this on main. The two repros in the description should pass there now, thanks to #35972 (the workflow's own status move is kept out of the preview), #37010 (the first task previews the edit that opened the cycle) and #32335 (the workflow's status write is stored as its own version). I'll add integration tests that pin both repros so they stay fixed.
The preview is still a running merge, though: the prior task's stored map plus one version hop read when
CreateTaskruns (ChangePreviewUtils.javaaround line 243). That leaves three cases where the diff is still stale or partial:WorkflowEventConsumer.isBotChange)findFirst()returns (CreateTask.javaline 866)What I'd like to do is recompute
proposedChangesat every task write from the version history since the cycle's base version, and store that base version in the payload. That would supersede the Nov 3 ADR (an approval preview opens with the edit that started the cycle). @yan-3005, does that direction work for you? If you'd rather keep the current approach, I can send just the regression tests.