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

zabetak pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/main by this push:
     new e4bbcd6f53 [CALCITE-5034] Remove unused remote S3 build cache
e4bbcd6f53 is described below

commit e4bbcd6f53ff6be2e2be0893b94d3806e58278d2
Author: Stamatis Zampetakis <[email protected]>
AuthorDate: Thu Aug 1 11:15:16 2024 +0300

    [CALCITE-5034] Remove unused remote S3 build cache
    
    At the moment the cache is not used since nobody is paying for the service.
    
    Remove all related logic since the code does not serve any purpose. If we 
ever decide to use another remote cache we can bring back the code.
    
    Close apache/calcite#3895
---
 .github/workflows/buildcache.yml | 59 ----------------------------------------
 .github/workflows/main.yml       | 35 ------------------------
 gradle.properties                |  2 --
 settings.gradle.kts              | 15 ----------
 4 files changed, 111 deletions(-)

diff --git a/.github/workflows/buildcache.yml b/.github/workflows/buildcache.yml
deleted file mode 100644
index 739651d75b..0000000000
--- a/.github/workflows/buildcache.yml
+++ /dev/null
@@ -1,59 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-name: Seed build cache
-
-on:
-  push:
-    branches:
-      - main
-
-concurrency:
-  # On main/release, we don't want any jobs cancelled so the sha is used to 
name the group
-  # On PR branches, we cancel the job if new commits are pushed
-  # More info: https://stackoverflow.com/a/68422069/253468
-  group: ${{ (github.ref == 'refs/heads/main' || github.ref == 
'refs/heads/release' ) && format('ci-buildcache-{0}', github.sha) || 
format('ci-buildcache-{0}', github.ref) }}
-  cancel-in-progress: true
-
-jobs:
-  seed-build-cache:
-    strategy:
-      # CI resources are shared, so reduce concurrent builds
-      max-parallel: 3
-      fail-fast: false
-      matrix:
-        os: [ubuntu, macos, windows]
-        jdk: [8, 11, 17, 21]
-
-    name: '${{ matrix.os }}, ${{ matrix.jdk }} seed build cache'
-    runs-on: ${{ matrix.os }}-latest
-    steps:
-      - uses: actions/checkout@v3
-        with:
-          fetch-depth: 50
-      - name: 'Set up JDK ${{ matrix.jdk }}'
-        uses: actions/setup-java@v1
-        with:
-          java-version: ${{ matrix.jdk }}
-          distribution: 'zulu'
-      - uses: burrunan/gradle-cache-action@v1
-        name: Build Calcite
-        env:
-          S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ 
secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
-          S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
-          DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
-        with:
-          job-id: jdk${{ matrix.jdk }}
-          remote-build-cache-proxy-enabled: false
-          arguments: --scan --no-parallel --no-daemon build -x test
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 47edd911e4..1e76482540 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -63,8 +63,6 @@ jobs:
     - uses: burrunan/gradle-cache-action@v1
       name: Test
       env:
-        S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID 
}}
-        S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
         DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
       with:
         job-id: jdk${{ matrix.jdk }}
@@ -97,8 +95,6 @@ jobs:
       - uses: burrunan/gradle-cache-action@v1
         name: Test
         env:
-          S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ 
secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
-          S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
           DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
         with:
           job-id: jdk${{ matrix.jdk }}
@@ -131,8 +127,6 @@ jobs:
       - uses: burrunan/gradle-cache-action@v1
         name: Test
         env:
-          S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ 
secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
-          S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
           DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
         with:
           job-id: jdk${{ matrix.jdk }}
@@ -168,8 +162,6 @@ jobs:
       - uses: burrunan/gradle-cache-action@v1
         name: Test
         env:
-          S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ 
secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
-          S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
           DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
         with:
           job-id: jdk${{ matrix.jdk }}
@@ -194,9 +186,6 @@ jobs:
           distribution: 'zulu'
       - uses: burrunan/gradle-cache-action@v1
         name: Test
-        env:
-          S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ 
secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
-          S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
         with:
           job-id: jdk${{ matrix.jdk }}
           remote-build-cache-proxy-enabled: false
@@ -220,8 +209,6 @@ jobs:
       - uses: burrunan/gradle-cache-action@v1
         name: Test
         env:
-          S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ 
secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
-          S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
           DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
         with:
           job-id: jdk${{ matrix.jdk }}
@@ -246,8 +233,6 @@ jobs:
       - uses: burrunan/gradle-cache-action@v1
         name: Test
         env:
-          S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ 
secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
-          S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
           DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
         with:
           job-id: jdk${{ matrix.jdk }}
@@ -272,8 +257,6 @@ jobs:
       - uses: burrunan/gradle-cache-action@v1
         name: Test
         env:
-          S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ 
secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
-          S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
           DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
         with:
           job-id: jdk${{ matrix.jdk }}
@@ -298,8 +281,6 @@ jobs:
       - uses: burrunan/gradle-cache-action@v1
         name: Test
         env:
-          S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ 
secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
-          S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
           DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
         with:
           job-id: jdk${{ matrix.jdk }}
@@ -322,8 +303,6 @@ jobs:
     - uses: burrunan/gradle-cache-action@v1
       name: Build Avatica
       env:
-        S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID 
}}
-        S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
         DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
       with:
         job-id: avatica-jdk${{ matrix.jdk }}
@@ -339,8 +318,6 @@ jobs:
     - uses: burrunan/gradle-cache-action@v1
       name: Test
       env:
-        S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID 
}}
-        S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
         DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
       with:
         job-id: jdk${{ matrix.jdk }}
@@ -367,8 +344,6 @@ jobs:
       - uses: burrunan/gradle-cache-action@v1
         name: Test
         env:
-          S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ 
secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
-          S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
           DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
         with:
           job-id: jdk21
@@ -402,8 +377,6 @@ jobs:
       - uses: burrunan/gradle-cache-action@v1
         name: Test
         env:
-          S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ 
secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
-          S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
           DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
         with:
           job-id: errprone
@@ -425,8 +398,6 @@ jobs:
       - name: 'Run CheckerFramework'
         uses: burrunan/gradle-cache-action@v1
         env:
-          S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ 
secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
-          S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
           DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
         with:
           job-id: checkerframework-jdk11
@@ -450,8 +421,6 @@ jobs:
       - name: 'Run CheckerFramework'
         uses: burrunan/gradle-cache-action@v1
         env:
-          S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ 
secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
-          S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
           DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
         with:
           job-id: checkerframework-jdk11
@@ -476,8 +445,6 @@ jobs:
       - uses: burrunan/gradle-cache-action@v1
         name: Test
         env:
-          S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ 
secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
-          S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
           DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
         with:
           job-id: jdk8
@@ -523,8 +490,6 @@ jobs:
       name: 'Run Druid tests'
       timeout-minutes: 10
       env:
-        S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID 
}}
-        S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
         DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
       with:
         build-root-directory: ./calcite
diff --git a/gradle.properties b/gradle.properties
index 4643aa37db..a0004d1fc8 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -19,7 +19,6 @@ org.gradle.parallel=true
 # Build cache can be disabled with --no-build-cache option
 org.gradle.caching=true
 #org.gradle.caching.debug=true
-s3.build.cache=true
 # See https://github.com/gradle/gradle/pull/11358 , 
https://issues.apache.org/jira/browse/INFRA-14923
 # repository.apache.org does not yet support .sha256 and .sha512 checksums
 systemProp.org.gradle.internal.publish.checksums.insecure=true
@@ -45,7 +44,6 @@ calcite.avatica.version=1.25.0
 com.autonomousapps.dependency-analysis.version=0.71.0
 org.checkerframework.version=0.5.16
 com.github.autostyle.version=3.0
-com.github.burrunan.s3-build-cache.version=1.2
 com.github.johnrengelman.shadow.version=5.1.0
 com.github.spotbugs.version=2.0.0
 com.github.vlsi.vlsi-release-plugins.version=1.90
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 1039856ac9..1c32217a0e 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -24,7 +24,6 @@ pluginManagement {
         idv("com.autonomousapps.dependency-analysis")
         idv("org.checkerframework")
         idv("com.github.autostyle")
-        idv("com.github.burrunan.s3-build-cache")
         idv("com.github.johnrengelman.shadow")
         idv("com.github.spotbugs")
         idv("com.github.vlsi.crlf", "com.github.vlsi.vlsi-release-plugins")
@@ -55,7 +54,6 @@ pluginManagement {
 plugins {
     id("com.gradle.develocity")
     id("com.gradle.common-custom-user-data-gradle-plugin")
-    id("com.github.burrunan.s3-build-cache")
 }
 
 // This is the name of a current project
@@ -118,23 +116,10 @@ develocity {
 }
 
 // Cache build artifacts, so expensive operations do not need to be re-computed
-// The logic is as follows:
-//  1. Cache is populated only in CI that has S3_BUILD_CACHE_ACCESS_KEY_ID and
-//     S3_BUILD_CACHE_SECRET_KEY (GitHub Actions in main branch)
-//  2. Otherwise the cache is read-only (e.g. everyday builds and PR builds)
 buildCache {
     local {
         isEnabled = !isCiServer
     }
-    if (property("s3.build.cache")?.ifBlank { "true" }?.toBoolean() == true) {
-        val pushAllowed = property("s3.build.cache.push")?.ifBlank { "true" 
}?.toBoolean() ?: true
-        remote<com.github.burrunan.s3cache.AwsS3BuildCache> {
-            region = "us-east-2"
-            bucket = "calcite-gradle-cache"
-            endpoint = "s3.us-east-2.wasabisys.com"
-            isPush = isCiServer && pushAllowed && 
!awsAccessKeyId.isNullOrBlank()
-        }
-    }
 }
 
 // This enables to use local clone of vlsi-release-plugins for debugging 
purposes

Reply via email to