-
Notifications
You must be signed in to change notification settings - Fork 41
Lazy registration for gob encoding #170
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
Conversation
400f98c to
b43c5b6
Compare
kraftp
left a comment
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.
How does deserialization during recovery work if types are only registered at serialization time?
Good point, it doesn't and we need to keep the lazy registration from RunAsStep. During recovery:
And to re-iterate the generalized challenge:
Another challenge btw is being able to test all these edge cases. The gob registry is private, so not exactly easy to wipe and simulate, say, a fresh process recovery scenario. |
|
Given that it'll be very complicated, if not outright impossible, to understand yet-unseen user defined types, I think we should:
|
This PR does two things:
RunAsStep. This solves the case where the workflow or step types is an interface. We cannot identify the underlying concrete type and this will always panic.Example panic for the 2nd case: