-
Notifications
You must be signed in to change notification settings - Fork 833
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
Add methods to check workflow size violations for several other fields #3602
Conversation
d3adf20
to
4e47e2b
Compare
8213f82
to
3ae2811
Compare
3ae2811
to
655e2bd
Compare
service/history/commandChecker.go
Outdated
key.RunID, | ||
key.WorkflowID, |
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 don't mean to have the workflow id and run id in the error. Can we log an error message? Or the caller will do it?
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 do that on line 207, and the logger is tagged with those values on 187
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've removed this from the inline error message
4e47e2b
to
c5b27d0
Compare
655e2bd
to
352e1c9
Compare
352e1c9
to
647ab7a
Compare
647ab7a
to
0819438
Compare
numPending, | ||
errLimit, | ||
dynamicconfig.NumPendingChildExecutionsLimitError, | ||
) | ||
logger.Error(err.Error(), tag.Error(err)) |
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: you can do
logger.Error("some error message",
tag.WorkflowNamespaceID(key.NamespaceID),
tag.WorkflowID(key.WorkflowID),
tag.WorkflowRunID(key.RunID),
tag.Error(err))
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.
Yeah, I did it this way because originally I logged a warning as well. I'll clean up in a follow up
) | ||
logger.Error(err.Error(), tag.Error(err)) | ||
return err | ||
} | ||
|
||
const ( |
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: move const to the top?
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.
Will do in a follow up, keeping in the interest of time
What changed?
I generalized our workflow size limit constraints to 4 fields (child workflows, activities, external signals, and cancel requests).
Why?
I made this change so that we can limit these fields which could potentially cause issues if they're too large.
How did you test it?
I added unit tests.
Potential risks
These new methods aren't called yet.
Is hotfix candidate?
No.