Skip to content
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

Move from common to core.common #1087

Merged

Conversation

monusingh-1
Copy link
Collaborator

@monusingh-1 monusingh-1 commented Jul 21, 2023

Description

Keep up with core changes
opensearch-project/OpenSearch#8157

Change kotlin.version "1.8.21" as
Class 'org.opensearch.commons.utils.OpenForTesting' was compiled with "1.8.21" version of Kotlin. Ref

Set following to use 1.6 as 1.8.21 is not available yet. Checked that other OpenSearch plugins are also doing the same.
Set kotlinx-coroutines-core to 1.6.0
set kotlinx-coroutines-test to 1.6.0

Added else in when statements as from Kotlin 1.7 version onward exhaustive list is mandatory.
'when' expression must be exhaustive, add necessary 'else' branch

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • 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: monusingh-1 <[email protected]>
@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Merging #1087 (3a4b4c8) into main (324b103) will increase coverage by 0.09%.
The diff coverage is n/a.

❗ Current head 3a4b4c8 differs from pull request most recent head f7db9ef. Consider uploading reports for the commit f7db9ef to get more accurate results

@@             Coverage Diff              @@
##               main    #1087      +/-   ##
============================================
+ Coverage     46.13%   46.22%   +0.09%     
+ Complexity      634      623      -11     
============================================
  Files           141      141              
  Lines          4769     4761       -8     
  Branches        540      521      -19     
============================================
+ Hits           2200     2201       +1     
+ Misses         2306     2298       -8     
+ Partials        263      262       -1     
Impacted Files Coverage Δ
...org/opensearch/replication/ReplicationException.kt 0.00% <ø> (ø)
...in/org/opensearch/replication/ReplicationPlugin.kt 89.26% <ø> (ø)
.../autofollow/AutoFollowClusterManagerNodeRequest.kt 0.00% <ø> (ø)
...low/TransportAutoFollowClusterManagerNodeAction.kt 16.32% <ø> (ø)
...ction/autofollow/UpdateAutoFollowPatternRequest.kt 0.00% <ø> (ø)
...ch/replication/action/changes/GetChangesRequest.kt 100.00% <ø> (ø)
...h/replication/action/changes/GetChangesResponse.kt 100.00% <ø> (ø)
...cation/action/changes/TransportGetChangesAction.kt 65.07% <ø> (+1.58%) ⬆️
...n/index/ReplicateIndexClusterManagerNodeRequest.kt 25.00% <ø> (ø)
.../replication/action/index/ReplicateIndexRequest.kt 28.23% <ø> (ø)
... and 75 more

... and 1 file with indirect coverage changes

@monusingh-1 monusingh-1 marked this pull request as ready for review July 21, 2023 08:33
@@ -82,6 +82,7 @@ class BackwardsCompatibilityIT : MultiClusterRestTestCase() {
ClusterStatus.ONE_THIRD_UPGRADED, ClusterStatus.TWO_THIRD_UPGRADED, ClusterStatus.ROLLING_UPGRADED,
ClusterStatus.FULL_CLUSTER_RESTART -> verifyReplication()
ClusterStatus.COMPLETE_SUITE -> {} // Do nothing as all tests have run already
else -> {throw AssertionError()}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an error message here? Same for other places as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed

Signed-off-by: monusingh-1 <[email protected]>
Signed-off-by: monusingh-1 <[email protected]>
@monusingh-1 monusingh-1 enabled auto-merge (squash) July 21, 2023 10:50
@monusingh-1 monusingh-1 merged commit fa7b9c5 into opensearch-project:main Jul 21, 2023
@monusingh-1 monusingh-1 deleted the keep_up_with_core_8157 branch July 21, 2023 10:51
@opensearch-trigger-bot
Copy link

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-1087-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 fa7b9c539807e2089f6b8eb23435cd5b9c54c4aa
# Push it to GitHub
git push --set-upstream origin backport/backport-1087-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-1087-to-2.x.

monusingh-1 added a commit to monusingh-1/ccr-dev that referenced this pull request Jul 24, 2023
Keep up with core changes
opensearch-project/OpenSearch#8157
move from common to core.common

Change kotlin.version "1.8.21" as
Class 'org.opensearch.commons.utils.OpenForTesting' was compiled with "1.8.21" version of Kotlin. Ref

Set following to use 1.6 as 1.8.21 is not available yet. Checked that other OpenSearch plugins are also doing the same.
Set kotlinx-coroutines-core to 1.6.0
set kotlinx-coroutines-test to 1.6.0

Added else in when statements as from Kotlin 1.7 version onward exhaustive list is mandatory.
'when' expression must be exhaustive, add necessary 'else' branch

---------

Signed-off-by: monusingh-1 <[email protected]>
monusingh-1 added a commit that referenced this pull request Jul 25, 2023
* Open Upgrade gradle version and remove remaining use of ImmutableOpenMap (#814)

Signed-off-by: Monu Singh <[email protected]>

* Move from common to core.common (#1087)

Keep up with core changes
opensearch-project/OpenSearch#8157
move from common to core.common

Change kotlin.version "1.8.21" as
Class 'org.opensearch.commons.utils.OpenForTesting' was compiled with "1.8.21" version of Kotlin. Ref

Set following to use 1.6 as 1.8.21 is not available yet. Checked that other OpenSearch plugins are also doing the same.
Set kotlinx-coroutines-core to 1.6.0
set kotlinx-coroutines-test to 1.6.0

Added else in when statements as from Kotlin 1.7 version onward exhaustive list is mandatory.
'when' expression must be exhaustive, add necessary 'else' branch

---------

Signed-off-by: monusingh-1 <[email protected]>

---------

Signed-off-by: Monu Singh <[email protected]>
Signed-off-by: monusingh-1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants