Description
Describe the problem
The "Manage PRs" GitHub Actions workflow can handle addition or modification of multiple entries in a single PR. It does this by generating a separate job matrix for each of the elements of the submissions
field of arduino/library-registry-submission-parser
's output.
GitHub Actions has a maximum limit of 256 jobs per workflow run (some of which are used up by the non-matrix jobs of the workflow). So if a PR adds or modifies a ridiculous number of jobs, the workflow fails:
Manage PRs: .github#L1
Strategy produced more than 256
While it is unlikely that a valid PR would ever contain this many changes, the design of the workflow is to only fail when there is an unexpected internal system failure. In the case of a PR that does not meet the requirements in some way, the workflow should clearly communicate the problem to the contributor, but still pass.
🐛 Currently the parser may return a larger number of "submissions" than the consuming workflow can handle, which causes the workflow to fail instead of communicating the problem to the contributor.
Hi SOME_USER.
There was an unexpected failure during automated processing of your pull request.
This error is unrelated to the content of your pull request.A maintainer has been notified and will investigate as soon as possible.
To reproduce
- Create a fork of the
arduino/library-registry
repo to use for testing. - Enable GitHub Actions.
- Submit a PR that adds >250 URLs
This could be done by removing that many before submitting the PR to add them back in.
🐛 The workflow fails, with the unexpected-fail
job triggered.
Expected behavior
The number of "submissions" should be checked and an error returned via the error
field of the output if they exceed 240 (this allows for 16 non-matrix jobs in the "Manage PRs" workflow).
arduino/library-registry-submission-parser
version
Additional context
Real life example of this happening: arduino/library-registry#1790
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest build
- My report contains all necessary details