Hey,
Prior GX versions, 0.18.21 and earlier we were able to create custom checkpoint actions Action | Great Expectations as long as it conformed to the ValidationAction API it worked.
We had a custom action plugin working and we are now trying to port it to GX 1.x however it looks like ValidationActions now use pydantic to validate Checkpoint Actions via “CheckpointAction” which does not allow us to extend it with a custom ValidationAction.
CheckpointAction = Annotated[
Union[
EmailAction,
MicrosoftTeamsNotificationAction,
OpsgenieAlertAction,
PagerdutyAlertAction,
SlackNotificationAction,
SNSNotificationAction,
UpdateDataDocsAction,
],
Field(discriminator="type"),
]
So when we try to call our plugin it throws a validation error, rightly so,
pydantic.v1.error_wrappers.ValidationError: 1 validation error for Checkpoint
actions -> 0
No match for discriminator 'type' and value 'my_custom_action' (allowed values: 'email', 'microsoft', 'opsgenie', 'pagerduty', 'slack', 'sns', 'update_data_docs') (type=value_error.discriminated_union.invalid_discriminator; discriminator_key=type; discriminator_value=my_custom_action; allowed_values='email', 'microsoft', 'opsgenie', 'pagerduty', 'slack', 'sns', 'update_data_docs')
Is there a custom action implementation guide or suggestions? As we tried monkey patching and subclassing but seems like “CheckpointAction” is used in many places.
New documentation suggests no way to customise actions now.