Skip to content

Commit 1620e3f

Browse files
authored
Enable compression for Actions logs by default (#32013)
Close #31801. Follow #31761. Since there are so many benefits of compression and there are no reports of related issues after weeks, it should be fine to enable compression by default.
1 parent f183783 commit 1620e3f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

custom/conf/app.example.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -2695,7 +2695,7 @@ LEVEL = Info
26952695
;; It's always recommended to use compression when using local disk as log storage if CPU or memory is not a bottleneck.
26962696
;; And for object storage services like S3, which is billed for requests, it would cause extra 2 times of get requests for each log view.
26972697
;; But it will save storage space and network bandwidth, so it's still recommended to use compression.
2698-
;LOG_COMPRESSION = none
2698+
;LOG_COMPRESSION = zstd
26992699
;; Default artifact retention time in days. Artifacts could have their own retention periods by setting the `retention-days` option in `actions/upload-artifact` step.
27002700
;ARTIFACT_RETENTION_DAYS = 90
27012701
;; Timeout to stop the task which have running status, but haven't been updated for a long time

modules/setting/actions.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ func (c logCompression) IsValid() bool {
6262
}
6363

6464
func (c logCompression) IsNone() bool {
65-
return c == "" || strings.ToLower(string(c)) == "none"
65+
return strings.ToLower(string(c)) == "none"
6666
}
6767

6868
func (c logCompression) IsZstd() bool {
69-
return strings.ToLower(string(c)) == "zstd"
69+
return c == "" || strings.ToLower(string(c)) == "zstd"
7070
}
7171

7272
func loadActionsFrom(rootCfg ConfigProvider) error {

0 commit comments

Comments
 (0)