Skip to content

Commit

Permalink
[CALCITE-5034] Remove unused remote S3 build cache
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zabetak committed Aug 1, 2024
1 parent 9fa1e16 commit d75f90b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 103 deletions.
59 changes: 0 additions & 59 deletions .github/workflows/buildcache.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,9 @@ 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 }}
GRADLE_ENTERPRISE_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 javadoc
- name: 'sqlline and sqllsh'
shell: cmd
Expand Down Expand Up @@ -322,12 +319,9 @@ 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 }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
with:
job-id: avatica-jdk${{ matrix.jdk }}
remote-build-cache-proxy-enabled: false
build-root-directory: ../calcite-avatica
arguments: publishToMavenLocal
properties: |
Expand All @@ -339,12 +333,9 @@ 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 }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
with:
job-id: jdk${{ matrix.jdk }}
remote-build-cache-proxy-enabled: false
execution-only-caches: true
arguments: --scan --no-parallel --no-daemon build javadoc
properties: |
Expand All @@ -367,12 +358,9 @@ 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 }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
with:
job-id: jdk21
remote-build-cache-proxy-enabled: false
arguments: --scan --no-parallel --no-daemon build javadoc
- name: 'sqlline and sqllsh'
run: |
Expand Down Expand Up @@ -402,12 +390,9 @@ 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 }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
with:
job-id: errprone
remote-build-cache-proxy-enabled: false
arguments: --scan --no-parallel --no-daemon -Pguava.version=${{ env.GUAVA }} -PenableErrorprone classes

linux-checkerframework:
Expand All @@ -425,12 +410,9 @@ 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 }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
with:
job-id: checkerframework-jdk11
remote-build-cache-proxy-enabled: false
arguments: --scan --no-parallel --no-daemon -PenableCheckerframework :linq4j:classes :core:classes

linux-checkerframework-guava29:
Expand All @@ -450,12 +432,9 @@ 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 }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
with:
job-id: checkerframework-jdk11
remote-build-cache-proxy-enabled: false
arguments: --scan --no-parallel --no-daemon -Pguava.version=${{ env.GUAVA }} -PenableCheckerframework :linq4j:classes :core:classes

linux-slow:
Expand All @@ -476,12 +455,9 @@ 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 }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
with:
job-id: jdk8
remote-build-cache-proxy-enabled: false
arguments: --scan --no-parallel --no-daemon testSlow

linux-druid:
Expand Down Expand Up @@ -523,11 +499,8 @@ 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 }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
with:
build-root-directory: ./calcite
job-id: Druid8
remote-build-cache-proxy-enabled: false
arguments: --scan --no-parallel --no-daemon :druid:test -Dcalcite.test.druid=true
2 changes: 0 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
15 changes: 0 additions & 15 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,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")
Expand Down Expand Up @@ -57,7 +56,6 @@ pluginManagement {
plugins {
id("com.gradle.enterprise")
id("com.gradle.common-custom-user-data-gradle-plugin")
id("com.github.burrunan.s3-build-cache")
}

// This is the name of a current project
Expand Down Expand Up @@ -123,23 +121,10 @@ gradleEnterprise {
}

// 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
Expand Down

0 comments on commit d75f90b

Please sign in to comment.