-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix task run count when a task is configured with retry_delay_seconds
#15424
Conversation
CodSpeed Performance ReportMerging #15424 will not alter performanceComparing Summary
|
tests/events/client/instrumentation/test_task_run_state_change_events.py
Show resolved
Hide resolved
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.
lgtm!
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.
@desertaxle apparently my review submission didn't go through last night - want to make sure you see this comment in case it's important
@@ -364,7 +364,6 @@ def begin_run(self): | |||
new_state = Running() | |||
|
|||
self.task_run.start_time = new_state.timestamp | |||
self.task_run.run_count += 1 |
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 might be over thinking it but isn't this line still relevant? I guess it depends on whether "run count" is how many runs have entered Running
vs. how many runs have exited Running
-- I think it's always been entered Running
which means this should still increment.
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.
Gotcha, I was interpreting it as the number of times the user code has been run. I'll submit a PR to revert back to the previous behavior.
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.
This PR moves the increment of a task run's
run_count
closer to the user code execution to ensure it's correctly counted.Closes #15422