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

[Refactor] Serverless common classes to libraries #8065

Merged
merged 3 commits into from
Jun 16, 2023

Conversation

nknize
Copy link
Collaborator

@nknize nknize commented Jun 14, 2023

This PR refactors common classes that are decoupled from the server implementation from the :server common package to the :libs:opensearch-common and :libs:opensearch-core library so they can be used across serverless and cloud native implementations without depending on the monolithic :server module and all transitive dependencies.

dependency of #8035
relates #5910

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      2 org.opensearch.cluster.service.MasterServiceTests.classMethod
      1 org.opensearch.cluster.service.MasterServiceTests.testThrottlingForMultipleTaskTypes

@kotwanikunal
Copy link
Member

I think this change should have a changelog entry.

@nknize
Copy link
Collaborator Author

nknize commented Jun 14, 2023

I think this change should have a changelog entry.

We haven't decided if these refactors will be backported to 2.x yet so changlog isn't being updated yet. That will be done in bulk if/when we decide which version the refactoring will be released.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@nknize nknize force-pushed the classesToCommonsLib branch from 0a08916 to 6ecc26a Compare June 15, 2023 03:50
@nknize nknize requested a review from andrross June 15, 2023 03:51
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.backpressure.SearchBackpressureIT.testSearchTaskCancellationWithHighCpu
      1 org.opensearch.remotestore.RemoteStoreRefreshListenerIT.testRemoteRefreshRetryOnFailure
      1 org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testStartReplicationListenerSuccess

@codecov
Copy link

codecov bot commented Jun 15, 2023

Codecov Report

Merging #8065 (fe0d40f) into main (606255f) will increase coverage by 0.11%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main    #8065      +/-   ##
============================================
+ Coverage     70.85%   70.97%   +0.11%     
- Complexity    56553    56672     +119     
============================================
  Files          4722     4722              
  Lines        267594   267594              
  Branches      39212    39212              
============================================
+ Hits         189600   189912     +312     
+ Misses        61983    61678     -305     
+ Partials      16011    16004       -7     
Impacted Files Coverage Δ
...n/src/main/java/org/opensearch/common/Classes.java 66.66% <ø> (ø)
.../src/main/java/org/opensearch/common/Explicit.java 63.63% <ø> (ø)
...rch/common/ExponentiallyWeightedMovingAverage.java 100.00% <ø> (ø)
...in/java/org/opensearch/common/LocalTimeOffset.java 87.75% <ø> (ø)
...java/org/opensearch/common/MacAddressProvider.java 40.62% <ø> (ø)
...main/java/org/opensearch/common/NamedRegistry.java 100.00% <ø> (ø)
...rg/opensearch/common/RandomBasedUUIDGenerator.java 100.00% <ø> (ø)
...java/org/opensearch/common/SecureRandomHolder.java 50.00% <ø> (ø)
...src/main/java/org/opensearch/common/StopWatch.java 48.33% <ø> (ø)
.../org/opensearch/common/TimeBasedUUIDGenerator.java 84.37% <ø> (ø)
... and 141 more

... and 474 files with indirect coverage changes

@nknize nknize force-pushed the classesToCommonsLib branch from 6ecc26a to 51ce245 Compare June 15, 2023 16:36
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@nknize nknize force-pushed the classesToCommonsLib branch from 51ce245 to 40ebe87 Compare June 15, 2023 18:49
@nknize
Copy link
Collaborator Author

nknize commented Jun 15, 2023

Unrelated BWC failures... rebased and pushed update.

@nknize nknize requested a review from andrross June 15, 2023 18:49
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

nknize added 3 commits June 15, 2023 17:31
This commit refactors common classes from the server module common
package to the common and core library so they can be used across
serverless and cloud native implementations without depending on the
server module.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
@nknize nknize force-pushed the classesToCommonsLib branch from 40ebe87 to fe0d40f Compare June 15, 2023 22:31
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.cluster.allocation.AwarenessAllocationIT.testThreeZoneOneReplicaWithForceZoneValueAndLoadAwareness

@nknize nknize merged commit 8eea7b9 into opensearch-project:main Jun 16, 2023
kasundra07 pushed a commit to harishbhakuni/OpenSearch that referenced this pull request Jun 16, 2023
…#8065)

This commit refactors common classes from the server module common
package to the common and core library so they can be used across
serverless and cloud native implementations without depending on the
server module.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
imRishN pushed a commit to imRishN/OpenSearch that referenced this pull request Jun 27, 2023
…#8065)

This commit refactors common classes from the server module common
package to the common and core library so they can be used across
serverless and cloud native implementations without depending on the
server module.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Rishab Nahata <rnnahata@amazon.com>
@nknize nknize added v2.9.0 'Issues and PRs related to version v2.9.0' backport 2.x Backport to 2.x branch labels Jul 7, 2023
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

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

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
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-8065-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8eea7b986453271cd227a7b98ee09e70d5e28634
# Push it to GitHub
git push --set-upstream origin backport/backport-8065-to-2.x
# Go back to the original working tree
popd
# 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-8065-to-2.x.

nknize added a commit to nknize/OpenSearch that referenced this pull request Jul 7, 2023
…#8065)

This commit refactors common classes from the server module common
package to the common and core library so they can be used across
serverless and cloud native implementations without depending on the
server module.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
nknize added a commit that referenced this pull request Jul 7, 2023
This commit refactors common classes from the server module common
package to the common and core library so they can be used across
serverless and cloud native implementations without depending on the
server module.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…#8065)

This commit refactors common classes from the server module common
package to the common and core library so they can be used across
serverless and cloud native implementations without depending on the
server module.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch enhancement Enhancement or improvement to existing feature or request skip-changelog v2.9.0 'Issues and PRs related to version v2.9.0'
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants