-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add dynamic config to toggle standalone activity functionality #8796
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
d0b1466 to
648abf0
Compare
bergundy
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.
You need to integrate with the frontend's workflow_handler.go too for all of the poll and complete APIs.
chasm/lib/activity/frontend.go
Outdated
| @@ -71,6 +70,10 @@ func NewFrontendHandler( | |||
| // before mutation to preserve the original for retries. | |||
| // 3. Sends the request to the history activity service. | |||
| func (h *frontendHandler) StartActivityExecution(ctx context.Context, req *workflowservice.StartActivityExecutionRequest) (*workflowservice.StartActivityExecutionResponse, error) { | |||
| if !h.config.Enabled(req.GetNamespace()) { | |||
| return nil, serviceerror.NewUnavailable("Standalone activity is disabled.") | |||
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 are very inconsistent on use of punctuation in error messages across the codebase. I tend to omit punctuation for single sentence messages. Not blocking. @dandavison, thoughts?
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.
I'm ok with no period at the end... but any sentence that needs proper punctuation within (i.e. commas), we should use.
@bergundy good call, I've added checks there too. I've not added one for |
| "go.temporal.io/server/common/log" | ||
| "go.temporal.io/server/common/metrics" | ||
| "go.temporal.io/server/common/namespace" | ||
| "go.temporal.io/server/common/searchattribute" | ||
| "google.golang.org/protobuf/types/known/durationpb" | ||
| ) | ||
|
|
||
| const StandaloneActivityDisabledError = "Standalone activity is disabled" |
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.
nit: I would just repeat the string instead of adding a layer of indirection. You're not getting much from this constant.
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.
I think we should just keep the message in one place to keep it consistent.
6ca76f6 to
7368955
Compare
What changed?
Add dynamic config to toggle standalone activity functionality. Refactored frontend dynamic config into activity config. Removed standalone activity dc prefix
chasmWhy?
We need the ability to toggle standalone activity functionality as we go to prod. We also agreed to remove the
chasmprefix from any chasm originated dynamic config keysHow did you test it?