-
Notifications
You must be signed in to change notification settings - Fork 75
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
[Extensions] Increasing AD Extension Request timeout to 20 and fixes exception handling for Delete/Profile #916
[Extensions] Increasing AD Extension Request timeout to 20 and fixes exception handling for Delete/Profile #916
Conversation
…ST_TIMEOUT setting, increased request timeout setting to 20, fixed affected tests Signed-off-by: Joshua Palis <[email protected]>
@@ -57,7 +57,7 @@ private LegacyOpenDistroAnomalyDetectorSettings() {} | |||
public static final Setting<TimeValue> REQUEST_TIMEOUT = Setting | |||
.positiveTimeSetting( | |||
"opendistro.anomaly_detection.request_timeout", | |||
TimeValue.timeValueSeconds(10), | |||
TimeValue.timeValueSeconds(20), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a TODO here to revert this back once we have support for cluster state? That's one of major reason for the timeout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
Signed-off-by: Joshua Palis <[email protected]>
Codecov Report
@@ Coverage Diff @@
## feature/extensions #916 +/- ##
========================================================
+ Coverage 41.88% 43.36% +1.47%
- Complexity 2335 2435 +100
========================================================
Files 301 301
Lines 18026 18065 +39
Branches 1871 1872 +1
========================================================
+ Hits 7550 7833 +283
+ Misses 9918 9651 -267
- Partials 558 581 +23
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…er than type Signed-off-by: Joshua Palis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but with a strong preference to change a few things... please consider that but go ahead and merge if it's urgent.
@@ -163,6 +167,7 @@ public class CheckpointDao { | |||
public CheckpointDao( | |||
SDKRestClient client, | |||
OpenSearchAsyncClient sdkJavaAsyncClient, | |||
Settings settings, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really iffy on adding a new parameter to an already-long list, but if we do so it should probably be at the end of the list, not in the middle. Also we could add an overload that delegates from the previous version to the new version with Settings.EMPTY to avoid having to change every single existing call.
sdkClusterService, | ||
indexNameExpressionResolver, | ||
javaAsyncClient(), | ||
environmentSettings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar comment here; we do have the settings at the end but can we just add an overloaded constructor that assumes empty settings if not passed so we don't have to rewrite existing constructor calls?
…ntDao to assume an empty settings object if not passed directly Signed-off-by: Joshua Palis <[email protected]>
Description
Removes all hardcoded timeout values for SDKClient/OpenSearchAsyncClinet requests with
AnomalyDetectorSettings.REQUEST_TIMEOUT
value, increases timeout from 10 seconds to 20.This PR is an effort to unblock REST integration tests, as all REST IT tests are currently failing due to the following timeout error :
Additionally, fixes exception handling for DeleteDetector/ProfileDetector to check exception message rather than type to determine if the exception is due to a missing index
Issues Resolved
Part of opensearch-project/opensearch-sdk-java#724, fixes timeout issues seen in integration testing PR (#913)
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.