Skip to content

Conversation

@snazy
Copy link
Member

@snazy snazy commented Sep 17, 2025

The GH action ci-incr-build-cache-prepare calls the setup-gradle action with the "right" parameters, so the call of setup-gradle in jobs that use ci-incr-build-cache-prepare is superfluous. But this also renders the caching ineffective as setup-gradle is called w/o cache-read-only: true in "child jobs", which then attempt to store their Gradle cache contents. This leads to attempty storing the Gradle cache in Post Setup Gradle steps of the "child" jobs, conflicting with other child jobs and also conflicting with Store Gradle Cache purpose.

"Which cache" is then restored, is rather non-deterministic, but almost always at least "partial" leading to unnecessary (re)builds.

The GH action `ci-incr-build-cache-prepare` calls the `setup-gradle` action with the "right" parameters, so the call of `setup-gradle` in jobs that use `ci-incr-build-cache-prepare` is superfluous. But this also renders the caching ineffective as `setup-gradle` is called w/o `cache-read-only: true` in "child jobs", which then attempt to store their Gradle cache contents. This leads to attempty storing the Gradle cache in `Post Setup Gradle` steps of the "child" jobs, conflicting with other child jobs and also conflicting with `Store Gradle Cache` purpose.

"Which cache" is then restored, is rather non-deterministic, but almost always at least "partial" leading to unnecessary (re)builds.
@snazy snazy force-pushed the fix-ci-cache-usage branch from 62d6a60 to 203dbaa Compare September 17, 2025 08:17
@snazy snazy requested a review from dimas-b September 17, 2025 13:47
@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Sep 17, 2025
@snazy snazy merged commit f3d53f0 into apache:main Sep 17, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this from Ready to merge to Done in Basic Kanban Board Sep 17, 2025
@snazy snazy deleted the fix-ci-cache-usage branch September 17, 2025 16:51
snazy added a commit to snazy/polaris that referenced this pull request Nov 20, 2025
* Avoid exceptions on ETag matches (apache#2578)

Exceptions have runtime overhead, which is avoidable in this case.

* Publish build scans to develocity.apache.org for build insights (apache#2559)

* Site: add a blog for apache doris and polaris integration (apache#2571)

* Bump: iceberg 1.10 (apache#2586)

* Python client: add license check (apache#2580)

* Python client: add license check

* Python client: add license check

* Python client: add license check

* test

* Enable license check

* Fix license check for cryptography (apache#2591)

* Update plugin com.gradle.common-custom-user-data-gradle-plugin to v2.4.0 (apache#2582)

* Update plugin com.gradle.develocity to v4.2 (apache#2583)

* Build: remove unnecessary openapigenerator plugin usages (apache#2592)

* docs(changelog): Update the Changelog with 1.0.1, 1.0.0, & 0.9.0 Releases (apache#2587)

* Revert "Update plugin com.gradle.develocity to v4.2 (apache#2583)" (apache#2594)

This reverts commit 8cc0fad, build scans are not published to the ASF Develocity instance.

* Add security report page on the website (apache#2538)

This closes apache#2521

* CI: Fix Gradle cache usages (apache#2593)

The GH action `ci-incr-build-cache-prepare` calls the `setup-gradle` action with the "right" parameters, so the call of `setup-gradle` in jobs that use `ci-incr-build-cache-prepare` is superfluous. But this also renders the caching ineffective as `setup-gradle` is called w/o `cache-read-only: true` in "child jobs", which then attempt to store their Gradle cache contents. This leads to attempty storing the Gradle cache in `Post Setup Gradle` steps of the "child" jobs, conflicting with other child jobs and also conflicting with `Store Gradle Cache` purpose.

"Which cache" is then restored, is rather non-deterministic, but almost always at least "partial" leading to unnecessary (re)builds.

* Last merged commit f3d53f0

---------

Co-authored-by: Dmitri Bourlatchkov <dmitri.bourlatchkov@gmail.com>
Co-authored-by: Clay Johnson <cjohnson@gradle.com>
Co-authored-by: Mingyu Chen (Rayner) <yunyou@selectdb.com>
Co-authored-by: Prashant Singh <35593236+singhpk234@users.noreply.github.com>
Co-authored-by: Yong Zheng <yongzheng0809@gmail.com>
Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Adam Christian <105929021+adam-christian-software@users.noreply.github.com>
Co-authored-by: JB Onofré <jbonofre@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants