-
Notifications
You must be signed in to change notification settings - Fork 844
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
Enhanced control over plugins registration #6700
Enhanced control over plugins registration #6700
Conversation
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
…ntinalia/besu into plugin-explicit-load
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
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.
I think you should get rid of the --strict-plugin-registration-enabled
When I'm specifying --plugins
on the CL and one of the plugins is not found I would expect that besu does not start
Signed-off-by: Gabriel-Trintinalia <[email protected]>
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 and it is a nice feature, just some minor suggestions
...ests/test-plugins/src/test/java/org/hyperledger/besu/services/BesuPluginContextImplTest.java
Outdated
Show resolved
Hide resolved
...ests/test-plugins/src/test/java/org/hyperledger/besu/services/BesuPluginContextImplTest.java
Outdated
Show resolved
Hide resolved
besu/src/main/java/org/hyperledger/besu/cli/converter/PluginInfoConverter.java
Outdated
Show resolved
Hide resolved
besu/src/main/java/org/hyperledger/besu/cli/converter/PluginInfoConverter.java
Outdated
Show resolved
Hide resolved
besu/src/main/java/org/hyperledger/besu/cli/converter/PluginInfoConverter.java
Outdated
Show resolved
Hide resolved
besu/src/main/java/org/hyperledger/besu/cli/options/stable/PluginsConfigurationOptions.java
Outdated
Show resolved
Hide resolved
besu/src/main/java/org/hyperledger/besu/services/BesuPluginContextImpl.java
Outdated
Show resolved
Hide resolved
besu/src/main/java/org/hyperledger/besu/services/BesuPluginContextImpl.java
Outdated
Show resolved
Hide resolved
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/plugins/PluginConfiguration.java
Outdated
Show resolved
Hide resolved
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/plugins/PluginInfo.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
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.
couple of comments. Also if the plugin AT failure turns out to be because of the changes in the PR, would be good to make that easier to find (error handling?)
besu/src/main/java/org/hyperledger/besu/services/BesuPluginContextImpl.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Sally MacFarlane <[email protected]> Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
…ntinalia/besu into plugin-explicit-load
@Gabriel-Trintinalia I see you have made more changes and the tests are passing now 💪 - can you explain about the execution strategy? How does it work and do we have to do anything differently? |
@macfarla Nothing different. I changed the implementation to make it easier to understand. The tests failed because I have also simplified the |
CHANGELOG.md
Outdated
@@ -41,6 +41,8 @@ | |||
- Expose bad block events via the BesuEvents plugin API [#6848](https://github.com/hyperledger/besu/pull/6848) | |||
- Add RPC errors metric [#6919](https://github.com/hyperledger/besu/pull/6919/) | |||
- Add `rlp decode` subcommand to decode IBFT/QBFT extraData to validator list [#6895](https://github.com/hyperledger/besu/pull/6895) | |||
- Enhanced control over plugins registration [#6700](https://github.com/hyperledger/besu/pull/6700) |
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.
This doesn't say what kind of control is being added. Maybe something like Allow users to specify which plugins are registered
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]> Signed-off-by: Justin Florentine <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]> Signed-off-by: Justin Florentine <[email protected]>
PR description
This PR introduces improvements to the plugin registration logic in Besu, providing users with granular control over the registration of plugins. Previously, Besu attempted to register all plugins found in the plugins directory indiscriminately. With this update, users can now specify exactly which plugins should be registered, halting the application startup if any specified plugin does not exist. This feature is beneficial for environments where precise plugin configurations are necessary.
fixes #6714
CLI Options and Configuration Profiles
The new plugin registration logic introduces one CLI options:
--plugins
: Specifies a comma-separated list of plugin names to be registered.Changes
Examples
besu --plugins=essential-plugin,security-plugin
In this scenario, if either "essential-plugin" or "security-plugin" is not found in the specified directory, Besu will halt, signalling a configuration issue that needs resolution. Any other plugins will be ignored.
It can also be defined in TOML configuration profiles.