burrunan / gradle-cache-action

GitHub Action to properly cache ~/.gradle folder
Apache License 2.0
150 stars 13 forks source link

Latest commit on release branch results in 'TypeError: a.a is not a function' #92

Closed icorbett closed 3 months ago

icorbett commented 3 months ago

The latest commit '43902ec585926d41a3150c775d70a83943e7e18d' on the 'release' branch results in the following error for our projects:

Run burrunan/gradle-cache-action@43902ec585926d41a3150c775d70a83943e7e18d
/home/runner/work/_actions/burrunan/gradle-cache-action/43902ec585926d41a3150c775d70a83943e7e18d/dist/cache-action-entrypoint.js:39456
     return isString(a) ? a.length : a.a();
                                       ^

TypeError: a.a is not a function
    at charSequenceLength (/home/runner/work/_actions/burrunan/gradle-cache-action/43902ec585926d41a3150c775d70a83943e7e18d/dist/cache-action-entrypoint.js:39456:40)
    at protoOf.aa (/home/runner/work/_actions/burrunan/gradle-cache-action/43902ec585926d41a3150c775d70a83943e7e18d/dist/cache-action-entrypoint.js:42386:41)
    at protoOf.ba (/home/runner/work/_actions/burrunan/gradle-cache-action/43902ec585926d41a3150c775d70a83943e7e18d/dist/cache-action-entrypoint.js:42393:87)
    at protoOf.da (/home/runner/work/_actions/burrunan/gradle-cache-action/43902ec585926d41a3150c775d70a83943e7e18d/dist/cache-action-entrypoint.js:42398:25)
    at _.$_$.a (/home/runner/work/_actions/burrunan/gradle-cache-action/43902ec585926d41a3150c775d70a83943e7e18d/dist/cache-action-entrypoint.js:38643:15)
    at protoOf.c7 (/home/runner/work/_actions/burrunan/gradle-cache-action/43902ec585926d41a3150c775d70a83943e7e18d/dist/cache-action-entrypoint.js:36227:29)
    at protoOf.b7 (/home/runner/work/_actions/burrunan/gradle-cache-action/43902ec585926d41a3150c775d70a83943e7e18d/dist/cache-action-entrypoint.js:42178:33)
    at protoOf.f7 (/home/runner/work/_actions/burrunan/gradle-cache-action/43902ec585926d41a3150c775d70a83943e7e18d/dist/cache-action-entrypoint.js:42199:18)
    at resume (/home/runner/work/_actions/burrunan/gradle-cache-action/43902ec585926d41a3150c775d70a83943e7e18d/dist/cache-action-entrypoint.js:44729:22)
    at /home/runner/work/_actions/burrunan/gradle-cache-action/43902ec585926d41a3150c775d70a83943e7e18d/dist/cache-action-entrypoint.js:44196:14

Node.js v20.13.1

They continue to work as expected with the previous release commit '3bf23b8dd95e7d2bacf2470132454fe893a178a1'.

Our most common step definition is:

      - uses: burrunan/gradle-cache-action@3bf23b8dd95e7d2bacf2470132454fe893a178a1
        name: Run unit tests with caching
        env:
          GRADLE_CACHE_PUSH: true
          GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
          GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}
        with:
          # If you have multiple jobs, use distinct job-id in case you want to split caches
          # For instance, jobs with different JDK versions can't share caches
          # RUNNER_OS is added to job-id automatically
          job-id: ${{ github.event.repository.full_name }}-${{ inputs.DD_TARGET }}
          # Specifies arguments for Gradle execution
          # If arguments is missing or empty, then Gradle is not executed
          arguments: ${{ inputs.GRADLE_TASK }} -Pdd-civisibility
          # Gradle version to use for execution:
          #   wrapper (default), current, rc, nightly, release-nightly, or
          #   versions like 6.6 (see https://services.gradle.org/versions/all)
          gradle-version: wrapper

I'm happy to provide any more insight that I can however troubleshooting this further without guidance is not familiar territory for me.

vlsi commented 3 months ago

`Could you please try the latest release branch as of c15634bb25b7284dc084f38dff4e838048b7feaf ?

icorbett commented 3 months ago

Thank you @vlsi, changing the step definition as follows appears to have resolved our issue!

      - uses: burrunan/gradle-cache-action@c15634bb25b7284dc084f38dff4e838048b7feaf
        name: Run unit tests with caching
        env:
          GRADLE_CACHE_PUSH: true
          GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
          GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}
        with:
          # If you have multiple jobs, use distinct job-id in case you want to split caches
          # For instance, jobs with different JDK versions can't share caches
          # RUNNER_OS is added to job-id automatically
          job-id: ${{ github.event.repository.full_name }}-${{ inputs.DD_TARGET }}
          # Specifies arguments for Gradle execution
          # If arguments is missing or empty, then Gradle is not executed
          arguments: ${{ inputs.GRADLE_TASK }} -Pdd-civisibility
          # Gradle version to use for execution:
          #   wrapper (default), current, rc, nightly, release-nightly, or
          #   versions like 6.6 (see https://services.gradle.org/versions/all)
          gradle-version: wrapper