Fix commit-graph expiration#1647
Conversation
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
18b1f80 to
af74760
Compare
|
/azp run PR - Windows - Build and Unit Test |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run PR - Windows - Functional Tests |
|
/azp run PR - Windows - Functional Tests (Sparse Mode) |
|
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run PR - Windows - Extra |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| { | ||
| if (expireTimeDateString == null) | ||
| { | ||
| expireTimeDateString = DateTime.Now.Subtract(TimeSpan.FromDays(1)).ToShortDateString(); |
There was a problem hiding this comment.
Before we chose to expire after 1 hour and now we are after 1 day. I know that this was never working before and I don't think that will be an issue because I don't think it should be creating that many commit graphs but wanted to get your thoughts. Thanks!
There was a problem hiding this comment.
The important thing is that it doesn't expire things right away, and there are some concerns about timezones and things when it parses the expiry date. So either we get really specific about the time (including timezone offset) or we can just go "at least 24 hours ago, give or take timezone shifts of +/-12 hours".
Since we've been running with the lack of expirations for this long, having a slightly longer expire window will not be a problem.
Includes the following PRs: * #1642: Update Git to v2.26.0 * #1647: Fix commit-graph expiration * #1652: RepoRegistry: ignore non-existent repos * #1653: Update Git to include v2.26.1 The update to include Git v2.26.0 comes with a new default backend for `git rebase`. By switching from the `apply` backend to the `merge` backend, some rebase situations that would previously fail will now succeed automatically. This comes with a slight performance drawback, but it is the direction that the Git community has decided to go. Please see [the Git documentation](https://git-scm.com/docs/git-rebase#_behavioral_differences) for more details.
Wow, this was really not working as expected.
See microsoft/git#255 for how broken the
--expire-timeargument was.Fix this by using the fixed argument and passing a datetime instead of an offset by seconds. This will provide a longer window for old commit-graph files, but apparently we've been leaving turd files around for a long time without anyone noticing.