Skip to content

cirrus: save/restore golangci-lint cache for linux #2832

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@
image_name: ${DEBIAN_CACHE_IMAGE_NAME}
env:
HOME: "/root" # default unset, needed by golangci-lint.
golangci-lint_cache:
folder: /root/.cache/golangci-lint
reupload_on_changes: true
fingerprint_script:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at https://github.com/golangci/golangci-lint-action?tab=readme-ov-file#caching-internals , is this sufficient?

I do think the two existing values are relevant, but invalidating also on go.mod (go.sum??) seems reasonable. Compare also https://github.com/containers/image/pull/2837/files#r2054800484 about regular refreshes.

reupload_on_changes does help against missing updates, but it is not optimal for efficiency, e.g. if we branch and the two branches differ in code but not (yet) in tool versions — the reupload + the same fingerprint would cause the two branches to stop on each others’ caches.

- go version
- grep GOLANGCI_LINT_VERSION Makefile | head -1
script: |
git remote update
make tools
Expand All @@ -72,7 +78,7 @@
script: make cross


test_task:

Check warning on line 81 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L81

task "Test" depends on task "validate", but their only_if conditions are different

Check warning on line 81 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L81

task "Test w/ opengpg" depends on task "validate", but their only_if conditions are different

Check warning on line 81 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L81

task "Test" depends on task "validate", but their only_if conditions are different

Check warning on line 81 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L81

task "Test w/ opengpg" depends on task "validate", but their only_if conditions are different
alias: test
depends_on:
- validate
Expand All @@ -93,7 +99,7 @@
##### repository's `.cirrus.yml`. Changes made here should be fully merged
##### prior to being manually duplicated and maintained in containers/skopeo.
#####
test_skopeo_task:

Check warning on line 102 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L102

task "Skopeo Test" depends on task "validate", but their only_if conditions are different

Check warning on line 102 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L102

task "Skopeo Test w/ opengpg" depends on task "validate", but their only_if conditions are different

Check warning on line 102 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L102

task "Skopeo Test" depends on task "validate", but their only_if conditions are different

Check warning on line 102 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L102

task "Skopeo Test w/ opengpg" depends on task "validate", but their only_if conditions are different
alias: test_skopeo
only_if: *not_docs
depends_on:
Expand Down Expand Up @@ -155,7 +161,7 @@
# Status aggregator for all tests. This task simply ensures a defined
# set of tasks all passed, and allows confirming that based on the status
# of this task.
success_task:

Check warning on line 164 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L164

task "Total Success" depends on task "validate", but their only_if conditions are different

Check warning on line 164 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L164

task "Total Success" depends on task "cross", but their only_if conditions are different

Check warning on line 164 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L164

task "Total Success" depends on task "Test", but their only_if conditions are different

Check warning on line 164 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L164

task "Total Success" depends on task "Test w/ opengpg", but their only_if conditions are different

Check warning on line 164 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L164

task "Total Success" depends on task "Skopeo Test", but their only_if conditions are different

Check warning on line 164 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L164

task "Total Success" depends on task "Skopeo Test w/ opengpg", but their only_if conditions are different

Check warning on line 164 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L164

task "Total Success" depends on task "validate", but their only_if conditions are different

Check warning on line 164 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L164

task "Total Success" depends on task "cross", but their only_if conditions are different

Check warning on line 164 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L164

task "Total Success" depends on task "Test", but their only_if conditions are different

Check warning on line 164 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L164

task "Total Success" depends on task "Test w/ opengpg", but their only_if conditions are different

Check warning on line 164 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L164

task "Total Success" depends on task "Skopeo Test", but their only_if conditions are different

Check warning on line 164 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L164

task "Total Success" depends on task "Skopeo Test w/ opengpg", but their only_if conditions are different
name: "Total Success"
alias: success
# N/B: ALL tasks must be listed here, minus their '_task' suffix.
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ linters:
exclusions:
presets:
- comments
- common-false-positives
# - common-false-positives
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intentional?

- std-error-handling