Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Failed to generate URL to download artifact #45

Closed
luisherranz opened this issue Aug 20, 2020 · 8 comments
Closed

Failed to generate URL to download artifact #45

luisherranz opened this issue Aug 20, 2020 · 8 comments

Comments

@luisherranz
Copy link
Contributor

Our GH action is failing with a Failed to generate URL to download artifact error. Both the scheduled action and the PR action fail:

I see yours works fine, so it doesn't seem like a general problem or change in the way GH actions work. Maybe our artifacts got corrupted?

@luisherranz
Copy link
Contributor Author

It's working again without any change on our side: https://github.com/frontity/frontity/pull/541/checks?check_run_id=1011211977

So I guess it was a GitHub problem after all 🙂

@bradennapier
Copy link
Owner

bradennapier commented Aug 21, 2020

Yeah, they have had some issues with actions from time to time. Good - i was just about to look into this :-P glad I didn't have time last night hah.

@mmv08
Copy link

mmv08 commented Dec 9, 2020

In our case, the reason for the error was an expired artifact the action was trying to download. Got it fixed by filtering out artifacts with expired: true: gnosis@d23f68e

Still, a mystery to me why no other repo was affected 🤷‍♂️ Maybe a better solution could be applied because as I understood from reading the source code it should delete artifacts when the PR is closed.

If our solution is feasible, we will create a pr to this repo. Curious to hear your thoughts @bradennapier

@juergba
Copy link

juergba commented Feb 2, 2021

We have the same Failed to generate URL to download artifact error today.

The ESLint action has been working for months on our repo (Mocha), for direct and also for forked PR's.
We have never added any scheduled job.
I hope the error will be gone by tomorrow. I don't really understand what artifact we are talking about and why we are needing one. It can't be a missing read/write token for forked PR's problem, since the action has been working for month without any scheduled job.

@mmv08
Copy link

mmv08 commented Feb 2, 2021

@juergba The problem is that if one of the artifacts is expired, it will fail to download it and throw this error. You can send a GET request to https://api.github.com/repos/{owner}/{repo}/actions/artifacts to check if there are any. In my comment above there's a solution for that which filters expired artifacts. You may also try deleting the artifact: https://github.com/octokit/plugin-rest-endpoint-methods.js/blob/86e3e0e160d87eb016ede46ace087fd60e87121e/docs/actions/deleteArtifact.md

@juergba
Copy link

juergba commented Feb 3, 2021

@mikheevm thank you
What artifact are we talking about? What is the purpose of this thing?
We have eg. issueSummary: false and we aren't using the --fix option.
Why should I have to delete artifacts manually?

Edit: your GET request logs a list of 20 eslint-cache-key-lint-results-Tests* artifacts, all of them expired.

@juergba
Copy link

juergba commented Feb 3, 2021

Anyway why do expired artifacts not get deleted by GH? Below example has expired aprox. one month ago.

{
      "id": 20335434,
      "node_id": "MDg6QXJ0aWZhY3QyMDMzNTQzNA==",
      "name": "eslint-cache-key-state-Tests-4459",
      "size_in_bytes": 43,
      "url": "https://api.github.com/repos/mochajs/mocha/actions/artifacts/20335434",
      "archive_download_url": "https://api.github.com/repos/mochajs/mocha/actions/artifacts/20335434/zip",
      "expired": true,
      "created_at": "2020-10-06T18:40:10Z",
      "updated_at": "2020-10-06T18:40:16Z",
      "expires_at": "2021-01-04T18:35:29Z"
}

@juergba
Copy link

juergba commented Feb 3, 2021

I added a scheduled GH action which I can trigger manually as well. It deletes all expired artifacts.
Failed to generate URL to download artifact is fixed now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants