Skip to content

Added Missing operators(Contains, Not Contains) for description#27913

Merged
Rohit0301 merged 10 commits into
mainfrom
fix-3224
May 6, 2026
Merged

Added Missing operators(Contains, Not Contains) for description#27913
Rohit0301 merged 10 commits into
mainfrom
fix-3224

Conversation

@Rohit0301
Copy link
Copy Markdown
Contributor

@Rohit0301 Rohit0301 commented May 5, 2026

Describe your changes:

Added description field — was completely missing from the query builder. Now registered as a text type field with match_phrase, not_match_phrase, is_null, is_not_null operators.

Fixed descriptionStatus label — it was previously using Description (wrong key). Changed to Discription Status

collate PR - https://github.com/open-metadata/openmetadata-collate/pull/3971

Fixes 3224

I worked on ... because ...

Screenshot 2026-05-05 at 4 38 36 PM
Screen.Recording.2026-05-05.at.6.47.27.PM.mov
Screen.Recording.2026-05-05.at.7.02.27.PM.mov

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

Summary by Gitar

  • Feature enhancement:
    • Registered description as a new filterable text field in AdvancedSearchClassBase with match_phrase, not_match_phrase, is_null, and is_not_null operators.
  • Internationalization:
    • Added description-status translation keys across all supported locale files.
  • Testing improvements:
    • Added comprehensive E2E tests in AdvancedSearch.spec.ts for the new description filter operators.
    • Added PersonaFlow.spec.ts to test description filtering within the curated assets widget and implemented test.afterAll cleanup logic.
    • Updated AdvancedSearchClassBase.test.ts to include description in the entity fields test suite.

This will update automatically on new commits.

@Rohit0301 Rohit0301 self-assigned this May 5, 2026
@Rohit0301 Rohit0301 requested a review from a team as a code owner May 5, 2026 13:21
@Rohit0301 Rohit0301 added safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch labels May 5, 2026
Comment thread openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaFlow.spec.ts Outdated
Comment thread openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaFlow.spec.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 62%
62.45% (63029/100920) 42.82% (34014/79433) 45.79% (10053/21953)

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented May 6, 2026

Code Review ✅ Approved 3 resolved / 3 findings

Registers the description field in the query builder and corrects the Description Status label, addressing the reported naming inconsistencies and search functionality gaps. Test suite cleanup and UI test references have also been updated.

✅ 3 resolved
Bug: WORD_TO_SEARCH trailing period causes double-period in description

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaFlow.spec.ts:763-764
In PersonaFlow.spec.ts line 763, WORD_TO_SEARCH ends with a period: ...oscilloscope-${uuid()}.. When interpolated into CURATED_DESCRIPTION_TEXT at line 764, a second period is appended: ...${WORD_TO_SEARCH}. It is..., producing ..oscilloscope-abc123.. It is... (double period).

This may cause the match_phrase (contains) search to fail intermittently because Elasticsearch tokenizes around punctuation. The search phrase includes a trailing . that may not align with the double-period tokenization in the indexed text, leading to flaky tests.

Additionally, the phrase itself (table with a unique description oscilloscope-...) partially duplicates surrounding template text, making the resulting description semantically odd, though that's cosmetic.

Quality: WORD_TO_SEARCH duplicates template words in AdvancedSearch test

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/AdvancedSearch.spec.ts:648-649
At line 648, WORD_TO_SEARCH is set to the word oscilloscope-${uuid()} to test. When interpolated into DESCRIPTION_TEXT (line 649) which already contains containing the word ... to test the advanced search, the result is:

This is a table description containing the word the word oscilloscope-xyz to test to test the advanced search functionality.

The repeated phrases ('the word the word', 'to test to test') are harmless for search correctness but make the test data confusing and harder to debug when failures occur. A cleaner phrase that doesn't repeat template words would improve readability.

Quality: Missing test cleanup (afterAll) for created entities

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/AdvancedSearch.spec.ts:641-655 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaFlow.spec.ts:761-775
Both new test describe blocks create entities in beforeAll but never clean them up:

  1. AdvancedSearch.spec.tsdescFilterTable is created but never deleted.
  2. PersonaFlow.spec.tscuratedAdminUser, curatedPersona, and curatedTable are created but never deleted.

All other describe blocks in PersonaFlow.spec.ts follow the pattern of having a matching test.afterAll that deletes created resources. Without cleanup, repeated test runs (especially locally) will accumulate orphaned entities.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

@Rohit0301 Rohit0301 merged commit 88b932a into main May 6, 2026
47 checks passed
@Rohit0301 Rohit0301 deleted the fix-3224 branch May 6, 2026 18:35
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Changes have been cherry-picked to the 1.13 branch.

github-actions Bot pushed a commit that referenced this pull request May 6, 2026
* Added Missing operators(Contains, Not Contains) for description

* addressed PR comment and fixed unit test

* addressed gitar comment

* fix playwright

* lint fix

* removed dead code

(cherry picked from commit 88b932a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants