-
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
[Feature/extensions] Add getSettings support for AD #4519
[Feature/extensions] Add getSettings support for AD #4519
Conversation
Gradle Check (Jenkins) Run Completed with:
|
c4ea80c
to
86769fc
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
This is ready for review. Notes:
|
server/src/test/java/org/opensearch/extensions/ExtensionResponseTests.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/extensions/settings/SettingsRequestHandler.java
Outdated
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
server/src/main/java/org/opensearch/common/settings/WriteableSetting.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/common/settings/WriteableSetting.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/common/settings/WriteableSetting.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/common/settings/WriteableSetting.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/common/settings/WriteableSetting.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/extensions/ExtensionsOrchestrator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/extensions/settings/RegisterSettingsRequest.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/extensions/settings/SettingsRequestHandler.java
Outdated
Show resolved
Hide resolved
Did initial pass. @dbwiddis and @saratvemulapalli do you think we should commit |
Signed-off-by: Daniel Widdis <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
I put in the minimum to handle the settings for AD, but there will be more work required in that class for the more general cases. See #148. |
server/src/test/java/org/opensearch/common/settings/WriteableSettingTests.java
Show resolved
Hide resolved
assertTrue(props.contains(Property.Dynamic)); | ||
} | ||
} | ||
} |
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.
Great to see tests for all the types
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.
Small Nit. Rest LGTM!
Signed-off-by: Daniel Widdis <[email protected]>
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.
Thanks @dbwiddis , I did a pass most of the changes look good to me.
Companion PR: opensearch-project/opensearch-sdk-java#147
NOTE: Merging this PR will break
main
on SDK project until the companion PR is merged. Merge the SDK PR shortly after merging this one.Description
Registers custom Settings from an extension as dynamic settings in the Settings Module.
The pattern is similar to registering REST actions, with the complication that a
Setting<T>
needs to be passed over transport, and due to type erasure,<T>
cannot be determined at runtime. AWriteableSetting
class determines this type by examining the default value and implements it for all types expected in the AD extension.There will be a need to handle additional types in the future, such as List, and to track parsers and validators. This is tracked in #148
Issues Resolved
Fixes #79
Check List
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.