-
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 a96cc1f: Eight CI failures analyzed: Maven tests (1 failure + 3 errors), Python 3.10 & 3.11 (2 failures each), Playwright shards 2,3,4,5,6 (64 failures, 45 flaky passed). All unrelated to this PR's backend Java alert utility changes.Complete CI Failures Summary - All Eight JobsOverall StatisticsMaven Tests (NEW):
Python Tests (2 versions):
Playwright Tests (5 shards):
Grand Total: 72 failures (1+3 Maven + 4 Python + 64 Playwright) NEW Failure: maven-postgresql-ciTest ResultsSpecific Failures1. Test Failure: 2. Test Error (403 Forbidden): 3. AWS Credentials Errors (3 tests): Root CauseUNRELATED to this PR. This PR only modifies:
The failures are in:
None of these components use or depend on alert utility string escaping. AnalysisAppsResourceTest failure:
GlossaryTermResourceTest error:
AwsCredentialsUtilTest errors:
Summary - All CI FailuresAll 72 failures (1+3 Maven + 4 Python + 64 Playwright) are UNRELATED to this PR. This PR modifies:
Failures span completely different components:
None of these have any code path connection to alert utility string escaping. 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 from null list 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
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.