'Gitlab sort multiple repositories by last commit date
Solution 1:[1]
That could be similar to gitlab-org/gitlab-foss
issue 56227:
For example, I have a project
testing-dev-project
in a group.
It displays that it was last updated 1 week ago.
Using the inspector, the time is Dec 28, 2018. However, if I query the project with the API, I get the "last_activity_at":"2018-10-26T12:46:34.372-07:00".
You can also check by going to theProject -> Activity
orProject -> Settings -> Audit Events
.
But:
This has likely always been the behavior - if a database migration touches something in a project then the updated_at timestamp is automatically updated by Rails.
This is also mentioned in gitlab-org/gitlab
issue 25862: "Show project creation dates when sorting group page on this attribute"
For some reason,
updated_at
was updated fairly recently. I suspect a migration such as the one that encrypted the runners token column may have touched every project.
As a result, theupdated_at
column may have been updated recently, and the projects appear to have been touched more recently than they should.
Last updated being out of order due to the issues described in
gitlab-org/gitlab-foss
issue 27181
That last issue is the most relevant, still opened, and finishes with:
The discrepancy between the actual sort order and the displayed updated time is due to the fact that it displays the project's
last_updated_date
value, while sort is based onlast_updated_at
.
It's not immediately obvious to me why these values are so different, it seems like they should be very close.
I've submitted a MR that sets the list to display values fromlast_updated_at
, though I'm not sure if a better long term solution would be to change the triggers that setlast_updated_date
and use that for sorting instead.
This issue is moved to gitlab-org/gitlab
issue 17017.
See also GitLab 14.10 MR 82488: "Project list: order by real last update"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |