Skip to content

Commit 8ae8bd8

Browse files
authored
Resource Actions (#564)
* Initial commit of action resources. Add action task to proto Checkin Fix function prototype after rebase Refactor action registration Move resource id to the schema if it is required. Add helpers for working with args struct Drop bulk invoke and don't require the resource type during action registration Add helper for working with resource id lists in the schema Prevent resource actions with the same type from being added to a single resource type Don't include resource action schemas as part of the capabilities output. Add return types for a partially populated resources from actions. Also add more action arg getter and setters with tests. Lint fixes More lint fixes Unify baton actions and resource actions Don't use the optional keyword in the baton action schema proto for resource_type_id Drop more optional proto fields. Fixes after dropping the optional proto fields. Make protogen after rebase Add HasActions method to ActionManager and update action management interfaces - Introduced HasActions method to check for registered actions in ActionManager. - Updated ActionManager and GlobalActionProvider interfaces for better action management. - Refactored action registration logic to support legacy action managers. - Enhanced tests to cover new functionality and ensure backward compatibility. Refactor action registration methods for consistency and deprecation - Renamed RegisterAction to Register in ActionRegistry and ActionManager for improved clarity. - Updated all references in tests and connector builder to use the new Register method. - Marked RegisterAction as deprecated to guide future development towards the new method. - Ensured backward compatibility by maintaining the old method signatures where necessary. fix lint line-length violations Fix broken test Refactor InvokeAction method signature in ActionManager for improved readability - Reformatted the InvokeAction method signature to enhance clarity and maintainability. - Ensured consistent formatting across the ActionManager interface. Refactor resource conversion functions to handle optional fields - Updated resourceToBasicResource and basicResourceToResource functions to conditionally set ResourceId and ParentResourceId based on their presence. - Improved code readability and maintainability by reducing redundancy in struct initialization. * Refactor resouce related config fields. * Drop encryption/secret support for actions * Drop trait specific action types * Drop unused proto import * Add nil checks for resource and resource ID in return field creation functions * Enhance error handling in GetActionSchema and GetActionStatus methods by including the original error in the returned error messages. * Enhance validation in NewConnectorRunner by adding nil check for listActionSchemasConfig in on-demand mode. * Refactor resource ID handling in NewResourceIdListReturnField to use a builder pattern for improved clarity and maintainability. * Move register resource action log to DEBUG * Add ResourceActionProvider interface and remove deprecated resource_actions.go file
1 parent 55585f7 commit 8ae8bd8

32 files changed

+6040
-351
lines changed

pb/c1/config/v1/config.pb.go

Lines changed: 809 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pb/c1/config/v1/config.pb.validate.go

Lines changed: 1058 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pb/c1/config/v1/config_protoopaque.pb.go

Lines changed: 811 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pb/c1/config/v1/rules.pb.go

Lines changed: 130 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pb/c1/config/v1/rules.pb.validate.go

Lines changed: 202 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)