Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup-gradle is not able to use the configuration cache #457

Closed
NikolayMetchev opened this issue Nov 19, 2024 · 4 comments
Closed

setup-gradle is not able to use the configuration cache #457

NikolayMetchev opened this issue Nov 19, 2024 · 4 comments

Comments

@NikolayMetchev
Copy link

I am trying to get configuration cache to work with setup-gradle github action.. but it doesn't seem to be working.

Here is the reason that shows up every time:
Calculating task graph as configuration cache cannot be reused because file '../../../../../../src900954567/src/actions-runner/_work/messaging/messaging/settings.gradle.kts' has been removed.

We are using aws hosted github runners.

The relevant github action setup is as follows:

    - name: Setup Java
      uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
      with:
        distribution: 'corretto'
        java-version: 17
    - name: Setup Gradle
      uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4
      with:
        gradle-version: "wrapper"
        cache-read-only: false
        cache-encryption-key: ${{ inputs.gradle-encryption-key }}
        cache-overwrite-existing: true
        add-job-summary-as-pr-comment: on-failure
        cache-cleanup: never
@bigdaz
Copy link
Member

bigdaz commented Dec 9, 2024

Thanks for the report and apologies for the delayed reply. You are likely running into #21 which makes it tricky to get configuration-cache reuse working.

@NikolayMetchev
Copy link
Author

I did have an included settings build but removing it hasn't fixed the issue. I still get the same problem and I no longer have included builds.

@NikolayMetchev
Copy link
Author

or is the problem that I have logic in buildSrc

@bigdaz
Copy link
Member

bigdaz commented Dec 12, 2024

Yes buildSrc contains outputs that need to be present in order to benefit from config-cache reuse.

Closing as a duplicate of #21

@bigdaz bigdaz closed this as completed Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants