Only call adjust_total_time once#347
Merged
Merged
Conversation
c11e424 to
ca25a70
Compare
Previously, a PR was introduced that caused `total_time` to be updated if a job is interrupted, fails, or succeeds. However, this also introduced a bug where if the job is interrupted, adjust_total_time is actually called twice- once in the `ensure` statement of the `iterate_with_enumerator` method and again in the `reenqueue_iteration_job` method, resulting in incorrect `total_time` since the current iteration's runtime would be double-counted
ca25a70 to
5d66cf2
Compare
solackerman
approved these changes
Feb 23, 2023
Mangara
approved these changes
Feb 23, 2023
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, I introduced a PR that caused
total_timeto be updated if a job is interrupted, fails, or succeeds.However, this also introduced a bug where if the job is interrupted, adjust_total_time is actually called twice- once in the
ensurestatement of theiterate_with_enumeratormethod and again in thereenqueue_iteration_jobmethod, resulting in incorrecttotal_timesince the current iteration's runtime would be double-countedI added a new test where a job is interrupted, and verified that
total_timeis correct after the interruption.