Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sprappcom opened this issue Sep 15, 2024 · 22 comments · May be fixed by #34388
Open
Labels

Comments

@sprappcom
Copy link

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

@lunny

This comment has been minimized.

@lunny lunny added issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail and removed type/bug labels Sep 15, 2024
@delvh
Copy link
Member

delvh commented Sep 15, 2024

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

@techknowlogick
Copy link
Member

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

@byCarlsJr
Copy link

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.

@yp05327
Copy link
Contributor

yp05327 commented 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

@Shuenhoy
Copy link

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?

@lunny
Copy link
Member

lunny commented 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

@GiteaBot

This comment has been minimized.

@dsyx
Copy link

dsyx commented 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

@yp05327
Copy link
Contributor

yp05327 commented Jan 7, 2025

@dsyx
Maybe this is a related fix: #33120

@lunny
I think we can reopen this issue, as the topic here #32046 (comment) is not resolved.

@lunny lunny reopened this Jan 7, 2025
@wxiaoguang
Copy link
Contributor

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

@dsyx
Copy link

dsyx commented 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?

@yp05327
Copy link
Contributor

yp05327 commented 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 #32046 (comment), 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.

@techknowlogick
Copy link
Member

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)?

@wxiaoguang
Copy link
Contributor

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.

@dsyx
Copy link

dsyx commented Jan 8, 2025

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

@julmb
Copy link

julmb commented 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 #32046 (comment).

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.

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Apr 13, 2025
@wxiaoguang
Copy link
Contributor

wxiaoguang commented May 5, 2025

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

(root problem is #32046 (comment), and also #32046 (comment))

Image

@wxiaoguang wxiaoguang reopened this May 5, 2025
@wxiaoguang wxiaoguang added type/bug and removed issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail labels May 5, 2025
@wxiaoguang wxiaoguang changed the title i suddenly have in my git repo that mentioned it is updated 1 hour ago but i didnt make any update. how is this possible? Unclear repoistory update time: some inactive or archived repositories may get a recrent "update time" May 5, 2025
@wxiaoguang wxiaoguang changed the title Unclear repoistory update time: some inactive or archived repositories may get a recrent "update time" Unclear repository update time: some inactive or archived repositories may get a recent "update time" May 5, 2025
@go-gitea go-gitea unlocked this conversation May 6, 2025
@lunny
Copy link
Member

lunny commented 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.

@julmb
Copy link

julmb commented 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.

@lunny
Copy link
Member

lunny commented 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?

@julmb
Copy link

julmb commented 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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.