-
Notifications
You must be signed in to change notification settings - Fork 38
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
Extension mechanism #268
Extension mechanism #268
Conversation
651f663
to
d3c6a9e
Compare
client.configuration._disabled_client_side_validations = ["minLength"] | ||
self._group_api = GroupApi(client) | ||
|
||
async def insert_group(self, create_group: CreateGroup) -> ReadGroup: |
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 was going to say we should name it create group to be consistent with other services but then in the Java BDK it is named like that, I missed it during the Java BDK review :(
:param user_id: The ID of the user to be added into the group | ||
:return: the updated group | ||
""" | ||
member = Member(member_id=user_id, member_tenant=extract_tenant_id(user_id)) |
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.
Mmm I missed that in the Java BDK we were doing that (guessing the tenant id from the user id) (which the profile manager API should do for us already...)
So I should probably change the WDK implem too (although we only do it partially for this method and not for the creation)
@symphony-mariacristina should we document how to leverage the retry mechanism in extensions? I would say so because it differs much from the Java BDK |
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.
LGTM
Implements #251 |
Description
The Extension API is available through the module
symphony.bdk.core.extension
. Extensions are registered programmatically via theExtensionService
. A Service Provider extension is a specific type of extension loaded on demand when calling theExtensionService#service(MyExtensionType)
method.To make your extension Service Provider, your extension definition must implement the method
get_service(self)
.BDK Aware Extensions
The BDK Extension Model allows extensions to access to some core objects such as the configuration or the api clients.
Developers that wish to use these objects are free to implement a set of abstract base classes all suffixed with the
Aware
keyword.List of Aware classes:
BdkConfigAware
- allows extensions to read theBdkConfig
:BdkApiClientFactoryAware
- can be used by extensions that need to use theApiClientFactory
BdkAuthenticationAware
- can be used by extensions that need to rely on the service account authentication session (AuthSession
)Symphony Groups Extension
As part of this PR we also leveraged this new Extension Mechanism to implement a new custom extension to support the Symphony Groups APIs.