actions / setup-go

Set up your GitHub Actions workflow with a specific version of Go
MIT License
1.41k stars 531 forks source link

caches grow unbounded #447

Closed schmidtw closed 10 months ago

schmidtw commented 11 months ago

Description: In a Github Enterprise account the caches are growing in an unbounded manor. I don't see this problem on open source Github accounts.

image

Action version: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0

Platform:

Runner type:

Tools version: 1.21.5

Repro steps: We run a workflow with the following configuration:

      - name: Setup go version
        uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
        with:
          go-version: ${{ inputs.go-version }}
          check-latest: ${{ inputs.go-version-latest }}
          cache-dependency-path: ${{ inputs.working-directory }}

This results in several hundred MB of cached objects to be created with unique names and never cleaned up.

Expected behavior: Only a few cached objects will be created and used, alternatively allow cached objects to be better configured since we have to pay for the storage.

Actual behavior: Each time we setup-go in a build (which can be 3-4 different jobs) creates duplicate caches that appear to never be reused or cleaned up when in an enterprise context.

marko-zivic-93 commented 11 months ago

Hello @schmidtw
Thank you for creating this issue. We will investigate it and come back to you with our findings.

priyagupta108 commented 11 months ago

Hello @schmidtw Thanks for reporting this. I could not reproduce the issue on my end. Could you please provide us more details, specifically, how often updates are being made to your go.mod and go.sum files?

priyagupta108 commented 10 months ago

Hi @schmidtw, just a gentle reminder about the details we asked for earlier. Thanks!

aparnajyothi-y commented 10 months ago

Hi @schmidtw, just a gentle reminder about the details we asked for earlier. Thanks!

priyagupta108 commented 10 months ago

Hello @schmidtw, Due to inactivity on this issue, I am going to proceed with closing it. Please feel free to reopen the issue if necessary, or create a new one. Thank you :)

peterbourgon commented 6 months ago

See #478