mirror of
https://github.com/containers/podman.git
synced 2025-10-16 18:53:19 +08:00
cirrus: fix golangci-lint cache leak
Do not use reupload_on_changes, this will make the cache grow unbound and I have seen the cache become so large then restoring it and uploading it took several minutes thus making the task time worse compared to no cache. I manually cleaned the cache a few times to fix this but it need to properly be fixed here. To not have a stale cache for to long also use date +%U which will create a new cache once a week. This is in line with the offical golangci-lint github action which invalidates the cache every 7 days by default[1]. [1] https://github.com/golangci/golangci-lint-action/blob/main/README.md#cache-invalidation-interval Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -122,10 +122,10 @@ validate-source_task:
|
|||||||
setup_script: &setup '$GOSRC/$SCRIPT_BASE/setup_environment.sh'
|
setup_script: &setup '$GOSRC/$SCRIPT_BASE/setup_environment.sh'
|
||||||
golangci-lint_cache:
|
golangci-lint_cache:
|
||||||
folder: /root/.cache/golangci-lint
|
folder: /root/.cache/golangci-lint
|
||||||
reupload_on_changes: true
|
fingerprint_script: &golangci_cache_fingerprint
|
||||||
fingerprint_script:
|
|
||||||
- go version
|
- go version
|
||||||
- grep GOLANGCI_LINT_VERSION Makefile | head -1
|
- grep GOLANGCI_LINT_VERSION Makefile | head -1
|
||||||
|
- date +%U
|
||||||
# Standard main execution stage call, used by nearly every task in CI.
|
# Standard main execution stage call, used by nearly every task in CI.
|
||||||
main_script: &main '/usr/bin/time --verbose --output="$STATS_LOGFILE" $GOSRC/$SCRIPT_BASE/runner.sh'
|
main_script: &main '/usr/bin/time --verbose --output="$STATS_LOGFILE" $GOSRC/$SCRIPT_BASE/runner.sh'
|
||||||
|
|
||||||
@ -340,10 +340,7 @@ freebsd_alt_build_task:
|
|||||||
- go version # Downloads a new go version based on go.mod's go directive.
|
- go version # Downloads a new go version based on go.mod's go directive.
|
||||||
golint_cache:
|
golint_cache:
|
||||||
folder: ~/.cache/golangci-lint
|
folder: ~/.cache/golangci-lint
|
||||||
reupload_on_changes: true
|
fingerprint_script: *golangci_cache_fingerprint
|
||||||
fingerprint_script:
|
|
||||||
- go version
|
|
||||||
- grep GOLANGCI_LINT_VERSION Makefile | head -1
|
|
||||||
lint_script:
|
lint_script:
|
||||||
- gmake golangci-lint
|
- gmake golangci-lint
|
||||||
build_amd64_script:
|
build_amd64_script:
|
||||||
|
Reference in New Issue
Block a user