Skip to content
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 Workflows to ValidationErrorReporter #3509

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LuisDuarte1
Copy link
Collaborator

In order to have proper validation for Workflows I think we will need a similar setup as DOs: ValidationErrorReporter now has a addWorkflowClass that behaves similarily as addActorClass. (This will need a internal PR in order to work properly).

This will be useful in cases that a user exports a class but doesn't extend from WorkflowEntrypoint (meaning they won't get ctx and env and see weird errors).

Copy link
Member

@a-robinson a-robinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving since this is identical to #3481, but like that one this should wait to merge until the internal change is ready.

In order to have proper validation for Workflows I think we will need a
similar setup as DOs: ValidationErrorReporter now has a
`addWorkflowClass` that behaves similarily as `addActorClass`. (This
will need a internal PR in order to work properly).

This will be useful in cases that a user exports a class but doesn't
extend from `WorkflowEntrypoint` (meaning they won't get `ctx` and
`env` and see weird errors).
…un` handler

We also want to validate if the exported workflows has the `run` handler
in the provided class entrypoint. I use the same approach as the
exported stateless classes: by introspecting the prototypes of the
workflow class.
@LuisDuarte1 LuisDuarte1 force-pushed the lduarte/workflows-validator branch from 30a5ba3 to 169a95f Compare February 21, 2025 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants