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] CircuitBreaker foundation classes to core library #9006

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

nknize
Copy link
Collaborator

@nknize nknize commented Jul 31, 2023

This PR refactors the following CircuitBreaker foundation classes from the server module to the core library:

  • o.o.common.breaker.CircuitBreaker
  • o.o.common.breaker.CircuitBreakingException
  • o.o.common.breaker.NoopCircuitBreaker
  • o.o.indices.breaker.AllCircuitBreakerStats
  • o.o.indices.breaker.CircuitBreakerService
  • o.o.indices.breaker.CircuitBreakerStats
  • o.o.indices.breaker.NoneCircuitBreakerService

The following base support classes are also refactored from the server to appropriate common or core libraries as a net positive side effect:

  • o.o.common.component.AbstractLifecycleComponent
  • o.o.common.component.Lifecycle
  • o.o.common.component.LifecycleComponent
  • o.o.common.component.LifecycleListener
  • o.o.common.unit.ByteSizeUnit
  • o.o.common.unit.ByteSizeValue

Tests and documentation are updated.

This refactor continues the unwinding of foundation classes from the server monolith to separable libraries in support of JPMS and serverless and cloud native implementations.

relates #5910
relates #8110

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@nknize
Copy link
Collaborator Author

nknize commented Jul 31, 2023

Opened bug fix #9011

@nknize nknize added the blocked Identifies issues that are blocked label Jul 31, 2023
@Yury-Fridlyand
Copy link

More breaking changes for god of breaking changes! ©

@cwperks
Copy link
Member

cwperks commented Aug 1, 2023

Will this PR be backported to 2.x?

@nknize nknize added backport PRs or issues specific to backporting features or enhancments backport 2.x Backport to 2.x branch labels Aug 1, 2023
@nknize
Copy link
Collaborator Author

nknize commented Aug 1, 2023

Opening the backport now.

@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-9006-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 639d28ad46927f8fbb6c940bc7efd4e935528526
# Push it to GitHub
git push --set-upstream origin backport/backport-9006-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-9006-to-2.x.

peternied pushed a commit to opensearch-project/security that referenced this pull request Aug 1, 2023
…or in #9006 (#3082)

This PR reacts to changes introduced in core in this PR:
opensearch-project/OpenSearch#9006

Signed-off-by: Craig Perkins <[email protected]>
opensearch-trigger-bot bot pushed a commit to opensearch-project/security that referenced this pull request Aug 1, 2023
…or in #9006 (#3082)

This PR reacts to changes introduced in core in this PR:
opensearch-project/OpenSearch#9006

Signed-off-by: Craig Perkins <[email protected]>
(cherry picked from commit 5384272)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@peternied
Copy link
Member

This PR changes the namespace on large number of classes. Could we have move these classes to different parts of core into a new library without the namespace change, then at a later date roll out the list of sed /this/that/ all at once?

@nknize
Copy link
Collaborator Author

nknize commented Aug 1, 2023

The divergence with 2.x won't last long. This backport is next in the queue after #9050 merges

@nknize nknize added backport 2.x Backport to 2.x branch and removed backport 2.x Backport to 2.x branch labels Aug 2, 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-9006-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 639d28ad46927f8fbb6c940bc7efd4e935528526
# Push it to GitHub
git push --set-upstream origin backport/backport-9006-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-9006-to-2.x.

nknize added a commit to nknize/OpenSearch that referenced this pull request Aug 2, 2023
…rch-project#9006)

This commit refactors the following CircuitBreaker foundation classes
from the server module to the core library:

* o.o.common.breaker.CircuitBreaker
* o.o.common.breaker.CircuitBreakingException
* o.o.common.breaker.NoopCircuitBreaker
* o.o.indices.breaker.AllCircuitBreakerStats
* o.o.indices.breaker.CircuitBreakerService
* o.o.indices.breaker.CircuitBreakerStats
* o.o.indices.breaker.NoneCircuitBreakerService

The following base support classes are also refactored from the server
to appropriate common or core libraries as a side effect:

* o.o.common.component.AbstractLifecycleComponent
* o.o.common.component.Lifecycle
* o.o.common.component.LifecycleComponent
* o.o.common.component.LifecycleListener
* o.o.common.unit.ByteSizeUnit
* o.o.common.unit.ByteSizeValue

Tests and documentation are updated.

Signed-off-by: Nicholas Walter Knize <[email protected]>
(cherry picked from commit 639d28a)
nknize added a commit that referenced this pull request Aug 2, 2023
…9054)

This commit refactors the following CircuitBreaker foundation classes
from the server module to the core library:

* o.o.common.breaker.CircuitBreaker
* o.o.common.breaker.CircuitBreakingException
* o.o.common.breaker.NoopCircuitBreaker
* o.o.indices.breaker.AllCircuitBreakerStats
* o.o.indices.breaker.CircuitBreakerService
* o.o.indices.breaker.CircuitBreakerStats
* o.o.indices.breaker.NoneCircuitBreakerService

The following base support classes are also refactored from the server
to appropriate common or core libraries as a side effect:

* o.o.common.component.AbstractLifecycleComponent
* o.o.common.component.Lifecycle
* o.o.common.component.LifecycleComponent
* o.o.common.component.LifecycleListener
* o.o.common.unit.ByteSizeUnit
* o.o.common.unit.ByteSizeValue

Tests and documentation are updated.

Signed-off-by: Nicholas Walter Knize <[email protected]>
(cherry picked from commit 639d28a)
cwperks added a commit to cwperks/security that referenced this pull request Aug 2, 2023
…or in #9006 (opensearch-project#3082)

This PR reacts to changes introduced in core in this PR:
opensearch-project/OpenSearch#9006

Signed-off-by: Craig Perkins <[email protected]>
kaushalmahi12 pushed a commit to kaushalmahi12/OpenSearch that referenced this pull request Sep 12, 2023
…rch-project#9006)

This commit refactors the following CircuitBreaker foundation classes
from the server module to the core library:

* o.o.common.breaker.CircuitBreaker
* o.o.common.breaker.CircuitBreakingException
* o.o.common.breaker.NoopCircuitBreaker
* o.o.indices.breaker.AllCircuitBreakerStats
* o.o.indices.breaker.CircuitBreakerService
* o.o.indices.breaker.CircuitBreakerStats
* o.o.indices.breaker.NoneCircuitBreakerService

The following base support classes are also refactored from the server
to appropriate common or core libraries as a side effect:

* o.o.common.component.AbstractLifecycleComponent
* o.o.common.component.Lifecycle
* o.o.common.component.LifecycleComponent
* o.o.common.component.LifecycleListener
* o.o.common.unit.ByteSizeUnit
* o.o.common.unit.ByteSizeValue

Tests and documentation are updated.

Signed-off-by: Nicholas Walter Knize <[email protected]>
Signed-off-by: Kaushal Kumar <[email protected]>
brusic pushed a commit to brusic/OpenSearch that referenced this pull request Sep 25, 2023
…rch-project#9006)

This commit refactors the following CircuitBreaker foundation classes
from the server module to the core library:

* o.o.common.breaker.CircuitBreaker
* o.o.common.breaker.CircuitBreakingException
* o.o.common.breaker.NoopCircuitBreaker
* o.o.indices.breaker.AllCircuitBreakerStats
* o.o.indices.breaker.CircuitBreakerService
* o.o.indices.breaker.CircuitBreakerStats
* o.o.indices.breaker.NoneCircuitBreakerService

The following base support classes are also refactored from the server
to appropriate common or core libraries as a side effect:

* o.o.common.component.AbstractLifecycleComponent
* o.o.common.component.Lifecycle
* o.o.common.component.LifecycleComponent
* o.o.common.component.LifecycleListener
* o.o.common.unit.ByteSizeUnit
* o.o.common.unit.ByteSizeValue

Tests and documentation are updated.

Signed-off-by: Nicholas Walter Knize <[email protected]>
Signed-off-by: Ivan Brusic <[email protected]>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…rch-project#9006)

This commit refactors the following CircuitBreaker foundation classes
from the server module to the core library:

* o.o.common.breaker.CircuitBreaker
* o.o.common.breaker.CircuitBreakingException
* o.o.common.breaker.NoopCircuitBreaker
* o.o.indices.breaker.AllCircuitBreakerStats
* o.o.indices.breaker.CircuitBreakerService
* o.o.indices.breaker.CircuitBreakerStats
* o.o.indices.breaker.NoneCircuitBreakerService

The following base support classes are also refactored from the server
to appropriate common or core libraries as a side effect:

* o.o.common.component.AbstractLifecycleComponent
* o.o.common.component.Lifecycle
* o.o.common.component.LifecycleComponent
* o.o.common.component.LifecycleListener
* o.o.common.unit.ByteSizeUnit
* o.o.common.unit.ByteSizeValue

Tests and documentation are updated.

Signed-off-by: Nicholas Walter Knize <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport PRs or issues specific to backporting features or enhancments backport 2.x Backport to 2.x branch enhancement Enhancement or improvement to existing feature or request skip-changelog v2.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants