This is an automated email from the ASF dual-hosted git repository.

hgruszecki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iggy.git


The following commit(s) were added to refs/heads/master by this push:
     new 6df20bbca fix(ci): disable Go caching to eliminate duplicate-restore 
errors (#2877)
6df20bbca is described below

commit 6df20bbcadcdac8391aab888aa24df7cc03bf01e
Author: Hubert Gruszecki <[email protected]>
AuthorDate: Mon Mar 9 09:32:03 2026 +0100

    fix(ci): disable Go caching to eliminate duplicate-restore errors (#2877)
---
 .github/actions/go/pre-merge/action.yml            |  7 ++--
 .../actions/utils/setup-go-with-cache/action.yml   | 37 +++++++++-------------
 .github/workflows/_common.yml                      |  3 +-
 .github/workflows/_test_examples.yml               |  4 +--
 .github/workflows/post-merge.yml                   |  2 +-
 5 files changed, 22 insertions(+), 31 deletions(-)

diff --git a/.github/actions/go/pre-merge/action.yml 
b/.github/actions/go/pre-merge/action.yml
index dc0077a54..4219c2b0e 100644
--- a/.github/actions/go/pre-merge/action.yml
+++ b/.github/actions/go/pre-merge/action.yml
@@ -26,10 +26,8 @@ inputs:
 runs:
   using: "composite"
   steps:
-    - name: Setup Go with cache
+    - name: Setup Go
       uses: ./.github/actions/utils/setup-go-with-cache
-      with:
-        enabled: "false"
 
     - name: Format Check
       shell: bash
@@ -90,6 +88,7 @@ runs:
         version: v1.64.8
         working-directory: foreign/go
         args: --timeout=5m
+        cache: false
 
     - name: Lint BDD
       if: inputs.task == 'lint' && hashFiles('bdd/go/go.mod') != ''
@@ -98,6 +97,7 @@ runs:
         version: v1.64.8
         working-directory: bdd/go
         args: --timeout=5m
+        cache: false
 
     - name: Lint Examples
       if: inputs.task == 'lint' && hashFiles('examples/go/go.mod') != ''
@@ -106,6 +106,7 @@ runs:
         version: v1.64.8
         working-directory: examples/go
         args: --timeout=5m
+        cache: false
 
     - name: Build
       shell: bash
diff --git a/.github/actions/utils/setup-go-with-cache/action.yml 
b/.github/actions/utils/setup-go-with-cache/action.yml
index e9d62a469..1e6f9c114 100644
--- a/.github/actions/utils/setup-go-with-cache/action.yml
+++ b/.github/actions/utils/setup-go-with-cache/action.yml
@@ -15,35 +15,29 @@
 # specific language governing permissions and limitations
 # under the License.
 
-# NOTE: this action sets up the Go toolchain + caching for dependencies,
-#       it is a convenience wrapper, so that we can use it in all workflows.
+# NOTE: Go builds are fast, so caching is disabled by default.
+# The read-cache/save-cache inputs exist for parity with setup-rust-with-cache
+# but both default to "false". Enable only if Go build times become a 
bottleneck.
 
 name: setup-go-with-cache
-description: Setup Go toolchain and comprehensive caching (go mod cache + 
golangci-lint cache)
+description: Setup Go toolchain and optional caching (go mod cache + 
golangci-lint cache)
 inputs:
   go-version:
     description: "Go version to use"
     required: false
     default: "1.23.0"
-  enabled:
-    description: "Whether to enable caching"
+  read-cache:
+    description: "Whether to read from cache"
     required: false
-    default: "true"
-  cache-dependency-path:
-    description: "Paths to go.sum files for caching (newline separated)"
+    default: "false"
+  save-cache:
+    description: "Whether to save cache"
     required: false
-    default: |
-      foreign/go/go.sum
-      bdd/go/go.sum
-      examples/go/go.sum
+    default: "false"
   download-deps:
     description: "Whether to download module dependencies"
     required: false
     default: "true"
-  golangci-lint-version:
-    description: "golangci-lint version for cache key"
-    required: false
-    default: "v1.61"
 
 runs:
   using: "composite"
@@ -52,11 +46,10 @@ runs:
       uses: actions/setup-go@v5
       with:
         go-version: ${{ inputs.go-version }}
-        cache: ${{ inputs.enabled == 'true' }}
-        cache-dependency-path: ${{ inputs.cache-dependency-path }}
+        cache: ${{ inputs.read-cache == 'true' }}
 
     - name: Setup additional Go module cache
-      if: inputs.enabled == 'true'
+      if: inputs.read-cache == 'true'
       uses: actions/cache@v4
       with:
         path: |
@@ -67,13 +60,13 @@ runs:
           go-mod-${{ runner.os }}-${{ runner.arch }}-
 
     - name: Setup golangci-lint cache
-      if: inputs.enabled == 'true'
+      if: inputs.read-cache == 'true'
       uses: actions/cache@v4
       with:
         path: ~/.cache/golangci-lint
-        key: golangci-lint-${{ runner.os }}-${{ inputs.golangci-lint-version 
}}-${{ hashFiles('**/go.sum') }}
+        key: golangci-lint-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
         restore-keys: |
-          golangci-lint-${{ runner.os }}-${{ inputs.golangci-lint-version }}-
+          golangci-lint-${{ runner.os }}-
 
     - name: Download Go module dependencies
       if: inputs.download-deps == 'true'
diff --git a/.github/workflows/_common.yml b/.github/workflows/_common.yml
index 136d89b91..5d9c82783 100644
--- a/.github/workflows/_common.yml
+++ b/.github/workflows/_common.yml
@@ -117,11 +117,10 @@ jobs:
     steps:
       - uses: actions/checkout@v4
 
-      - name: Setup Go with cache
+      - name: Setup Go
         uses: ./.github/actions/utils/setup-go-with-cache
         with:
           go-version: "1.23"
-          enabled: "false"
           download-deps: "false"
 
       - name: Install addlicense
diff --git a/.github/workflows/_test_examples.yml 
b/.github/workflows/_test_examples.yml
index 284b7c9fc..84b05164c 100644
--- a/.github/workflows/_test_examples.yml
+++ b/.github/workflows/_test_examples.yml
@@ -78,12 +78,10 @@ jobs:
         with:
           gradle-cache-disabled: "true"
 
-      - name: Setup Go with cache for examples
+      - name: Setup Go for examples
         if: inputs.component == 'examples-suite' && inputs.task == 
'examples-go'
         uses: ./.github/actions/utils/setup-go-with-cache
         with:
-          enabled: "false"
-          cache-dependency-path: examples/go/go.sum
           download-deps: "false"
 
       - name: Build common binaries for all examples
diff --git a/.github/workflows/post-merge.yml b/.github/workflows/post-merge.yml
index 2f9a6fcf6..2fddfe13b 100644
--- a/.github/workflows/post-merge.yml
+++ b/.github/workflows/post-merge.yml
@@ -508,7 +508,7 @@ jobs:
     steps:
       - uses: actions/checkout@v4
 
-      - name: Setup Go with cache
+      - name: Setup Go
         uses: ./.github/actions/utils/setup-go-with-cache
 
       - name: Setup Rust with cache

Reply via email to