-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: add Extensions Manager #68
Draft
pavelnikonorov
wants to merge
26
commits into
main
Choose a base branch
from
feat/extension-manager
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reviewer's Guide by SourceryThis PR introduces an Extensions Manager system that enables dynamic loading and management of extensions in the GA4GH SDK. The implementation includes configuration handling, extension loading/unloading, and TLS verification capabilities. The changes primarily affect the configuration and transport layers, with additional CLI commands for extension management. Sequence diagram for loading extensionssequenceDiagram
participant CLI
participant Configuration
participant ExtensionManager
participant Extension
CLI->>Configuration: from_file()
Configuration->>ExtensionManager: new(installed_extensions, service_config)
ExtensionManager->>Extension: new(config)
Extension->>Extension: load(service_config)
ExtensionManager-->>Configuration: ExtensionManager instance
Configuration-->>CLI: Configuration instance
Class diagram for the new Extensions ManagerclassDiagram
class Configuration {
+String base_path
+Option<String> user_agent
+Option<BasicAuth> basic_auth
+Option<String> oauth_access_token
+Option<String> bearer_access_token
+Option<ApiKey> api_key
+Option<ServiceExtensionsConfiguration> extensions
+ExtensionManager extensions_manager
+from_file(service_type: Option<ServiceType>, service_config_path: &String, extensions_config_path: &String) Result<Self, Box<dyn std::error::Error>>
}
class ExtensionManager {
+Vec<Extension> extensions
+new(installed_extensions: InstalledExtensions, service_config: Option<ServiceExtensionsConfiguration>) Result<Self, Box<dyn Error>>
+get_extensions() &Vec<Extension>
+lookup_extension_methods(unified_method_name: &str) Vec<&ExtensionMethod>
}
class Extension {
+String name
+String version
+Option<String> path
+Option<String> description
+bool enabled
+bool loaded
+Option<Library> library
+HashMap<String, Vec<ExtensionMethod>> methods
+new(config: InstalledExtension) Result<Self, Box<dyn Error>>
+load(service_config: Value)
}
class Transport {
+Configuration config
+reqwest::Client client
+new(config: &Configuration) Result<Self, Box<dyn Error>>
}
Configuration --> ExtensionManager
ExtensionManager --> Extension
Transport --> Configuration
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Xforsa
force-pushed
the
feat/extension-manager
branch
from
November 25, 2024 13:06
d59d88a
to
dc0a46b
Compare
pavelnikonorov
force-pushed
the
feat/extension-manager
branch
2 times, most recently
from
November 25, 2024 13:52
ec638d5
to
2e78004
Compare
pavelnikonorov
force-pushed
the
feat/extension-manager
branch
from
November 25, 2024 18:15
679f726
to
326f7fb
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Add an Extensions Manager to manage extensions within the application, including new CLI commands for extension management. Enhance the Configuration and Transport structs to support extensions and TLS verification. Update dependencies to support these new features.
New Features:
Enhancements:
Build: