Skip to content

Embedded testSuites of a test case keep incrementalChangeDescription #38799

Backlog

Description

@ryshinoz

Affected module

Backend

Describe the bug

When a test case is read with fields=testSuites, each embedded test suite keeps its incrementalChangeDescription. Only changeDescription is cleared.

incrementalChangeDescription is part of the stored suite JSON, so whatever the last change to the suite was is copied into every test case of that suite. For a logical suite this can be a list of all its test cases (for example after the PUT described in #38798), which makes every test case payload carry a copy of the whole suite's test list.

This copy does not stay in the API response. It also ends up in the test case's stored versions and events: on 2.0.1, every test case result write (POST /api/v1/dataQuality/testCases/testCaseResults/{fqn}) stored the test case with this embedded suite in change_event, successful_sent_change_events (one row per subscription), audit_log_event and entity_extension. With a 5 MB incrementalChangeDescription on a logical suite, each result write stored hundreds of KB (compressed) in each of these tables.

To Reproduce

  1. Create a logical test suite with some test cases and make a change to the suite that records a large change, for example the PUT in Logical test suite PUT records every test case as removed from tests #38798.
  2. GET /api/v1/dataQuality/testSuites/{id}: incrementalChangeDescription holds that change.
  3. GET /api/v1/dataQuality/testCases/{id}?fields=testSuites for one of its test cases: the logical suite in testSuites has changeDescription: null but still has the same incrementalChangeDescription.
  4. Post a result for that test case and look at the test case's entityUpdated row in the change_event table: the embedded suite, including the incrementalChangeDescription, is in the stored event.

Expected behavior

The embedded test suites carry no change history: both changeDescription and incrementalChangeDescription are cleared, as the code already intends for changeDescription.

OS

N/A (server behavior, not OS-specific)

Python version

N/A

OpenMetadata version

2.0.1 (observed). By reading the code, the same behavior is expected on 2.0.10 and main (6c23808).

OpenMetadata Ingestion package version

N/A

Additional context

Where it happens (from reading the code)

Both paths that fill testSuites call only .withChangeDescription(null):

Possible fix

Add .withIncrementalChangeDescription(null) next to .withChangeDescription(null) in both places.

Related

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
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions