actions / cache

Cache dependencies and build outputs in GitHub Actions
MIT License
4.37k stars 1.16k forks source link

The template is not valid. hashFiles('**/pom.xml') couldn't finish within 120 seconds. #1246

Open maliankurh opened 9 months ago

maliankurh commented 9 months ago

Hello All,

We are using actions/cache@v3 actions into our GH actions workflows and once in a while we are seeing the below error

The template is not valid. hashFiles('**/pom.xml') couldn't finish within 120 seconds.

Below is the snippet for the workflow we are using for maven cache

Do we have any solution for this issue? Do we need to add any additional parameters to fix this issue?

Thanks, Ankur

aborrmann commented 9 months ago

Hi there, since last week we have a similar error in our build. It seems that the previous action which does the caching "Cache ..." does not work properly, leading to this error.

From the debug logs: `##[debug]Resource Url: https://acghubeus1.actions.githubusercontent.com/QrFRIKu2St1dRQxabUrHA6AAMeapxMftaIcBKJhakbQFojNTDH/_apis/artifactcache/cache?keys=Linux-build-cache-node-modules-%2CLinux-build-cache-node-modules-%2CLinux-build-%2CLinux-&version=f6b82261ae6298f38550749ae1cf6747b551dd0f79b6566132088f08c5e47438

[debug]getCacheEntry - Attempt 1 of 2 failed with error: Request timeout: /QrFRIKu2St1dRQxabUrHA6AAMeapxMftaIcBKJhakbQFojNTDH/_apis/artifactcache/cache?keys=Linux-build-cache-node-modules-%2CLinux-build-cache-node-modules-%2CLinux-build-%2CLinux-&version=f6b82261ae6298f38550749ae1cf6747b551dd0f79b6566132088f08c5e47438

[debug]Resource Url: https://acghubeus1.actions.githubusercontent.com/QrFRIKu2St1dRQxabUrHA6AAMeapxMftaIcBKJhakbQFojNTDH/_apis/artifactcache/cache?keys=Linux-build-cache-node-modules-%2CLinux-build-cache-node-modules-%2CLinux-build-%2CLinux-&version=f6b82261ae6298f38550749ae1cf6747b551dd0f79b6566132088f08c5e47438

[debug]getCacheEntry - Attempt 2 of 2 failed with error: Request timeout: /QrFRIKu2St1dRQxabUrHA6AAMeapxMftaIcBKJhakbQFojNTDH/_apis/artifactcache/cache?keys=Linux-build-cache-node-modules-%2CLinux-build-cache-node-modules-%2CLinux-build-%2CLinux-&version=f6b82261ae6298f38550749ae1cf6747b551dd0f79b6566132088f08c5e47438

Warning: Failed to restore: getCacheEntry failed: Request timeout: /QrFRIKu2St1dRQxabUrHA6AAMeapxMftaIcBKJhakbQFojNTDH/_apis/artifactcache/cache?keys=Linux-build-cache-node-modules-%2CLinux-build-cache-node-modules-%2CLinux-build-%2CLinux-&version=f6b82261ae6298f38550749ae1cf6747b551dd0f79b6566132088f08c5e47438`

Curling this given url from our runners runs into a timeout, the given url is not answering.

Could possibly being the same as this bug.

What do you see in the logs from the "Cache ..."-step?

GRA0007 commented 3 months ago

We're also seeing this error pop up occasionally, and it should fail gracefully rather than causing the action to fail.