-
Notifications
You must be signed in to change notification settings - Fork 127
Special behaviour for temporal prefixes #1644
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
base: main
Are you sure you want to change the base?
Conversation
In this change, users are prevented from registering signals/updates/queries with reserved names from the handler. Users can still Alternatively, we can do the blocking in |
8170bc5
to
5f5103a
Compare
this is blocked on #1640 so we can handle the same prefix cases for updates as well |
… test needs to be fixed, need to add behaviour reserving prefixes from workflows, and waiting for default update to be merged to add behaviour preventing default update handler to be called with reserved names
5f5103a
to
8237158
Compare
1a7b249
to
55c641f
Compare
9eb4558
to
452602f
Compare
452602f
to
73823fa
Compare
@@ -707,6 +719,11 @@ export class Activator implements ActivationHandler { | |||
throw new TypeError('Missing activation update protocolInstanceId'); | |||
} | |||
|
|||
// If update has __temporal_ prefix but no handler exists, throw error |
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.
We'd need to skip interceptors on built-in updates, same as we did above for queries. We don't have any built-in update anyway, so no need to actually implement this just now, but we should at least leave a trace so we don't forget about this if ever we add one. Just add a comment here. And actually, you could even just remove the && !this.updateHandlers.get(name)
part of the condition, as we know it will never evaluate to true unless code around is modified.
@@ -859,6 +876,13 @@ export class Activator implements ActivationHandler { | |||
throw new TypeError('Missing activation signalName'); | |||
} | |||
|
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.
Same comment as update.
What was changed
Special behavior handling reserved temporal prefixes. Prevent users from:
Note: this change does not cover handling reserved temporal prefixes for workflows, as it involves non-trivial changes to the workflow bundling.
Closes [Feature Request] Special behavior for Temporal built-in prefixes #1599
How was this tested:
unit/integration tests
Any docs updates needed?
I'm not sure.