-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Tracing Instrumentation] Fix for null connection test cases #10410
base: main
Are you sure you want to change the base?
[Tracing Instrumentation] Fix for null connection test cases #10410
Conversation
Signed-off-by: Gagan Juneja <[email protected]>
@reta, Please take a look, Its breaking the Anomaly detection plugin's build. |
Signed-off-by: Gagan Juneja <[email protected]>
@Gaganjuneja -- Do you think it makes sense to fix it this way, or should AD just not pass a null connection? |
Ideally yes AD shouldn't pass the null connection but may be there are some test cases which may want to test if their listener::handleException gets called if the connection is null. I guess there is no harm putting up this additional check. What's your thought on this? |
Gradle Check (Jenkins) Run Completed with:
|
Compatibility status:Checks if related components are compatible with change 17f2952 Incompatible componentsIncompatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/performance-analyzer.git] Skipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/sql.git] |
Totally agreed, In case needed please feel free to merge this PR :) |
Gradle Check (Jenkins) Run Completed with:
|
This PR is stalled because it has been open for 30 days with no activity. |
Hi @Gaganjuneja, Is this being worked upon? Feel free to reach out to maintainers for further reviews. |
This PR is stalled because it has been open for 30 days with no activity. |
Looking into the code around this area, seems like connection is always expected to be non-null (Ref here). So probably adding a check |
The connection should never be null indeed |
+1, This was coming null from test cases. |
@Gaganjuneja what do you want to do with this? If this can't be null maybe the right thing to do is an assert. Otherwise add a test case for the null scenario. |
I am closing this PR. This is not needed as fixed in the AD plugin. |
@Gaganjuneja I think this was a valid case though, being defensive in this code was a good idea. Consider finishing it? |
Sure, will cleanup the code. Thanks @dblock |
❌ Gradle check result for 17f2952: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
This PR is stalled because it has been open for 30 days with no activity. |
@Gaganjuneja Are you planning to continue on this PR and targeting any upcoming release? |
This PR is stalled because it has been open for 30 days with no activity. |
Description
Anomaly-detection has some test cases which passes null connection and those are getting NullPointerException which was earlier handled by the listener. Adding the null connection check in the SpanName builder.
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.