Skip to content

Conversation

@IceS2
Copy link
Contributor

@IceS2 IceS2 commented Jan 26, 2026

Describe your changes:

Fixes https://github.com/open-metadata/openmetadata-collate/issues/2783

I worked on ... because ...

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

  • Bug fix:
    • Escapes single quotes in AlertUtil.convertInputListToString() using SQL-standard doubling convention (''')
  • New test file:
    • AlertUtilTest.java with 9 test methods covering edge cases including apostrophes in strings (e.g., "Jake's test bundle")
  • Security improvement:
    • Prevents syntax errors and potential SQL injection vulnerabilities in alert filtering rules and message formatting

This will update automatically on new commits.


@gitar-bot
Copy link

gitar-bot bot commented Jan 27, 2026

🔍 CI failure analysis for 4e4162e: Playwright Shard 2 shows 200/553 test failures (36% failure rate) due to UI timeout issues in Glossary operations. All failures are unrelated to the PR's backend alert filter escaping changes.

Issue

Playwright CI shard 2 failed with 200 test failures out of 553 tests (36% failure rate), primarily in Glossary UI operations.

Root Cause

Infrastructure Performance Degradation affecting Glossary UI test execution:

200 failed tests:
- Glossary domain/owner/reviewer operations: page.click timeouts (60s)
- Glossary term/tag operations: locator.click timeouts (60-180s)
- Bulk edit operations: expect(locator).toContainText failures
- Column operations: page stability and filter loading timeouts

Why unrelated to PR:

  • PR changes: Backend AlertUtil.java SQL escaping (''')
  • Failures: Frontend Glossary/Bulk Edit UI timeout issues
  • No code path overlap between alert filtering and glossary UI
  • Previous run (shard 4): 98.3% success rate on same test suite

Details

Test Results:

  • ❌ 200 failed (timeout/visibility issues)
  • ✅ 348 passed (63% success)
  • ⚠️ 5 flaky

Failure Pattern:

Error: page.click: Test timeout of 60000ms exceeded
Error: locator.click: Test timeout of 180000ms exceeded  
Error: expect(locator).toBeVisible failed - element(s) not found
Error: expect(locator).toContainText failed - element(s) not found

Failed Categories:

  1. Glossary operations (change domain, remove owner/reviewer, add/remove assets, move terms)
  2. Bulk edit entity (database service, glossary, glossary term nested)
  3. Column bulk operations (page stability, URL filter loading)
  4. Data quality (test case import validation)

Infrastructure Evidence:

  • Same tests passed in shard 4 (98.3% success)
  • All failures are timeout-based (not assertion failures)
  • No backend API errors or database constraint violations
  • Resource contention pattern (60-180s timeouts on simple clicks)

Comparison:

  • Shard 4 (run e4fce42): 529 passed, 1 failed (98.3%) ✅
  • Shard 2 (run 4e4162e): 348 passed, 200 failed (63%) ❌
Code Review 👍 Approved with suggestions 0 resolved / 1 findings

Good security fix for SQL single quote escaping with comprehensive tests. The previous finding about potential NPE when list contains null elements remains unaddressed.

💡 Edge Case: Potential NullPointerException if list contains null elements

📄 openmetadata-service/src/main/java/org/openmetadata/service/events/subscription/AlertUtil.java:363

The code handles null lists and empty lists, but if the list contains a null element (e.g., List.of("value1", null)), calling .replace("'", "''") on a null string will throw a NullPointerException.

While this may be an existing issue not introduced by this PR, the escaping logic makes it more visible. Consider adding a null check for individual elements:

String value = valueList.get(i);
if (value != null) {
    result.append(",'").append(value.replace("'", "''")).append("'");
}

Alternatively, add a test case to document expected behavior for null elements in the list. This is a minor edge case since List.of() doesn't allow null values, but other List implementations do.

Rules ✅ All requirements met

Gitar Rules

Summary Enhancement: PR summary exists with bug fix, test file, and security details

2 rules not applicable. Show all rules by commenting gitar display:verbose.

Tip

Comment Gitar fix CI or enable auto-apply: gitar auto-apply:on

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

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

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants