Upload-artifact: Artifacts exceeded limits

Created on 5 Mar 2020  路  6Comments  路  Source: actions/upload-artifact

We just started getting Cannot upload artifacts. You may have exceeded your spending limit for storing artifacts with Actions or Packages.

We have an artifact that takes about 5 minutes to produce, which is fed into a job that spins up multiple containers than run in parallel. The artifacts are only needed to feed these boxes, and can be removed after.

After 1 day, we started getting the message I wrote above. I have deleted every artifact I could find manually. Then I ran this action here that says it purged all my artifacts: https://github.com/kolpav/purge-artifacts-action

Clicking through as many previous workflows as I could, I found no examples of existing artifacts.

I continue to the get above message, and all merging has stopped on our project.

I need to know how to manage my artifacts so this doesn't happen again, and get my pipeline back up asap.

Thanks!

Most helpful comment

I, personally, would prefer some kind of FIFO for artifacts. Maybe specify an optional limit for a pipeline, in case you have multiple pipelines. Once you hit the limit for a specific pipeline, it starts deleting old artifacts.

In my pipeline, I have one action to build an artifact, and a second set of parallel actions to consume it. After that, the artifact has no value anymore, unless I'm debugging an issue that requires me to download the artifact and inspect it. 99% of the time, artifacts outlive their usefulness within a few seconds of being created.

All 6 comments

Was the same here. You need to wait a few hours until they get purged. Seems like GitHub scans the storage space periodically.

Is this still an issue?

@yacaovsnc Thanks for getting back to me. I solved this by using kolpav/purge-artifacts-action@v1

      - name: Clear artifacts
        uses: kolpav/purge-artifacts-action@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          expire-in: 1hr

This seems to keep my artifacts in check. Has this issue been fixed? Can I remove kolpav/purge-artifacts-action@v1 or do I need to keep it in?

Would be nice if we could define expire-in for upload-artifact. I've solved this by using kolpav/purge-artifacts-action@v1 for now.

I, personally, would prefer some kind of FIFO for artifacts. Maybe specify an optional limit for a pipeline, in case you have multiple pipelines. Once you hit the limit for a specific pipeline, it starts deleting old artifacts.

In my pipeline, I have one action to build an artifact, and a second set of parallel actions to consume it. After that, the artifact has no value anymore, unless I'm debugging an issue that requires me to download the artifact and inspect it. 99% of the time, artifacts outlive their usefulness within a few seconds of being created.

You can now change artifact and log retention duration either through Actions Settings tab or via YAML. You can learn more about this feature here. Feedback is welcome!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Niceplace picture Niceplace  路  5Comments

themakshter picture themakshter  路  4Comments

luna-kx picture luna-kx  路  5Comments

davidmoremad picture davidmoremad  路  6Comments

zakkak picture zakkak  路  7Comments