-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Clear up old Actions logs #31735
Merged
Merged
Clear up old Actions logs #31735
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wolfogre
added
type/feature
Completely new functionality. Can only be merged if feature freeze is not active.
topic/gitea-actions
related to the actions of Gitea
labels
Jul 30, 2024
GiteaBot
added
the
lgtm/need 2
This PR needs two approvals by maintainers to be considered for merging.
label
Jul 30, 2024
pull-request-size
bot
added
the
size/L
Denotes a PR that changes 100-499 lines, ignoring generated files.
label
Jul 30, 2024
github-actions
bot
added
modifies/translation
modifies/go
Pull requests that update Go code
labels
Jul 30, 2024
lunny
reviewed
Jul 31, 2024
wolfogre
commented
Jul 31, 2024
silverwind
reviewed
Jul 31, 2024
When does this run exactly? Via some cron? |
Co-authored-by: silverwind <me@silverwind.io>
@silverwind Yes. The spec is |
lunny
reviewed
Aug 1, 2024
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
lunny
approved these changes
Aug 1, 2024
GiteaBot
added
lgtm/need 1
This PR needs approval from one additional maintainer to be merged.
and removed
lgtm/need 2
This PR needs two approvals by maintainers to be considered for merging.
labels
Aug 1, 2024
silverwind
reviewed
Aug 1, 2024
wolfogre
commented
Aug 1, 2024
silverwind
approved these changes
Aug 1, 2024
GiteaBot
added
lgtm/done
This PR has enough approvals to get merged. There are no important open reservations anymore.
and removed
lgtm/need 1
This PR needs approval from one additional maintainer to be merged.
labels
Aug 1, 2024
lunny
added
pr/breaking
Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it!
reviewed/wait-merge
This pull request is part of the merge queue. It will be merged soon.
labels
Aug 1, 2024
GiteaBot
removed
the
reviewed/wait-merge
This pull request is part of the merge queue. It will be merged soon.
label
Aug 2, 2024
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Aug 2, 2024
* giteaofficial/main: Clear up old Actions logs (go-gitea#31735) Fix createElementFromAttrs bug (go-gitea#31751) bump vue-bar-graph (go-gitea#31705) Use UTC as default timezone when schedule Actions cron tasks (go-gitea#31742) Add permission description for API to add repo collaborator (go-gitea#31744) Clarify Actions resources ownership (go-gitea#31724) Exclude protected branches from recently pushed (go-gitea#31748) [skip ci] Updated translations via Crowdin Distinguish LFS object errors to ignore missing objects during migration (go-gitea#31702)
wolfogre
added a commit
that referenced
this pull request
Aug 9, 2024
Support compression for Actions logs to save storage space and bandwidth. Inspired by #24256 (comment) The biggest challenge is that the compression format should support [seekable](https://github.com/facebook/zstd/blob/dev/contrib/seekable_format/zstd_seekable_compression_format.md). So when users are viewing a part of the log lines, Gitea doesn't need to download the whole compressed file and decompress it. That means gzip cannot help here. And I did research, there aren't too many choices, like bgzip and xz, but I think zstd is the most popular one. It has an implementation in Golang with [zstd](https://github.com/klauspost/compress/tree/master/zstd) and [zstd-seekable-format-go](https://github.com/SaveTheRbtz/zstd-seekable-format-go), and what is better is that it has good compatibility: a seekable format zstd file can be read by a regular zstd reader. This PR introduces a new package `zstd` to combine and wrap the two packages, to provide a unified and easy-to-use API. And a new setting `LOG_COMPRESSION` is added to the config, although I don't see any reason why not to use compression, I think's it's a good idea to keep the default with `none` to be consistent with old versions. `LOG_COMPRESSION` takes effect for only new log files, it adds `.zst` as an extension to the file name, so Gitea can determine if it needs decompression according to the file name when reading. Old files will keep the format since it's not worth converting them, as they will be cleared after #31735. <img width="541" alt="image" src="https://github.com/user-attachments/assets/e9598764-a4e0-4b68-8c2b-f769265183c9">
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
lgtm/done
This PR has enough approvals to get merged. There are no important open reservations anymore.
modifies/go
Pull requests that update Go code
modifies/migrations
modifies/translation
pr/breaking
Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it!
size/L
Denotes a PR that changes 100-499 lines, ignoring generated files.
topic/gitea-actions
related to the actions of Gitea
type/feature
Completely new functionality. Can only be merged if feature freeze is not active.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #24256.
Clear up old action logs to free up storage space.
Users will see a message indicating that the log has been cleared if they view old tasks.
Docs: https://gitea.com/gitea/docs/pulls/40