mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-12 22:10:25 +00:00
fix: ignore expired artifacts for quota calculation (#7976)
- Expired artifacts are kept in the database but the artifact has been deleted from the storage. Ignore them for the quota calculation. - Added unit test. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7976 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Reviewed-by: Otto <otto@codeberg.org> Co-authored-by: Gusted <postmaster@gusted.xyz> Co-committed-by: Gusted <postmaster@gusted.xyz>
This commit is contained in:
parent
e78d1c8210
commit
022eeee657
4 changed files with 61 additions and 1 deletions
17
models/fixtures/TestGetUsedForUser/action_artifact.yaml
Normal file
17
models/fixtures/TestGetUsedForUser/action_artifact.yaml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
-
|
||||
id: 1001
|
||||
run_id: 792
|
||||
runner_id: 1
|
||||
repo_id: 4
|
||||
owner_id: 1
|
||||
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
|
||||
storage_path: "27/5/1730330775594233150.chunk"
|
||||
file_size: 693147180559
|
||||
file_compressed_size: 693147180559
|
||||
content_encoding: "application/zip"
|
||||
artifact_path: "big-file.zip"
|
||||
artifact_name: "big-file"
|
||||
status: 4
|
||||
created_unix: 1730330775
|
||||
updated_unix: 1730330775
|
||||
expired_unix: 1738106775
|
||||
Loading…
Add table
Add a link
Reference in a new issue