-
Notifications
You must be signed in to change notification settings - Fork 805
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
Integration test for workflow ID based rate limiting task processing #5933
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted filessee 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
history := historyResponse.History | ||
firstEvent := history.Events[0] | ||
lastEvent := history.Events[len(history.Events)-1] | ||
// First 7 event ids --> 0 (Workflow start), 1-3 ( Decision scheduled,started,completed) , 4-6 (Activity scheduled,started,completed) post which the tasks will be rate limited since RPS is 2 |
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.
it's not super clear to me how this test validates workflow id rate limits. how do you ensure these specific events are spread with 2 rps?
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.
These events correspond to two tasks - one decision task and one activity task. The ratelimiter is at the task processing level and after processing 2 tasks, the rate limiter starts to return an 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.
I guess there's no externally visible error being returned, just a delay?
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.
yes there is no externally visible error since the rate limit error is being retried and delays the task processing
s.Logger.Info("Waiting for workflow to complete", tag.WorkflowRunID(we.RunID)) | ||
|
||
s.False(workflowComplete) | ||
_, err = poller.PollAndProcessDecisionTask(false, false) |
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 not super familiar with these engine tests. Does this block here waiting for a reponse (for N seconds or whatever) until there's a task?
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.
It has a fixed 5 attempts and then says no tasks found
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.
host/taskpoller.go
Pull Request Test Coverage Report for Build 018f1a68-5336-41ff-8437-f9fa1d1611d9Details
💛 - Coveralls |
What changed?
New integration test for verifying rate limiting of task processing
Why?
testing
How did you test it?
Ran it locally
Potential risks
No risks with testing
Release notes
Documentation Changes