Skip to content

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

Merged
merged 4 commits into from
Jan 30, 2023
Merged

Version bump to 3.0 #762

merged 4 commits into from
Jan 30, 2023

Conversation

lezzago
Copy link
Member

@lezzago lezzago commented Jan 19, 2023

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.

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]>
@lezzago lezzago requested a review from a team January 19, 2023 00:09
@lezzago
Copy link
Member Author

lezzago commented Jan 19, 2023

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)
Copy link
Member

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?

Copy link
Member Author

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

Comment on lines +116 to +151
/**
* 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)
}
}
Copy link
Member

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?

Copy link
Member Author

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.

@lezzago lezzago merged commit 270303d into opensearch-project:main Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants