From a1e184a3bb69bdc6c57d9cda2e898b99b5d2c07d Mon Sep 17 00:00:00 2001 From: Petros Paraskevopoulos Date: Fri, 10 Jan 2025 17:46:50 +0200 Subject: [PATCH] CI: Remove pre command hook to ignore restore gradle dependency cache With this hook present, every build and its within jobs are all restoring the dependency cache, even when this is not really needed, and as such, potentially, unnecessarily delaying some jobs, while also consuming unnecessary resources (downloading from s3, (un)compressing, etc). FYI: It is better to use 'restore_gradle_dependency_cache' only on those jobs that could really benefit from it. PS: Also, based on the current state of things, with the dependency cache save/restore mechanism being stale, this 'restore_gradle_dependency_cache' command is not working as expected. No cache entry is found for 'GRADLE_DEPENDENCY_CACHE' is being output on every build/job that runs on an 'android' agent, plus an this 'GRADLE_RO_DEP_CACHE: unbound variable' is being output on every build/job that runs on another agent (like the 'linter' agent). --- .buildkite/hooks/pre-command | 8 -------- 1 file changed, 8 deletions(-) delete mode 100755 .buildkite/hooks/pre-command diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command deleted file mode 100755 index 71f70a0cd2..0000000000 --- a/.buildkite/hooks/pre-command +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# Note that as the script is sourced, not run directly, the shebang line will be ignored -# See https://buildkite.com/docs/agent/v3/hooks#creating-hook-scripts - -set -e - -restore_gradle_dependency_cache || true