-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix Alert Util Single Quote Escape #25528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🔍 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.IssuePlaywright CI shard 2 failed with 200 test failures out of 553 tests (36% failure rate), primarily in Glossary UI operations. Root CauseInfrastructure Performance Degradation affecting Glossary UI test execution: Why unrelated to PR:
DetailsTest Results:
Failure Pattern: Failed Categories:
Infrastructure Evidence:
Comparison: Code Review 👍 Approved with suggestions 0 resolved / 1 findingsGood 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., 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 Rules ✅ All requirements metGitar Rules
2 rules not applicable. Show all rules by commenting Tip Comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
Describe your changes:
Fixes https://github.com/open-metadata/openmetadata-collate/issues/2783
I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>Summary by Gitar
AlertUtil.convertInputListToString()using SQL-standard doubling convention ('→'')AlertUtilTest.javawith 9 test methods covering edge cases including apostrophes in strings (e.g., "Jake's test bundle")This will update automatically on new commits.