-
Notifications
You must be signed in to change notification settings - Fork 44.6k
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(platform): Support multiple credentials inputs on blocks #8932
base: dev
Are you sure you want to change the base?
feat(platform): Support multiple credentials inputs on blocks #8932
Conversation
… `credentials` inputs - Add `credentials_provider` and `credentials_types` to field schema from `CredentialsMetaInput` instead of `CredentialsField` - Remove `provider` and `supported_credential_types` params from `CredentialsField` and all its usages - Add `credentials` schema validation logic to `CredentialsMetaInput`, which is called from `BlockSchema.__pydantic_init_subclass__`
- Add missing providers to `ProviderName` - Replace string literals for provider names with `ProviderName.{PROVIDER}` on blocks and in `CredentialsMetaInput`, `BlockWebhookConfig`, `*OAuthHandler` - docs: Update instructions for blocks with authentication
✅ Deploy Preview for auto-gpt-docs-dev canceled.
|
✅ Deploy Preview for auto-gpt-docs canceled.
|
…support-multiple-provider-credentials-inputs
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
…support-multiple-provider-credentials-inputs
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly. |
@aarushik93 could you branch from this PR and see if it works for you? I currently have no blocks to test it on. |
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
…redentials-inputs
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly. |
@@ -256,7 +257,8 @@ export function CustomNode({ | |||
side="left" | |||
/> | |||
) : ( | |||
propKey != "credentials" && ( | |||
propKey != "credentials" && |
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.
nit
propKey != "credentials" && | |
propKey !== "credentials" && |
extra_exec_kwargs[field_name] = block.test_credentials | ||
elif credentials_input_fields and block.test_credentials: | ||
if not isinstance(block.test_credentials, dict): | ||
log.warning(f"Block {block.name} has no usable test credentials") |
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.
Why not raise
? It's a test, shouldn't it fail?
f"Node #{node.id} referenced non-existent " | ||
f"credentials #{creds_meta['id']}" | ||
if ( | ||
# Webhook-triggered blocks are only allowed to have 1 credentials input |
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.
Why? Won't we end up like now where we need multiple?
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.
Other than @kcze coments looks good
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
CredentialsField
usage + useProviderName
globally #8725Changes 🏗️
feat(platform): Support multiple credentials inputs on blocks
Update docs with info on multi credentials support
Checklist 📋
For code changes: