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!
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!
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.