actions / actions/cache

actions/cache@v4 - Error - sometime running into "hashFiles('**/pom.xml') couldn't finish within 120 seconds"

Open
#1,603 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5.6k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Hello team. Would appreciate if you take a look and provide some insights, suggestions or even a fix for the following:

Context: We have about 130 workflows that can run simultaneously. Each workflow might include several parallel jobs.

Issue: time to time we are running into the following issue during the Post Job step of this action (the error does not occur in all jobs, but only in some and randomly):

Post job cleanup.
Error: The template is not valid. ***/cicd-shared-actions/main/.github/actions/run-maven/action.yml (Line: 60, Col: 14): hashFiles('**/pom.xml') couldn't finish within 120 seconds.
Post job cleanup.

main/.github/actions/run-maven/action.yml (Line: 60, Col: 14):

    - name: Cache Maven repository
      if: runner.os == 'Linux' && inputs.maven-cache == 'true'
      uses: actions/cache@v4
      with:
        enableCrossOsArchive: true
        path: ~/.m2/repository
        key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
        restore-keys: |
          ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

What might be a problem here? Thanks in advance

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with .github/actions/run-maven/action.yml at line 60 and review the actions/cache@v4 configuration, especially the hashFiles('**/pom.xml') expressions. Reproduce or investigate the timeout under the reported concurrent workflow load; done means identifying a supported cause and documenting or validating a fix for the intermittent post-job failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.