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

HTTP 403 error during GitHub action #1201

Open
JakeQZ opened this issue Dec 27, 2022 · 10 comments
Open

HTTP 403 error during GitHub action #1201

JakeQZ opened this issue Dec 27, 2022 · 10 comments
Labels

Comments

@JakeQZ
Copy link
Contributor

JakeQZ commented Dec 27, 2022

This has happened twice now on the weekly CI build:

In the first instance, re-running the job resulted in successful completion. I have not bothered to re-run the 2nd failed job. But it successfully completed a week ago (note these two failures are two weeks apart, and the job is run weekly) and there have been no commits since.

I have an open ticket with GitHub regarding this, which I will be unable to cross-link.

@JakeQZ
Copy link
Contributor Author

JakeQZ commented Dec 27, 2022

I have an open ticket with GitHub regarding this, which I will cross-link.

That was actually closed. I've reopened it. But cross-linking with GitHub tickets doesn't seem to work anyway.

@oliverklee oliverklee added the bug label Dec 27, 2022
@JakeQZ
Copy link
Contributor Author

JakeQZ commented Jan 1, 2023

I posted an update here but it has vanished or been deleted. So here it is again, roughly. The below is a quote.


From the two run examples you shared in the linked issue, I'm seeing that these requests didn't get far and 403'd pretty much immediately. I'm not seeing any additional info in our internal tooling beyond the request ending at a 403 status - and that the request looks to be unauthenticated (which is okay since the targets are public, but it may lead to some rate limiting for unauthenticated requests).

I noticed that the workflow is using phive to install. To be on the consistent-side with avoiding any rate-limiting or authentication issues when the install command calls GitHub APIs, I see that the maintainers of phive stated you can pass an authentication token through an environment variable GITHUB_AUTH_TOKEN.

References:
phar-io/phive#384
phar-io/phive#127

Adjusting these pieces of your workflow to add the GITHUB_TOKEN value to a GITHUB_AUTH_TOKEN var in the step's env key should help avoid any further 403's - and if more do appear, please share and we can re-investigate:

- name: Install development tools
   env:
      GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
   run: phive --no-progress install --trust-gpg-keys ...

@JakeQZ
Copy link
Contributor Author

JakeQZ commented Feb 6, 2023

Another failure today. I would attach the evidence, but

github-unsupported-attachment

@oliverklee
Copy link
Contributor

These errors happens either due to network problems or due to downtime of one of the affected servers/services. As long as they happen only every now and then, I propose we restart the corresponding check and otherwise ignore those failures.

@JakeQZ
Copy link
Contributor Author

JakeQZ commented Feb 6, 2023

These errors happens either due to network problems or due to downtime of one of the affected servers/services.

According to the above, the problems occur due to deliberate rate-limiting by GitHub, not a network failure or downtime. See the referenced Phive issues.

As long as they happen only every now and then

The problem seems to occur on something approaching 50% of all CI build runs. It's not a one-off. (I think I am getting all the notifications because recently I've usually committed the latest change, through reviewing and approving changes, though I've not actually made the change myself.)

@oliverklee
Copy link
Contributor

Ah, thanks, I see. Then we probably need to configure something.

@JakeQZ JakeQZ changed the title HTTP 403 error downloading 'Composer Normalize' during GitHub action HTTP 403 error during GitHub action Feb 6, 2023
@JakeQZ
Copy link
Contributor Author

JakeQZ commented Feb 6, 2023

we probably need to configure something.

The suggestion above using GITHUB_AUTH_TOKEN in the YAML may do the trick.

@JakeQZ
Copy link
Contributor Author

JakeQZ commented Feb 6, 2023

The suggestion above using GITHUB_AUTH_TOKEN in the YAML may do the trick.

Though some comments in the linked Phive issues suggest doing so may introduce a security vulnerability. I have not fully understood the implications.

@JakeQZ
Copy link
Contributor Author

JakeQZ commented Mar 6, 2023

Not even the correct HTTP response.

It should be something like 429 Too Many Requests.

Though expecing Microsoft to get it right is probably too much to ask for.

@JakeQZ
Copy link
Contributor Author

JakeQZ commented Jun 26, 2023

I cannot work with this rubbish platform. I would like to attach a .eml file to illustrate the problem, but I am not allowed to to so, perhaps on the stupid basis of legacy DOS file extensions. These files are text-only email transcripts and not by default opened by a code interpreter. I mean: really?!?

crap

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

No branches or pull requests

2 participants