Skip to content

Commit

Permalink
Disable build cache since Github Action runners fail with 'no space l…
Browse files Browse the repository at this point in the history
…eft on device' (opensearch-project#10409)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
  • Loading branch information
reta authored and ashking94 committed Oct 6, 2023
1 parent dad525a commit 74c8c3c
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 12 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/assemble.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Gradle Assemble
on: [pull_request]

jobs:
assemble:
if: github.repository == 'opensearch-project/OpenSearch'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
- name: Setup docker (missing on MacOS)
if: runner.os == 'macos'
run: |
brew install docker
colima start
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
- name: Run Gradle (assemble)
run: |
./gradlew assemble --parallel --no-build-cache -PDISABLE_BUILD_CACHE
11 changes: 1 addition & 10 deletions .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Gradle Precommit and Assemble
name: Gradle Precommit
on: [pull_request]

jobs:
Expand All @@ -19,12 +19,3 @@ jobs:
- name: Run Gradle (precommit)
run: |
./gradlew javadoc precommit --parallel
- name: Setup docker (missing on MacOS)
if: runner.os == 'macos'
run: |
brew install docker
colima start
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
- name: Run Gradle (assemble)
run: |
./gradlew assemble --parallel
Original file line number Diff line number Diff line change
Expand Up @@ -2314,7 +2314,7 @@ public void openEngineAndRecoverFromTranslog() throws IOException {
};

// Do not load the global checkpoint if this is a remote snapshot index
if (indexSettings.isRemoteSnapshot() == false) {
if (indexSettings.isRemoteSnapshot() == false && indexSettings.isRemoteTranslogStoreEnabled() == false) {
loadGlobalCheckpointToReplicationTracker();
}

Expand Down
4 changes: 3 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ plugins {
id "com.gradle.enterprise" version "3.14.1"
}

ext.disableBuildCache = hasProperty('DISABLE_BUILD_CACHE') || System.getenv().containsKey('DISABLE_BUILD_CACHE')

buildCache {
local {
enabled = true
enabled = !disableBuildCache
removeUnusedEntriesAfterDays = 14
}
}
Expand Down

0 comments on commit 74c8c3c

Please sign in to comment.