Skip to content

Commit

Permalink
Enable compression for Actions logs by default (#32013)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wolfogre authored Sep 9, 2024
1 parent f183783 commit 1620e3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom/conf/app.example.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2695,7 +2695,7 @@ LEVEL = Info
;; It's always recommended to use compression when using local disk as log storage if CPU or memory is not a bottleneck.
;; 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.
;; But it will save storage space and network bandwidth, so it's still recommended to use compression.
;LOG_COMPRESSION = none
;LOG_COMPRESSION = zstd
;; Default artifact retention time in days. Artifacts could have their own retention periods by setting the `retention-days` option in `actions/upload-artifact` step.
;ARTIFACT_RETENTION_DAYS = 90
;; Timeout to stop the task which have running status, but haven't been updated for a long time
Expand Down
4 changes: 2 additions & 2 deletions modules/setting/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ func (c logCompression) IsValid() bool {
}

func (c logCompression) IsNone() bool {
return c == "" || strings.ToLower(string(c)) == "none"
return strings.ToLower(string(c)) == "none"
}

func (c logCompression) IsZstd() bool {
return strings.ToLower(string(c)) == "zstd"
return c == "" || strings.ToLower(string(c)) == "zstd"
}

func loadActionsFrom(rootCfg ConfigProvider) error {
Expand Down

0 comments on commit 1620e3f

Please sign in to comment.