Skip to content

Fixes 28267: Preserve test case suite search membership#28271

Merged
harshach merged 2 commits into
mainfrom
harshach/fix-issue-28267
May 19, 2026
Merged

Fixes 28267: Preserve test case suite search membership#28271
harshach merged 2 commits into
mainfrom
harshach/fix-issue-28267

Conversation

@harshach
Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes #28267

I worked on preserving logical test suite membership during test case PUT updates because the live search document was losing testSuites until a full reindex.

Type of change:

  • Bug fix

High-level design:

N/A - small change.

Tests:

Use cases covered

  • PUT /v1/dataQuality/testCases keeps logical test suite membership in the test case search document.

Unit tests

  • I added unit tests for the new/changed logic.
  • Files added/updated: openmetadata-service/src/test/java/org/openmetadata/service/jdbi3/TestCaseRepositoryTest.java
  • Coverage %: Not measured.

Backend integration tests

  • I added integration tests in openmetadata-integration-tests/ for new/changed API endpoints.
  • Files added/updated: openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/TestCaseResourceIT.java

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Not applicable (no UI changes).

Manual testing performed

  • mvn -pl openmetadata-service -Dtest=TestCaseRepositoryTest test
  • mvn -pl openmetadata-integration-tests -Dit.test=TestCaseResourceIT#test_putPreservesLogicalSuiteSearchMembership -DfailIfNoTests=false verify
  • mvn -pl openmetadata-service,openmetadata-integration-tests spotless:check
  • mvn -pl openmetadata-service,openmetadata-integration-tests spotless:apply

UI screen recording / screenshots:

Not applicable.

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 commented on my code, particularly in hard-to-understand areas.
  • JSON Schema changes are not applicable.
  • UI screenshots are not applicable.
  • 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.

@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels May 19, 2026
@harshach harshach marked this pull request as ready for review May 19, 2026 15:58
Copilot AI review requested due to automatic review settings May 19, 2026 15:58
yan-3005
yan-3005 previously approved these changes May 19, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes TestCase PUT updates so logical test suite membership remains present in the live search document, avoiding temporary Bundle Suite UI disappearance until reindex.

Changes:

  • Hydrates testSuite and testSuites before TestCase update lifecycle/search indexing.
  • Adds a unit test for the repository hydration behavior.
  • Adds an integration test that verifies PUT preserves logical suite membership in search.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TestCaseRepository.java Hydrates suite fields before lifecycle update/search indexing.
openmetadata-service/src/test/java/org/openmetadata/service/jdbi3/TestCaseRepositoryTest.java Verifies postUpdate requests and applies suite field hydration.
openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/TestCaseResourceIT.java Tests logical suite membership remains in the search document after PUT.

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented May 19, 2026

Code Review ✅ Approved

Updates the test case PUT logic to preserve test suite membership in search documents, preventing the loss of associations prior to reindexing. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

🟡 Playwright Results — all passed (10 flaky)

✅ 4139 passed · ❌ 0 failed · 🟡 10 flaky · ⏭️ 89 skipped

Shard Passed Failed Flaky Skipped
✅ Shard 1 299 0 0 4
🟡 Shard 2 775 0 3 11
🟡 Shard 3 777 0 1 7
🟡 Shard 4 781 0 1 12
🟡 Shard 5 772 0 1 47
🟡 Shard 6 735 0 4 8
🟡 10 flaky test(s) (passed on retry)
  • Features/DataQuality/ColumnLevelTests.spec.ts › Column Value Mean To Be Between (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should start term as Draft when glossary has reviewers (shard 2, 2 retries)
  • Features/KnowledgeCenter.spec.ts › Article mentions in description should working for Knowledge Center (shard 2, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Pages/DataContractsSemanticRules.spec.ts › Validate Description Rule Is_Set (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Announcement create, edit & delete (shard 5, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/UserDetails.spec.ts › Admin user can edit teams from the user profile (shard 6, 1 retry)
  • Pages/UserDetails.spec.ts › Admin user can get all the roles hierarchy and edit roles (shard 6, 1 retry)
  • Pages/Users.spec.ts › Should add, remove, and navigate to persona pages for Personas section (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@harshach harshach added the To release Will cherry-pick this PR into the release branch label May 19, 2026
@harshach harshach merged commit d388a52 into main May 19, 2026
63 of 65 checks passed
@harshach harshach deleted the harshach/fix-issue-28267 branch May 19, 2026 19:54
@github-actions
Copy link
Copy Markdown
Contributor

Failed to cherry-pick changes to the 1.12.9 branch.
Please cherry-pick the changes manually.
You can find more details here.

@github-actions
Copy link
Copy Markdown
Contributor

Failed to cherry-pick changes to the 1.13 branch.
Please cherry-pick the changes manually.
You can find more details here.

@sonarqubecloud
Copy link
Copy Markdown

@ayush-shah
Copy link
Copy Markdown
Member

Thanks for the PR. This needs to be updated against the latest main before we can move it forward.

Could you please rebase on main, resolve any conflicts if present, push the updated branch, and let CI rerun? Once the checks are green, we can re-check merge readiness.

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

Labels

backend safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PUT Operation on Test Case Removes Test Cases from Bundle Suite Until Reindex

4 participants