Skip to content

[Detail Bug] Task approval for migrated nested-column description suggestions overwrites the parent column description #36615

Closed

Description

@detail-app

Detail Bug Report

https://app.detail.dev/org_3377c26d-da48-4ccd-b83a-22c542f4fe83/bugs/bug_9ebbf3b4-ad0b-4ee2-b55b-87551c1ab00b

Introduced in #25894 by @harshach on Apr 23, 2026

Summary

  • Context: When a Suggestion task is approved, TaskWorkflowHandler.applySuggestion writes the accepted description onto the entity field named by the task payload's fieldPath, via FieldPathUtils (openmetadata-service/src/main/java/org/openmetadata/service/util/FieldPathUtils.java). For dot-separated paths, FieldPathUtils.parseFieldPath treats the last dot segment as a property and navigateAndSetDescription/getDescriptionFromList then walk only to the named parent field, silently discarding the "property".
  • Bug: A bare nested-column field path such as columns.parent.child (no .description suffix, which the v2.0.0 suggestion→task migration really produces) is mis-parsed as {container: columns, field: parent, property: child}, so the approved description is written to the parent column parent instead of the nested child column child — and the write reports success.
  • Actual vs. expected: The described text should land on the nested child column (that is where the legacy suggestion system wrote it, resolving arrayFieldName as the column FQN); instead the parent column's description is silently overwritten and the child is untouched.
  • Impact: Silent data corruption: approving ("applying") a migrated legacy nested-column description suggestion overwrites an unrelated (parent) column's description in the catalog, while the column the user intended stays unchanged, and success is logged.

Code with Bug

openmetadata-service/src/main/java/org/openmetadata/service/util/FieldPathUtils.java

String property = hasProperty ? parts[parts.length - 1] : "description"; // <-- BUG 🔴 any 3rd segment is assumed a property; for "columns.parent.child" it is the child column name
int fieldEnd = hasProperty ? parts.length - 1 : parts.length;
String fieldName =
    FullyQualifiedName.unquoteName(
        String.join(".", Arrays.copyOfRange(parts, 1, fieldEnd)));
return new FieldPathComponents(parts[0], fieldName, property);
return fieldList != null                          // <-- BUG 🔴 property() never consulted; fieldName="parent" so the parent column is written
    && setDescriptionInList(fieldList, components.fieldName(), description);

openmetadata-service/src/main/java/org/openmetadata/service/tasks/TaskWorkflowHandler.java

boolean success =
    FieldPathUtils.updateFieldDescription(
        entity, repository, user, fieldPath, suggestedValue, ...); // <-- BUG 🔴 returns true even though the wrong column was written

Explanation

  • For dot-separated field paths, parseFieldPath assumes any 3rd (or later) segment is a "property" segment (e.g. description, tags).
  • Migrated legacy nested-column suggestions can produce field paths like columns.parent.child (no explicit .description). This is parsed as container=columns, fieldName=parent, property=child.
  • The description update/read walkers ignore components.property() entirely, so they operate only on fieldName and write/read the parent column (parent) while discarding the child segment.
  • Repro evidence: calling FieldPathUtils.updateFieldDescription(..., "columns.profile.child", "NEW-TEXT") returns true and persists a patch, but changes profile.description and leaves child.description unchanged; getFieldDescription(..., "columns.profile.child") also returns the parent description.

Codebase Inconsistency

openmetadata-service/src/main/java/org/openmetadata/service/migration/utils/v200/MigrationUtil.java emits property-less paths during suggestion→task migration:

if (arrayFieldName != null && arrayFieldValue != null) {
  return fieldName + "." + arrayFieldName + "." + arrayFieldValue;
} else if (arrayFieldName != null) {
  return fieldName + "." + arrayFieldName;   // <-- BUG 🔴 no ".description" is ever appended
}

This contradicts the parser/test assumption that real producers always append .description/.tags.

Recommended Fix

In FieldPathUtils.parseFieldPath (dot branch), only treat the last segment as a property when it matches known properties (e.g. description, tags); otherwise fold it into fieldName so columns.parent.child resolves as nested column parent.child. Additionally/alternatively, validate components.property() equals "description" in updateFieldDescription/getFieldDescription for description flows and refuse/flag mismatches.

History

This bug was introduced in commit 51ecf45 ("Task redesign (#25894)").

Activity

  1. added a commit that references this issue on Nov 5, 2026
    3889365
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

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      Done ✅

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions