Skip to content
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

Git LFS - Garbage collect LFS meta objects error #26093

Closed
Lifeismana opened this issue Jul 24, 2023 · 1 comment · Fixed by #26122
Closed

Git LFS - Garbage collect LFS meta objects error #26093

Lifeismana opened this issue Jul 24, 2023 · 1 comment · Fixed by #26122
Labels
Milestone

Comments

@Lifeismana
Copy link

Description

The "Garbage collect LFS meta objects" cron jobs errors when i try to run it
Task: Garbage collect LFS meta objects cancelled: pq: invalid input syntax for type bigint: "2023-07-17 11:42:52.475264931+02:00"

relevant log:

2023/07/24 11:42:52 ...rvices/cron/tasks.go:140:GetTask() [I] Getting gc_lfs in &{{0 0} gc_lfs 0xc001c7a6c0 0x24d9680 error pq: invalid input syntax for type bigint: "2023-07-17 10:49:23.693085257+02:00"

Gitea Version

1.21.0+dev-354-g24c3bb95a

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.40.1

Operating System

debian

How are you running Gitea?

docker with postgresql 14.02 as a db in the same stack

Database

PostgreSQL

@Zettat123
Copy link
Contributor

related to

gitea/models/git/lfs.go

Lines 396 to 401 in 5db640a

if !opts.OlderThan.IsZero() {
sess.And("`lfs_meta_object`.created_unix < ?", opts.OlderThan)
}
if !opts.UpdatedLessRecentlyThan.IsZero() {
sess.And("`lfs_meta_object`.updated_unix < ?", opts.UpdatedLessRecentlyThan)
}

@lunny lunny added this to the 1.20.2 milestone Jul 25, 2023
lunny pushed a commit that referenced this issue Jul 26, 2023
This PR

- Fix #26093. Replace `time.Time` with `timeutil.TimeStamp`
- Fix #26135. Add missing `xorm:"extends"` to `CountLFSMetaObject` for
LFS meta object query
- Add a unit test for LFS meta object garbage collection
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Jul 26, 2023
This PR

- Fix go-gitea#26093. Replace `time.Time` with `timeutil.TimeStamp`
- Fix go-gitea#26135. Add missing `xorm:"extends"` to `CountLFSMetaObject` for
LFS meta object query
- Add a unit test for LFS meta object garbage collection
silverwind pushed a commit that referenced this issue Jul 26, 2023
Backport #26122 by @Zettat123

This PR

- Fix #26093. Replace `time.Time` with `timeutil.TimeStamp`
- Fix #26135. Add missing `xorm:"extends"` to `CountLFSMetaObject` for
LFS meta object query
- Add a unit test for LFS meta object garbage collection

Co-authored-by: Zettat123 <zettat123@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants