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

getting 502 Error while running #301

Closed
sounakchatterjee00 opened this issue Dec 2, 2022 · 14 comments
Closed

getting 502 Error while running #301

sounakchatterjee00 opened this issue Dec 2, 2022 · 14 comments

Comments

@sounakchatterjee00
Copy link

sounakchatterjee00 commented Dec 2, 2022

Error details

Run fkirc/skip-duplicate-actions@master
/home/runner/work/_actions/fkirc/skip-duplicate-actions/master/dist/index.js:4867
const error = new requestError.RequestError(toErrorMessage(data), status, {
^

RequestError [HttpError]: Server Error
at /home/runner/work/_actions/fkirc/skip-duplicate-actions/master/dist/index.js:4867:21
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Job.doExecute (/home/runner/work/_actions/fkirc/skip-duplicate-actions/master/dist/index.js:5550:18) {
status: 502,
response: {
url: 'https://api.github.com/repos/2PiRadLabs/wiredscore-poc/actions/workflows/2253822/runs?per_page=100',
status: 502,
headers: {
connection: 'close',
'content-length': '32',
'content-type': 'application/json',
date: 'Fri, 02 Dec 2022 08:30:03 GMT',
etag: '"6389b58e-20"',
server: 'GitHub.com',
vary: 'Accept-Encoding, Accept, X-Requested-With',
'x-github-request-id': '07C0:30A4:74D17B6:EEA1DE8:6389B780'
},
data: { message: 'Server Error' }
},
request: {
method: 'GET',
url: 'https://api.github.com/repos/2PiRadLabs/wiredscore-poc/actions/workflows/2253822/runs?per_page=100',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit-core.js/3.6.0 Node.js/16.13.0 (linux; x64)',
authorization: 'token [REDACTED]'
},
request: {
agent: Agent {
_events: [Object: null prototype] {
free: [Function (anonymous)],
newListener: [Function: maybeEnableKeylog]
},
_eventsCount: 2,
_maxListeners: undefined,
***Port: 443,
protocol: 'https:',
options: [Object: null prototype] { path: null },
requests: [Object: null prototype] {},
sockets: [Object: null prototype] {},
freeSockets: [Object: null prototype] {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: 'lifo',
maxTotalSockets: Infinity,
totalSocketCount: 0,
maxCachedSessions: 100,
_sessionCache: {
map: {
'api.github.com:443:::::::::::::::::::::': [Buffer [Uint8Array]]
},
list: [ 'api.github.com:443:::::::::::::::::::::' ]
},
[Symbol(kCapture)]: false
},
hook: [Function: bound bound register],
retryCount: 3,
retries: 3,
retryAfter: 16
}
}
}

please look into it

@JeffreyVdb
Copy link

@JeffreyVdb
Copy link

JeffreyVdb commented Dec 2, 2022

❱ gh api -H "Accept: application/vnd.github+json" /repos/xxx/repo/actions/workflows/xxx/runs
{
  "message": "Server Error"
}
gh: Server Error (HTTP 502)

Does not seem related to this action.

@LukasAnda
Copy link

Same error on my end unfortunately

@JeffreyVdb
Copy link

JeffreyVdb commented Dec 2, 2022

I've also confirmed that the workflow ID being used is correct using /repos/{org}/{repo}/actions/workflows. Fetching the ID from the action you want to list runs for and plugging it into the workflow/runs endpoint keeps giving server error.

So conclusion is that it's totally unrelated to this GitHub action.

@LukasAnda
Copy link

I've also confirmed that the workflow ID being used is correct using /repos/{org}/{repo}/actions/workflows. Fetching the ID from the action you want to list runs for and plugging it into the workflow/runs endpoint keeps giving server error.

So conclusion is that it's totally unrelated to this GitHub action.

Okay so how would you propose to solve this issue? It's weird that it suddenly happens over multiple repos using same plugin

@JeffreyVdb
Copy link

I've also confirmed that the workflow ID being used is correct using /repos/{org}/{repo}/actions/workflows. Fetching the ID from the action you want to list runs for and plugging it into the workflow/runs endpoint keeps giving server error.
So conclusion is that it's totally unrelated to this GitHub action.

Okay so how would you propose to solve this issue? It's weird that it suddenly happens over multiple repos using same plugin

The GitHub API is still working for the most part. Most other API calls that I execute are still working, indicating that just a small part is not functional in their system. It's also something that's not super important for GitHub actions to keep working, you could temporarily disable the job that checks for duplicate runs and run the workflow every time, until this is fixed. Most people probably do this already.

We don't really know if it's happening for every single customer in every single region either. Is this going on for enterprise customers, for teams customers, for open source repositories?

It just so happens that this action executes this API call on every single invocation, which also led me here. If I had build my own action, the same thing would have happened.

Best thing to do is contacting GitHub support, which I'm doing.

@paescuj
Copy link
Collaborator

paescuj commented Dec 2, 2022

Looks like GitHub is having the same problems again as already appeared in #287.
After #287 I've implemented a retry logic (see #288) but haven't released it until now.
Can you please update to v5.3.0 and see if this makes the situation a little better?

@estebanhelguero

This comment was marked as duplicate.

@JeffreyVdb
Copy link

I've also tried to execute the API call for a public repository:

$ gh api -H "Accept: application/vnd.github+json" /repos/prometheus/prometheus/actions/workflows/34173787/runs
{
  "message": "Server Error"
}
gh: Server Error (HTTP 502)

@paescuj
Copy link
Collaborator

paescuj commented Dec 2, 2022

NOTE

As already mentioned by others, this issue is not related to skip-duplicate-actions! It seems like GitHub is having some issues at the moment. As suggested by @JeffreyVdb you might want to contact the GitHub support over this.

Also as mentioned in #301 (comment) you might want to try out v5.3.0 of skip-duplicate-actions where a retry logic has been introduced.

Edit: v5.3.0 is now available under the v5 tag.

jishnub added a commit to JuliaApproximation/ApproxFunOrthogonalPolynomials.jl that referenced this issue Dec 2, 2022
This seems broken at the moment (possibly at Github's end) (fkirc/skip-duplicate-actions#301)
@paescuj paescuj added wontfix This will not be worked on and removed wontfix This will not be worked on labels Dec 2, 2022
@fkirc
Copy link
Owner

fkirc commented Dec 2, 2022

Hi folks,

By setting continue-on-error: true, the rest of your workflows should continue as usual, even if skip-duplicate-action fails because of unstable GitHub-APIs.
There is an example in the README with continue-on-error: true.

That being said, I would suggest that we implement a fallback-mode where the Action returns a should_skip: false instead of failing, in case that Github-APIs continues to fail.
The goal for this Action is to simply not skip in case that GitHub-APIs fail.

@paescuj
Copy link
Collaborator

paescuj commented Dec 2, 2022

That being said, I would suggest that we implement a fallback-mode where the Action returns a should_skip: false instead of failing, in case that Github-APIs continues to fail.
The goal for this Action is to simply not skip in case that GitHub-APIs fail.

Good idea 👍

@fkirc
Copy link
Owner

fkirc commented Dec 2, 2022

That being said, I would suggest that we implement a fallback-mode where the Action returns a should_skip: false instead of failing, in case that Github-APIs continues to fail.
The goal for this Action is to simply not skip in case that GitHub-APIs fail.

Good idea 👍

What do you say about something like #302 ?
I did not yet update the JS, but wanted to know your opinion about it

fkirc added a commit that referenced this issue Dec 30, 2022
* Increase robustness in case of GitHub API failures

attempt to mitigate #301
@fkirc
Copy link
Owner

fkirc commented Jan 1, 2023

I merged #302 to enable a graceful exit of this action when GitHub-API fails, please let us know if the problem is still persistent

@fkirc fkirc closed this as completed Jan 1, 2023
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

6 participants