Skip to content

Approval task "Proposed Changes" shows a stale diff for glossary terms and omits the edited fields for metrics #35456

Open

Description

@SCY210

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:

  1. 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 same proposedChanges as the first one. Later
    edits never appear in the panel.
  2. Metrics (approval workflow cloned from GlossaryTermApprovalWorkflow, trigger eventBasedEntity on metric,
    events Created / Updated, exclude entityStatus). proposedChanges only contains entityStatus; the edited
    description is missing, although the entity version created by the edit has it in changeDescription.

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:

  1. Glossary with a reviewer team. Term T is Approved with description D0.
  2. As a user who is not a reviewer, change the description to D1. Task A is created, term is In Review.
    payload.proposedChanges.description = {added: [D1], removed: [D0]} (correct).
  3. The reviewer approves. Term is Approved with D1.
  4. The same non-reviewer appends text: D1 + " This is a test". Task B is created.
  5. GET /api/v1/tasks/name/TASK-<B>?fields=*: proposedChanges.description is still {added: [D1], removed: [D0]}.
    The panel shows D0 struck through and D1 in green; the appended text never appears. We observed four
    consecutive tasks with identical payloads.

Metric:

  1. Deploy a workflow for metric with the same nodes as GlossaryTermApprovalWorkflow.
  2. Metric M is Approved and has a reviewer. As a non-reviewer, PATCH /api/v1/metrics/{id} adding text to description.
  3. The metric goes to In Review (version n -> n+0.1). GET /api/v1/metrics/name/M shows both description and
    entityStatus in changeDescription.fieldsUpdated.
  4. The approval task has payload.proposedChanges = {"entityStatus": {"added": ["In Review"], "removed": ["Draft", "Approved"]}}.
    No description entry.

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

  1. added
    bug
    on Oct 14, 2026
  2. Vamsi-klu commented on Nov 26, 2026

    @Vamsi-klu
    Contributor

    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 CreateTask runs (ChangePreviewUtils.java around line 243). That leaves three cases where the diff is still stale or partial:

    • a bot edit made during the cycle never shows up, because bot changes don't start a workflow run (WorkflowEventConsumer.isBotChange)
    • a wrong map carried over from an older task, for example one opened before an upgrade, survives into every later task
    • with two open prior tasks, the merge base is whichever one findFirst() returns (CreateTask.java line 866)

    What I'd like to do is recompute proposedChanges at 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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendbug

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions