-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fixes #24833: Validate destination configuration in testDestination and event subscriptions #25120
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
9410948 to
52b5970
Compare
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
...n/java/org/openmetadata/service/resources/events/subscription/EventSubscriptionResource.java
Show resolved
Hide resolved
...n/java/org/openmetadata/service/resources/events/subscription/EventSubscriptionResource.java
Show resolved
Hide resolved
52b5970 to
b5900fa
Compare
|
7e8c227 to
a147db5
Compare
🔍 CI failure analysis for 0dba9cd: Maven-sonarcloud-ci job failed with 3 test failures: 2 are directly related to the PR's validation and exception handling improvements (IngestionPipelineLogStreamingResourceTest expecting 415 status code, EventSubscriptionResourceTest timeout due to new validation), and 1 unrelated glossary CSV import/export issue.IssueMaven SonarCloud CI job failed with 3 test failures Root CauseTwo failures directly related to PR changes, one unrelated: 1. IngestionPipelineLogStreamingResourceTest (RELATED ✓)Test: Error: Cause: This is the same failure appearing in 4 CI jobs now (integration tests + maven builds). The PR's The Fix: Update test assertion to accept 415 as valid: true(response.getStatus() == Response.Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode())2. EventSubscriptionResourceTest (RELATED ✓)Test: Error: Cause: The PR added The Fix: Review the test to ensure it provides valid configuration data (non-empty URLs, proper formats) that passes the new validation requirements in 3. GlossaryResourceTest (UNRELATED ✗)Test: Error: Analysis: This is a glossary CSV import/export test failure with no connection to event subscription validation or exception handling. The PR changes event subscription endpoints and exception mapping - completely separate from glossary import/export functionality. DetailsJobs Affected by This PR's Changes:
Total CI Landscape:
Impact Assessment:
Both can be resolved by updating the tests to align with the new, more correct behavior. Code Review 👍 Approved with suggestionsGood validation addition that addresses the original issue #24833, but two previous findings remain unresolved: missing switch default case and silently swallowed test message errors.
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | This comment will update automatically (Docs)



Fixes #24833
I worked on adding validation logic to the Event Subscription endpoints to ensure destination configurations are correct before processing. Previously, the
testDestinationAPI would return a200 OKsuccess status even if the configuration (e.g., email recipients) was empty, leading to silent failures.Changes:
validateDestinationConfiginEventSubscriptionResourceto enforce checks for:sendTestMessageAlert,create, andcreateOrUpdateto call this validation.CatalogGenericExceptionMapperto correctly propagateWebApplicationException(ensuring 400 Bad Request is returned instead of 500).EventSubscriptionResourceTestto cover scenarios like null configs, empty receiver lists, and invalid URL/email formats.Type of change:
Checklist:
Fixes <issue-number>: <short explanation>