Skip to content

Commit d3a6fa3

Browse files
Add troubleshooting for 'Failed to pack new cache' error (#3419)
* Add troubleshooting for 'Failed to pack new cache' error Added troubleshooting section for 'Failed to pack new cache' error during builds, including description and solution steps. * Refine troubleshooting steps for cache path duplication Consolidate troubleshooting steps for cache path errors and provide YAML example. * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent efc3869 commit d3a6fa3

1 file changed

Lines changed: 34 additions & 1 deletion

File tree

content/troubleshooting/common-issues.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,37 @@ Before modifying client-side configurations, perform maintenance on the server s
184184
- Consider implementing regular repository maintenance as part of your workflow
185185
- Monitor your repository size and perform cleanup periodically
186186

187-
{{< /collapsible >}}
187+
{{< /collapsible >}}
188+
189+
190+
### "Failed to pack new cache" error during builds
191+
192+
###### Description
193+
During a build (cleanup step), you may encounter the following error while the cache is being saved:
194+
195+
```
196+
Failed to pack new cache
197+
```
198+
199+
{{<collapsible title="Solution" id="duplicate-cache-defined-solution" >}}
200+
###### Solution
201+
The most common cause of this error is having duplicate cache paths defined in your workflow configuration.
202+
203+
To resolve this:
204+
- Review your workflow cache configuration and check for duplicate path entries and ensure the same directory is not listed multiple times.
205+
206+
```yaml
207+
workflows:
208+
example-workflow:
209+
cache:
210+
cache_paths:
211+
- ~/.gradle/caches
212+
- ~/.gradle/caches
213+
```
214+
215+
- Remove any duplicate cache path entries.
216+
- Save the workflow configuration and trigger a new build.
217+
218+
After removing duplicate cache paths, the build should complete successfully without the caching error.
219+
220+
{{< /collapsible >}}

0 commit comments

Comments
 (0)