Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix secrel#publish-to-grc workflow ubuntu/gradle version issue (#3789)
### **Problem** Gradle 8.11, used by the latest Ubuntu runner (`ubuntu-latest`), introduced a failure in the Publish to GHCR workflow. The failure occurs due to an issue with the `removeUnusedEntriesOlderThan` property in Gradle's caching system. [Example failures](https://github.com/department-of-veterans-affairs/abd-vro-internal/actions/runs/11960038018/job/33343170178): ``` Compiling initialization script '/home/runner/.gradle/init.d/gradle-actions.inject-develocity.init.gradle' using BuildScriptTransformer. Starting Build FAILURE: Build failed with an exception. * Where: Initialization script '/home/runner/work/_temp/dummy-cleanup-project/init.gradle' line: 8 * What went wrong: Cannot get the value of write-only property 'removeUnusedEntriesOlderThan' for object of type org.gradle.api.internal.cache.DefaultCacheConfigurations$DefaultCacheResourceConfiguration. ``` Initially, this error was limited to the Publish to GHCR workflow but later spread to all pipelines after [upgrading Gradle in this commit](13b270d). The issue appears tied to Gradle's handling of cached entries, potentially triggered by specific pipeline actions. ![image](https://github.com/user-attachments/assets/3ea42f09-bd0e-4f5e-8a0a-9e11383e90df) ![image](https://github.com/user-attachments/assets/d5a668ee-6cee-427f-811d-65ddb5d38949) --- ### **Solution** This PR resolves the issue by specifying `ubuntu-22.04` as the runner environment. This uses Gradle 8.10.2, the last known version where workflows passed successfully. See the [Ubuntu 22.04 environment documentation](https://github.com/actions/runner-images/blob/ubuntu24/20241117.1/images/ubuntu/Ubuntu2004-Readme.md) for details. Given this project's upcoming decommissioning, addressing the root cause (Gradle's cache behavior) is unlikely worth the effort. Downgrading the environment provides a practical solution to restore pipeline functionality. Note: of the last [set of successful Secrel pipeline runs](https://github.com/department-of-veterans-affairs/abd-vro-internal/actions?query=workflow%3ASecrel+is%3Asuccess), the [last one to succeed](https://github.com/department-of-veterans-affairs/abd-vro-internal/actions/runs/11815172342) was running [Gradle 8.10.2](https://github.com/department-of-veterans-affairs/abd-vro-internal/pull/450/files) --- ### **Expected Outcome** Once this PR is merged into `develop`, the Secrel pipeline in [abd-vro-internal](https://github.com/department-of-veterans-affairs/abd-vro-internal/actions) should run successfully without errors. Fingers crossed 🤞! --- ### **Notes for Future Investigation** If the project weren't being decommissioned, potential areas for deeper investigation include: - The caching logic around `removeUnusedEntriesOlderThan`. - When and why does Gradle start deleting cached entries in these workflows? - Possible fixes or workarounds for Gradle 8.11+. ---
- Loading branch information