Unclear repository update time: some inactive or archived repositories may get a recent "update time" #13491

Closed
opened 2025-11-02 10:44:03 -06:00 by GiteaMirror · 22 comments
Owner

Originally created by @sprappcom on GitHub (Sep 15, 2024).

Description

internally hosted gitea instance mentioned my repo is updated 1 hour ago. i didnt do anything and there's no updated information inside the git.

Screenshot from 2024-09-15 15-17-06
Screenshot from 2024-09-15 15-16-23

Gitea Version

1.22

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

ubuntu 24.04

How are you running Gitea?

docker gitea instance. is there some backdoor to this?

Database

MySQL/MariaDB

Originally created by @sprappcom on GitHub (Sep 15, 2024). ### Description internally hosted gitea instance mentioned my repo is updated 1 hour ago. i didnt do anything and there's no updated information inside the git. ![Screenshot from 2024-09-15 15-17-06](https://github.com/user-attachments/assets/ed87ca74-7e49-466e-8535-185c16a9836a) ![Screenshot from 2024-09-15 15-16-23](https://github.com/user-attachments/assets/a2b03726-ed3f-47a7-a54f-f2b2b2acc83d) ### Gitea Version 1.22 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System ubuntu 24.04 ### How are you running Gitea? docker gitea instance. is there some backdoor to this? ### Database MySQL/MariaDB
GiteaMirror added the type/bug label 2025-11-02 10:44:03 -06:00
Author
Owner

@lunny commented on GitHub (Sep 15, 2024):

Of course there is no any backdoor. All the sources are open. You can take a look at the files' history commits.

@lunny commented on GitHub (Sep 15, 2024): Of course there is no any backdoor. All the sources are open. You can take a look at the files' history commits.
Author
Owner

@delvh commented on GitHub (Sep 15, 2024):

Changing your repo settings also counts as "updated now".
Did you or your site admin perhaps change something there?

@delvh commented on GitHub (Sep 15, 2024): Changing your repo settings also counts as "updated now". Did you or your site admin perhaps change something there?
Author
Owner

@techknowlogick commented on GitHub (Sep 15, 2024):

Scheduled actions also mark repo as updated, issue comments, PRs, and many other interactions with the repo can mark a repo as updated.

@techknowlogick commented on GitHub (Sep 15, 2024): Scheduled actions also mark repo as updated, issue comments, PRs, and many other interactions with the repo can mark a repo as updated.
Author
Owner

@byCarlsJr commented on GitHub (Sep 17, 2024):

Having the same issue. I'm browsing unauthenticated, yet repos are showing updated after I do so. When checking inside the repo, nothing has changed.

@byCarlsJr commented on GitHub (Sep 17, 2024): Having the same issue. I'm browsing unauthenticated, yet repos are showing updated after I do so. When checking inside the repo, nothing has changed.
Author
Owner

@yp05327 commented on GitHub (Sep 17, 2024):

Any operation which will update the record in DB of this repo will update the updated time. So it doesn't mean the code has been updated xxx ago

@yp05327 commented on GitHub (Sep 17, 2024): Any operation which will update the record in DB of this repo will update the updated time. So it doesn't mean the code has been `updated xxx ago`
Author
Owner

@Shuenhoy commented on GitHub (Sep 27, 2024):

Just accessing some inactive repo will also update the updated time. I found this behavior pretty annoying. Is it possible to do the update at least only when something visible happens, e.g. issue comments, pr, setting changes mentioned above?

@Shuenhoy commented on GitHub (Sep 27, 2024): Just accessing some inactive repo will also update the updated time. I found this behavior pretty annoying. Is it possible to do the update at least only when something _visible_ happens, e.g. issue comments, pr, setting changes mentioned above?
Author
Owner

@lunny commented on GitHub (Sep 27, 2024):

So we need to clarify which kind operations should be considered as updated.

  • Change Repository's settings to enable/disable some features, convert from/to archive, public/private
  • Rename the Repository or move to another owner
  • Users added/removed from this repository
  • Commits pushed/Tag pushed
  • Branch created/deleted/renamed
  • Issues/pull requests created/updated/label changed/project changed/assign changed/milestone changed/reviewer changed
  • Comments created/updated
  • Release created/deleted, Release attachments changed
  • Actions run succeed/fail
@lunny commented on GitHub (Sep 27, 2024): So we need to clarify which kind operations should be considered as updated. - [ ] Change Repository's settings to enable/disable some features, convert from/to archive, public/private - [ ] Rename the Repository or move to another owner - [ ] Users added/removed from this repository - [ ] Commits pushed/Tag pushed - [ ] Branch created/deleted/renamed - [ ] Issues/pull requests created/updated/label changed/project changed/assign changed/milestone changed/reviewer changed - [ ] Comments created/updated - [ ] Release created/deleted, Release attachments changed - [ ] Actions run succeed/fail
Author
Owner

@GiteaBot commented on GitHub (Oct 27, 2024):

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@GiteaBot commented on GitHub (Oct 27, 2024): We close issues that need feedback from the author if there were no new comments for a month. :tea:
Author
Owner

@dsyx commented on GitHub (Jan 6, 2025):

I recently discovered this phenomenon: when I just browsed the source code of some repositories through the web (without making any changes), the latest update time of some of the browsed repositories would show Updated 1 minutes ago under the Explore page. However, this is not the case for every browsed repository, which seems to be sporadic rather than inevitable.

Powered by Gitea Version: 1.22.4

@dsyx commented on GitHub (Jan 6, 2025): I recently discovered this phenomenon: when I just browsed the source code of some repositories through the web (without making any changes), the latest update time of some of the browsed repositories would show **Updated 1 minutes ago** under the Explore page. However, this is not the case for every browsed repository, which seems to be sporadic rather than inevitable. > Powered by Gitea Version: 1.22.4
Author
Owner

@yp05327 commented on GitHub (Jan 7, 2025):

@dsyx
Maybe this is a related fix: #33120

@lunny
I think we can reopen this issue, as the topic here https://github.com/go-gitea/gitea/issues/32046#issuecomment-2379969559 is not resolved.

@yp05327 commented on GitHub (Jan 7, 2025): @dsyx Maybe this is a related fix: #33120 @lunny I think we can reopen this issue, as the topic here https://github.com/go-gitea/gitea/issues/32046#issuecomment-2379969559 is not resolved.
Author
Owner

@wxiaoguang commented on GitHub (Jan 7, 2025):

XORM's design is quite hacky, it does too much unnecessary things for developers. Actually it should never auto update anything.

@wxiaoguang commented on GitHub (Jan 7, 2025): XORM's design is quite hacky, it does too much unnecessary things for developers. Actually it should never auto update anything.
Author
Owner

@dsyx commented on GitHub (Jan 7, 2025):

@yp05327
I haven't studied the source code of gitea, but shouldn't the most recent update time be synchronized with the last git commit?

@dsyx commented on GitHub (Jan 7, 2025): @yp05327 I haven't studied the source code of gitea, but shouldn't the most recent update time be synchronized with the last git commit?
Author
Owner

@yp05327 commented on GitHub (Jan 7, 2025):

@dsyx
I mean some actions might unexpectedly change the update time which should be fixed, and one has been.
But the others listed in https://github.com/go-gitea/gitea/issues/32046#issuecomment-2379969559, I have tried some of them, actually these behaviors will change the update time. Maybe more or not, but at least the listed things should be reconsidered, which is the main topic of this issue I think. So I asked @lunny to reopen it.
Only sync time with commit seems a reasonable consideration, maybe GitHub is same? But I have no idea about how to provide a good solution in Gitea now.

@yp05327 commented on GitHub (Jan 7, 2025): @dsyx I mean some actions might unexpectedly change the update time which should be fixed, and one has been. But the others listed in https://github.com/go-gitea/gitea/issues/32046#issuecomment-2379969559, I have tried some of them, actually these behaviors will change the update time. Maybe more or not, but at least the listed things should be reconsidered, which is the main topic of this issue I think. So I asked @lunny to reopen it. Only sync time with commit seems a reasonable consideration, maybe GitHub is same? But I have no idea about how to provide a good solution in Gitea now.
Author
Owner

@techknowlogick commented on GitHub (Jan 7, 2025):

but shouldn't the most recent update time be synchronized with the last git commit?

Actions being run (including scheduled runs), issues/prs/comments being created, and other interactions that aren't git push also update the time.

There was an issue with a minor release where viewing the repo did update that time, but IIRC it was quickly patched. it is possible the version you are/were on included that issue. Are you able to update to the latest stable version (at the time of writing it it 1.22.6)?

@techknowlogick commented on GitHub (Jan 7, 2025): > but shouldn't the most recent update time be synchronized with the last git commit? Actions being run (including scheduled runs), issues/prs/comments being created, and other interactions that aren't git push also update the time. There was an issue with a minor release where viewing the repo did update that time, but IIRC it was quickly patched. it is possible the version you are/were on included that issue. Are you able to update to the latest stable version (at the time of writing it it 1.22.6)?
Author
Owner

@wxiaoguang commented on GitHub (Jan 7, 2025):

There was an issue with a minor release where viewing the repo did update that time, but IIRC it was quickly patched. it is possible the version you are/were on included that issue. Are you able to update to the latest stable version (at the time of writing it it 1.22.6)?

I do not know what "issue" you refer to. If you mean #33119, that issue is unlikely in 1.22 and the "quick patch" is also only in 1.23/main.

@wxiaoguang commented on GitHub (Jan 7, 2025): > There was an issue with a minor release where viewing the repo did update that time, but IIRC it was quickly patched. it is possible the version you are/were on included that issue. Are you able to update to the latest stable version (at the time of writing it it 1.22.6)? I do not know what "issue" you refer to. If you mean #33119, that issue is unlikely in 1.22 and the "quick patch" is also only in 1.23/main.
Author
Owner

@dsyx commented on GitHub (Jan 8, 2025):

@techknowlogick
I have upgraded gittea to 1.22.6 and the problem seems to have been solved.
Thanks.

@dsyx commented on GitHub (Jan 8, 2025): @techknowlogick I have upgraded gittea to 1.22.6 and the problem seems to have been solved. Thanks.
Author
Owner

@julmb commented on GitHub (Mar 26, 2025):

I am running 1.23.1, and merely viewing the main page of a repository bumped its "updated" time to the current time. This is not covered by the options given in https://github.com/go-gitea/gitea/issues/32046#issuecomment-2379969559.

It seems to only happen when viewing repositories that have not been interacted with for a long time. It only happens on the first access, subsequent accesses do not further update the "updated" time.

@julmb commented on GitHub (Mar 26, 2025): I am running 1.23.1, and merely viewing the main page of a repository bumped its "updated" time to the current time. This is not covered by the options given in https://github.com/go-gitea/gitea/issues/32046#issuecomment-2379969559. It seems to only happen when viewing repositories that have not been interacted with for a long time. It only happens on the first access, subsequent accesses do not further update the "updated" time.
Author
Owner

@wxiaoguang commented on GitHub (May 5, 2025):

The bug was never really resolved. See https://gitea.com/gitea

(root problem is https://github.com/go-gitea/gitea/issues/32046#issuecomment-2379969559, and also https://github.com/go-gitea/gitea/issues/32046#issuecomment-2572216746)

Image

@wxiaoguang commented on GitHub (May 5, 2025): The bug was never really resolved. See https://gitea.com/gitea (root problem is https://github.com/go-gitea/gitea/issues/32046#issuecomment-2379969559, and also https://github.com/go-gitea/gitea/issues/32046#issuecomment-2572216746) ![Image](https://github.com/user-attachments/assets/86eb8793-db57-49fd-8d96-d1b213074c7f)
Author
Owner

@lunny commented on GitHub (May 7, 2025):

After some tests on Github, looks like only git related operations(push commits, create/delete branches, create/delete tags) will update the time. I think we can follow this behaviour.

@lunny commented on GitHub (May 7, 2025): After some tests on Github, looks like only git related operations(push commits, create/delete branches, create/delete tags) will update the time. I think we can follow this behaviour.
Author
Owner

@julmb commented on GitHub (May 7, 2025):

After some tests on Github, looks like only git related operations(push commits, create/delete branches, create/delete tags) will update the time. I think we can follow this behaviour.

As far as I'm concerned, I would be totally okay if other clear "write" operations (open issue, comment on PR, etc.) would also bump the "updated" time. It is just strange that simply viewing a repository page can do that.

@julmb commented on GitHub (May 7, 2025): > After some tests on Github, looks like only git related operations(push commits, create/delete branches, create/delete tags) will update the time. I think we can follow this behaviour. As far as I'm concerned, I would be totally okay if other clear "write" operations (open issue, comment on PR, etc.) would also bump the "updated" time. It is just strange that simply viewing a repository page can do that.
Author
Owner

@lunny commented on GitHub (May 7, 2025):

After some tests on Github, looks like only git related operations(push commits, create/delete branches, create/delete tags) will update the time. I think we can follow this behaviour.

As far as I'm concerned, I would be totally okay if other clear "write" operations (open issue, comment on PR, etc.) would also bump the "updated" time. It is just strange that simply viewing a repository page can do that.

I have sent #34388 to follow GH's behavior. What do you think about that?

@lunny commented on GitHub (May 7, 2025): > > After some tests on Github, looks like only git related operations(push commits, create/delete branches, create/delete tags) will update the time. I think we can follow this behaviour. > > As far as I'm concerned, I would be totally okay if other clear "write" operations (open issue, comment on PR, etc.) would also bump the "updated" time. It is just strange that simply viewing a repository page can do that. I have sent #34388 to follow GH's behavior. What do you think about that?
Author
Owner

@julmb commented on GitHub (May 9, 2025):

Only updating on git write operations is a reasonable and straightforward way of doing things, so I would also be happy with that.

@julmb commented on GitHub (May 9, 2025): Only updating on git write operations is a reasonable and straightforward way of doing things, so I would also be happy with that.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13491