Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Run-time check for update validator signature #723

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

Merged
merged 4 commits into from
Jan 18, 2025
Merged

Conversation

dandavison
Copy link
Contributor

@dandavison dandavison commented Jan 9, 2025

Fixes #689

This PR causes the workflow decorator to raise an exception if the workflow definition contains an (update, validator) pair with inconsistent signatures. The exception will therefore be raised at import time when running a workflow worker. We re-use the same definition of "inconsistent signatures" that we use when comparing the @workflow.run and workflow __init__ methods. We already had type-checking for this, but we lacked a run-time check; an exception would have been raised eventually, but at update validation time.

@dandavison dandavison requested a review from a team as a code owner January 9, 2025 17:25
Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

Great!

@dandavison dandavison force-pushed the 689-upd-val-sig branch 11 times, most recently from 18be6ed to 6273e3b Compare January 18, 2025 01:15
@dandavison dandavison merged commit effc857 into main Jan 18, 2025
14 checks passed
@dandavison dandavison deleted the 689-upd-val-sig branch January 18, 2025 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants