Action sometimes not outputting any results
arifer612 opened this issue · 5 comments
Issue
Dynamic Badges Action sometimes does not create the gist.
Example
A workflow that I used that gave me this problem was this.
What I expected to happen
- Create 5 new gists for each of the Python versions with the message "Testing"
- Perform tests on each of the Python versions
- Overwrites the message of the previously create gists either with "Success" or "Fail' depending on the test result
What actually happened
- Only 2 new gists were created
- All the tests were performed
- Only 1 of the created gists was overwritten. 2 new gists was created. So I am left with 1 gist with the message "Testing" and am missing 1 more gist that I expected
Workflow outcome
Only the gists that were created showed a response output in the logs. The first image below will be the overall workflow progress. Everything checked out just fine. The subsection to this will show screenshots of the responses to Step 1, where only 2 steps produced a non-nil result.
Fig 1. Overall workflow result
Result of Job 1 of the workflow
After Job 1, only badges for Python 3.8 and 3.9 were displayed correctly.
Action producing no results
FIg 2. No result in logs for Python 2.7
Fig 3. No result in logs for Python 3.6
Fig 4. No result in logs for Python 3.7
Action producing results
Fig 5. Non-nil result in logs for Python 3.8
Fig 6. Non-nil result in logs for Python 3.9
Result on the README file
Fig 7. One gist is still missing and another has not been overwritten with the results of the tests
Discussion
I am not sure as to what might be the problem, but if I were to make a guess it would be that these processes might have been too rapidly executed, causing some unexpected hiccups.
Temporary solution
Only a few gists were not created, so it is possible for me to make use of the general idea to manually write gists for the badges with the corresponding `correct' values.
Thank you for the report! Before we look deeper into this, three things which come to my mind:
- The action does not create the gist, this has to be done manually beforehand. It just creates the "file" in the gist.
- I think concurrent updates to one gist may fail. You could try to setup one gist for each job!
- If this doesn't help, you could try using
@master
instead of@v1.0.0
as this will contain #3 which adds printing error messages.
Edit: I just released a v1.1.0
which includes these changes. You can use this as well!
Thank you for replying!
- I miswrote, it is not the gist that is not being created, it is that sometimes the file within the gist that is not being created by the action.
- I actually did that before by having 1 job for 1 gist file creation within the whole workflow (that meant that my first job was split into multiple jobs) and it worked without a single failure. The only problem though however, was that I had to write out the jobs explicitly and I could not make use of the matrix feature, which I felt was a shame.
- I will try using
master
andv1.1.0
and read the logs and hopefully figure out what might the actual problem is!
With the master
branch of the action, the failures are much more verbose and I can finally see that the issue really is due to the rapid POST requests sent to the GitHub server.
Fig 1. Error 500 for when trying to create files in the gist.
Fig 2. Warning received to wait out for available resources.
When there is a push to the branch, there should be ~120 POST requests to generate a (unique) file in the gist but clearly it is too much and a gate is probably set in place to guard against such `attacks'. This is probably why some workflows are asked to wait for resources to be available before being able to proceed.
I will try a different workflow, where the creation of gist files are more `'paced' and see if there is a positive impact overall.
I think I will close this. If there's anything which can be improved on the Action's side, please let me know :)
Yep, I tried various things but I doubt there's anything I can suggest to improve it to fix the issue. I'll let you know if I find something out.