-
Notifications
You must be signed in to change notification settings - Fork 116
Version bump to 3.0 #762
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
Version bump to 3.0 #762
Conversation
Signed-off-by: Ashish Agrawal <[email protected]>
Signed-off-by: Ashish Agrawal <[email protected]>
Signed-off-by: Ashish Agrawal <[email protected]>
Signed-off-by: Ashish Agrawal <[email protected]>
The failing security tests are due to Notification not available in the latest 3.0 build. Additionally the BWC failures are known existing failures with OS 3.0 |
userClient = SecureRestClientBuilder(clusterHosts.toTypedArray(), isHttps(), user, user).setSocketTimeout(60000).build() | ||
userClient = SecureRestClientBuilder(clusterHosts.toTypedArray(), isHttps(), user, user) | ||
.setSocketTimeout(60000) | ||
.setConnectionRequestTimeout(180000) |
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.
What is the reason of this request 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.
This is the related PR to prevent DeadlineTimeoutException
/** | ||
* Executes the given [block] function on this resource and then closes it down correctly whether an exception | ||
* is thrown or not. | ||
* | ||
* In case if the resource is being closed due to an exception occurred in [block], and the closing also fails with an exception, | ||
* the latter is added to the [suppressed][java.lang.Throwable.addSuppressed] exceptions of the former. | ||
* | ||
* @param block a function to process this [AutoCloseable] resource. | ||
* @return the result of [block] function invoked on this resource. | ||
*/ | ||
inline fun <T : ThreadContext.StoredContext, R> T.use(block: (T) -> R): R { | ||
var exception: Throwable? = null | ||
try { | ||
return block(this) | ||
} catch (e: Throwable) { | ||
exception = e | ||
throw e | ||
} finally { | ||
closeFinally(exception) | ||
} | ||
} | ||
|
||
/** | ||
* Closes this [AutoCloseable], suppressing possible exception or error thrown by [AutoCloseable.close] function when | ||
* it's being closed due to some other [cause] exception occurred. | ||
* | ||
* The suppressed exception is added to the list of suppressed exceptions of [cause] exception. | ||
*/ | ||
fun ThreadContext.StoredContext.closeFinally(cause: Throwable?) = when (cause) { | ||
null -> close() | ||
else -> try { | ||
close() | ||
} catch (closeException: Throwable) { | ||
cause.addSuppressed(closeException) | ||
} | ||
} |
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.
Why adding these logic here? Is this needed for all the plugins after 3.0?
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.
Yes, we need this after 3.0 since these functions are no longer available. We can do a followup PR to maybe move this to common-utils.
Issue #, if available:
#493
Description of changes:
Update Alerting main branch to version OpenSearch 3.0
CheckList:
[X] Commits are signed per the DCO using --signoff
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.