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

Artifacts exceeded limits #59

Open
craig-dae opened this issue Mar 5, 2020 · 11 comments
Open

Artifacts exceeded limits #59

craig-dae opened this issue Mar 5, 2020 · 11 comments

Comments

@craig-dae
Copy link

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!

@MJomaa
Copy link

MJomaa commented Mar 6, 2020

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

@yacaovsnc
Copy link
Contributor

Is this still an issue?

@craig-dae
Copy link
Author

@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?

@dig
Copy link

dig commented Jun 12, 2020

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.

@craig-dae
Copy link
Author

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.

@ahdbilal
Copy link

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!

@ThiefMaster
Copy link

ThiefMaster commented Feb 8, 2021

@ahdbilal Would it be possible to have retention periods below one day? For the Passing data between jobs in a workflow usecase a few minutes would be more than enough, or even better a "until run finished" retention where the artifact gets deleted immediately after the job finished.

@typelogic
Copy link

typelogic commented Feb 1, 2022

Use the retention-days: 2 in actions/upload-artifact@v1 so there is no more need to do any deletion

@ankush-custiv
Copy link

ankush-custiv commented Aug 22, 2022

I have purged all my artifacts using olpav/purge-artifacts-action@v1 (github api gives artifact count as 0), still getting the same error and hence my workflow is blocked. Anyone else faced this ?

@StephenHodgson
Copy link

StephenHodgson commented Dec 13, 2022

I'm wondering if upload artifact could just work like the cache, where it will delete the oldest instead of preventing the upload of a new artifact.

I also ran into this and manually deleted everything but kept getting this error for days after.

@p0358
Copy link

p0358 commented Apr 5, 2023

I'm wondering if upload artifact could just work like the cache, where it will delete the oldest instead of preventing the upload of a new artifact.

Though such feature should probably be opt-in to not catch people off-guard, and also per-repo, so it doesn't delete for example latest artifact from another repo that you might still need

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

10 participants