Open
Conversation
Fix setup
…ense#1776) The use of Instant.ofEpochMilli(Long.MIN_VALUE) as the arbitrary first commit date now fails shallow cloning for testSinceBeginningDateRangeWithShallowCloning system test. In addition, using this arbitrary date in convertToGitDateRangeArgs when converting timezone results in an overflow causing sinceDate to be greater than untilDate. Thus, no commit results are retrieved, leading to failing system tests. Also, the arbitrary first commit date is in UTC. However, in the convertToGitDateRangeArgs method, the zoneId used for the conversion is from the config, which may be different. This leads to an erroneous timezone conversion. Finally, using --since d1 with --period results in an unintended date range because the --period and the arbitrary commit date from --since d1 are used to calculate the until date as the actual earliest commit date is not immediately available. Let's change Instant.ofEpochMilli() to use 0 so that the arbitrary date is 1970-01-01 and the overflow of the sinceDate can be avoided. At the same time, let's convert the arbitrary date to the correct timezone within the ArgsParser class and add a component test for parsing --since d1 to check that the correct timezone is used for each RepoConfiguration before cloning any repos. Finally, let's raise a warning when --since d1 is being used with --period.
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.
Fixes #xxxx
Proposed commit message
Other information