-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Cleanup interfaces around ExtensionManager #7374
Cleanup interfaces around ExtensionManager #7374
Conversation
ExtensionsManager has a whole lot of functionality that shouldn't be exposed to external classes, marked much of this package protected for a cleaner interface. Then updated the Noop version to override all public functions to remove extranious feature flag checks. Note; I didn't go so far to remove all getters/setters that were unused but that could be a good follow up in the future. Signed-off-by: Peter Nied <petern@amazon.com>
Hi @dbwiddis @varuntumbe @owaiskazi19 @ryanbogan @mloufra @andrross - you've made changes to the ExtensionManager in the past and your review would be valuable as you have context around the construction/design choices. |
server/src/test/java/org/opensearch/snapshots/SnapshotResiliencyTests.java
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Peter Nied <petern@amazon.com>
Signed-off-by: Peter Nied <petern@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Peter Nied <petern@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
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.
Looks good to me! I didn't know that Noop implementations could simplify the code so much.
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.
Thanks @peternied for letting us know a better alternative to handle feature flags.
Signed-off-by: Peter Nied <petern@amazon.com>
It makes me so happy clean merges don't dismiss approvals on PRs, not sure when this was added by GitHub but its great! |
Gradle Check (Jenkins) Run Completed with:
|
New flaky test
|
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #7374 +/- ##
============================================
+ Coverage 70.53% 70.71% +0.17%
- Complexity 59551 59605 +54
============================================
Files 4876 4876
Lines 285817 285740 -77
Branches 41162 41156 -6
============================================
+ Hits 201609 202067 +458
+ Misses 67632 67078 -554
- Partials 16576 16595 +19
|
Signed-off-by: Peter Nied <petern@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
FYI @mch2 I fix the merge conflict on the CHANGELOG.md and then saw that the CI checks were still all passing - assumed this was OK and hit merge. After the change was merged I saw that the CI checks on the new commit hadn't started up yet. I assume because this PR was merged it generated some strange state in the Jenkins workflow. IMO I don't think anything will go awry because of this change but just in case this would be the place to start looking if something goes wrong. |
@peternied This should be backported to 2.x. Can you add the backport label? |
@saratvemulapalli @owaiskazi19 @ryanbogan Can you add a backport 2.x label to this PR? |
The backport to
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-7374-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 3687d0106230186afec58dd5e7b0a58c80f6f7d1
# Push it to GitHub
git push --set-upstream origin backport/backport-7374-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 |
I'll manually backport |
* Cleanup interfaces around ExtensionManager ExtensionsManager has a whole lot of functionality that shouldn't be exposed to external classes, marked much of this package protected for a cleaner interface. Then updated the Noop version to override all public functions to remove extranious feature flag checks. Note; I didn't go so far to remove all getters/setters that were unused but that could be a good follow up in the future. Signed-off-by: Peter Nied <petern@amazon.com> (cherry picked from commit 3687d01)
* Cleanup interfaces around ExtensionManager ExtensionsManager has a whole lot of functionality that shouldn't be exposed to external classes, marked much of this package protected for a cleaner interface. Then updated the Noop version to override all public functions to remove extranious feature flag checks. Note; I didn't go so far to remove all getters/setters that were unused but that could be a good follow up in the future. Signed-off-by: Peter Nied <petern@amazon.com> (cherry picked from commit 3687d01)
* Cleanup interfaces around ExtensionManager ExtensionsManager has a whole lot of functionality that shouldn't be exposed to external classes, marked much of this package protected for a cleaner interface. Then updated the Noop version to override all public functions to remove extranious feature flag checks. Note; I didn't go so far to remove all getters/setters that were unused but that could be a good follow up in the future. Signed-off-by: Peter Nied <petern@amazon.com> (cherry picked from commit 3687d01)
* Cleanup interfaces around ExtensionManager ExtensionsManager has a whole lot of functionality that shouldn't be exposed to external classes, marked much of this package protected for a cleaner interface. Then updated the Noop version to override all public functions to remove extranious feature flag checks. Note; I didn't go so far to remove all getters/setters that were unused but that could be a good follow up in the future. Signed-off-by: Peter Nied <petern@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Description
Cleanup interfaces around ExtensionManager
ExtensionsManager has a whole lot of functionality that shouldn't be
exposed to external classes, marked much of this package protected for a
cleaner interface. Then updated the Noop version to override all public
functions to remove extranious feature flag checks.
Note; I didn't go so far to remove all getters/setters that were unused
but that could be a good follow up in the future.
Check List
New functionality includes testing.All tests passNew functionality has been documented.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.