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
Build the file list and run linters in parallel #5177
Conversation
7f33a21
to
86d32b2
Compare
/cc @kftsehk :) |
3bd3f70
to
68d0d78
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the size and complexity of these changes, I honestly did more of a skim than an in-depth review of the code changes. But nothing immediately stood out to me besides the two comments attached.
68d0d78
to
ed30871
Compare
@Hanse00 Here's a possible review path:
At this point, you should be left with the three main files to review: linter.sh, buildFileList.sh, worker.sh I'll follow up with another comment, so you can read this in the meantime |
The main idea behind the changes in linter.sh, buildFileList.sh, worker.sh is that when there was a loop, we now have a The main loops to consider are:
Finally, I had to refactor the return code logic a bit to handle three cases so we can properly run our test suite:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciate the additional narration. I'm comfortable approving this.
ℹ️ JFYI for those who will stumble upon this PR wondering why So since the Some refs: |
Proposed changes
Fix #5073
The tasks I parallelized are, by far, the most expensive tasks. We could also parallelize the configuration of linter config files, but that takes a few seconds only.
To implement these changes, I had to refactor things a bit:
.gitleaksignore
because Gitleaks doesn't provide a way to ignore this file. This was causing issues when running tests.bad
andgood
tests. UseFILTER_REGEX_EXCLUDE
andFILTER_REGEX_INCLUDE
instead.Makefile
, and to enable further error checks. I'll reduce duplication even more in a follow up PR.WORKSPACE_PATH
variable. UseGITHUB_WORKSPACE
only to reduce the things to consider.RunAdditionalInstalls
function instead of having them scattered around several places.0
if everything was linted fine,1
if there were errors,2
if there were errors, but some linters reported success.Readiness checklist
In order to have this pull request merged, complete the following tasks.
Pull request author tasks
I added the
Fix #ISSUE_NUMBER
label to the description of the pull request.Super-linter maintainer tasks
breaking
if this change breaks compatibility with the previous released version.automation
,bug
,documentation
,enhancement
,infrastructure
.