Skip to content

Fixes 38798: Keep test suite tests out of the diff on PUT - #38862

Open
pcbeingused333 wants to merge 1 commit into
open-metadata:mainfrom
pcbeingused333:fix/logical-suite-put-tests-diff
Open

pcbeingused333 wants to merge 1 commit into
open-metadata:mainfrom
pcbeingused333:fix/logical-suite-put-tests-diff

Conversation

@pcbeingused333

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #38798

CreateTestSuite has no tests property, so the entity built from a PUT /api/v1/dataQuality/testSuites request has tests null. TestSuiteUpdater compared the stored list against it (as an empty list), so every PUT on a logical suite with test cases recorded a change from the full list to nothing and bumped the version, although the membership never changed. The updater now skips the tests comparison when the operation is a PUT and the request carries no tests. PATCH is unaffected, and so is a PUT that does set the list.

The issue may still need its Shipping project fields set; a maintainer's help with that would be appreciated.

Type of change:

  • Bug fix

High-level design:

N/A — small change.

Tests:

Use cases covered

  • Re-sending the create request for an existing logical test suite records no change to tests.
  • A PUT that carries an explicit empty list still records the change.

Unit tests

  • I added unit tests for the new/changed logic.
  • Files added/updated: TestSuiteRepositoryUpdateTest.java (new).
  • mvn -pl openmetadata-service test -Dtest=TestSuiteRepositoryUpdateTest on JDK 21: 2 tests pass. Without the fix the PUT-without-tests case fails. spotless:apply was run. Coverage was not measured.

Backend integration tests

  • I added integration tests in openmetadata-integration-tests/ for new/changed API endpoints.
  • Not run; the change is covered by the unit test above.

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Not applicable (no UI changes).

Manual testing performed

None beyond the unit tests; no server was started.

UI screen recording:

Not applicable — backend change.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • I have added a test that covers the exact scenario we are fixing.

This change was prepared with the help of an AI coding assistant.

@pcbeingused333
pcbeingused333 requested a review from a team as a code owner November 26, 2026 13:43
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Skipping test-membership comparison when PUT omits tests preserves existing suite membership, preventing false removals and version changes for logical suites.

Skips the tests comparison in TestSuiteUpdater when a PUT request omits tests, so re-sending the create request for an existing logical test suite no longer records a spurious change or bumps the version. 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

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logical test suite PUT records every test case as removed from tests

2 participants