From fc02eb94d587bcc556f58cae2ff0671933640339 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Mon, 9 Sep 2024 17:00:53 +0800 Subject: [PATCH] feat: enable actions log compression by default --- custom/conf/app.example.ini | 2 +- modules/setting/actions.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 0f70a1a3d040e..052b72d042775 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -2692,7 +2692,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 diff --git a/modules/setting/actions.go b/modules/setting/actions.go index a515b1ca69fdc..913872eaf2312 100644 --- a/modules/setting/actions.go +++ b/modules/setting/actions.go @@ -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 {