Skip to content
This repository has been archived by the owner on Feb 6, 2025. It is now read-only.

Purge expired artifacts #867

Merged
merged 4 commits into from
Sep 16, 2021
Merged

Purge expired artifacts #867

merged 4 commits into from
Sep 16, 2021

Conversation

luisherranz
Copy link
Member

What:

Purge the expired artifacts.

Why:

Because the Eslint GH action is failing a lot lately and it seems like expired artifacts can be the cause, acording to this issue: bradennapier/eslint-plus-action#45.

How:

By adding a previous step in the Eslint GH action that purges the expired artifacts before eslint runs.

Tasks:

  • GH action

Unrelated Tasks

  • TSDocs
  • TypeScript
  • Unit tests
  • End to end tests
  • TypeScript tests
  • Update starter themes
  • Update other packages
  • Update community discussions
  • Add a changeset (with link to its Feature Discussion if it exists)

Additional Comments

Before running eslint, because it seems to fail if there are any expired artifacts.
@luisherranz luisherranz self-assigned this Sep 16, 2021
@changeset-bot
Copy link

changeset-bot bot commented Sep 16, 2021

⚠️ No Changeset found

Latest commit: 5a37b17

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Because the first purge pass hit the rate limit.
@luisherranz luisherranz removed the request for review from SantosGuillamot September 16, 2021 09:41
@luisherranz
Copy link
Member Author

I keep hitting the rate limit. I'll wait a while and retrigger the purge action again.

@luisherranz
Copy link
Member Author

It seems like there are many artifacts, so maybe it'd be better to merge this and let it run each 15 minutes until they are all gone.

@SantosGuillamot, would mind taking a look and approving this PR? Thanks.

@luisherranz luisherranz marked this pull request as ready for review September 16, 2021 10:31
@SantosGuillamot
Copy link
Member

I've seen that in the GitHub action you added, LKP-RnD/purge-expired-artifacts-action@v4, they mention as a common issue this:

"If you have thousands of expired artifacts the action won't be able to delete everything in one go as githubs API has a rate limit. However, if you run it on a schedule as in the example every other hour you will eventually come to a point where the script will have cleared most unused artifacts and this will no longer cause problems."

Checking the repo in GitHub artifacts API, it seems that there are 4583. So I guess this could be the problem.

I guess we have to remove the artifacts manually or, as they suggest, implement a CRON workflow triggering the action you added.

@luisherranz
Copy link
Member Author

I guess we have to remove the artifacts manually or, as they suggest, implement a CRON workflow triggering the action you added.

The CRON is already set up for this action. That is the reason I thought we may just merge this and let it fun each 15 minutes until they are all gone 🙂

@SantosGuillamot
Copy link
Member

It seems like there are many artifacts, so maybe it'd be better to merge this and let it run each 15 minutes until they are all gone.

Oh, I was just writing my answer 🙂 . Triggering it removed like 300 artifacts, so we'll need it to run a few times until all of them are deleted.

@SantosGuillamot, would mind taking a look and approving this PR? Thanks.

Sure, I was already on it. Approving it 👍

Copy link
Member

@SantosGuillamot SantosGuillamot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@luisherranz
Copy link
Member Author

Haha, ok, we were talking about the same at the same time 😄

Thanks Mario, I'll merge it now and I'll keep an eye on the action runs after that.

@luisherranz luisherranz merged commit 653db69 into dev Sep 16, 2021
@luisherranz luisherranz deleted the purge-expired-artifacts branch September 16, 2021 10:35
@luisherranz
Copy link
Member Author

BTW, these are the action run by the workflow each 15 min: https://github.com/frontity/frontity/actions/workflows/eslint.yml

@SantosGuillamot
Copy link
Member

BTW, these are the action run by the workflow each 15 min: https://github.com/frontity/frontity/actions/workflows/eslint.yml

I saw it in the changed files, thanks Luis 🙂

Btw, I think I can trigger it manually until the artifacts are gone. There are 3884 left -> https://api.github.com/repos/frontity/frontity/actions/artifacts

@luisherranz
Copy link
Member Author

@luisherranz luisherranz mentioned this pull request Sep 21, 2021
11 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants