-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fix file permissions error in style-files
pre-commit hook
#244
Merged
jeancochrane
merged 5 commits into
master
from
jeancochrane/fix-file-permissions-error-for-style-files-pre-commit-hook
May 29, 2024
Merged
Fix file permissions error in style-files
pre-commit hook
#244
jeancochrane
merged 5 commits into
master
from
jeancochrane/fix-file-permissions-error-for-style-files-pre-commit-hook
May 29, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tagging @wagnerlmichael in here in case you are interested in knowing more about this fix! |
This was referenced May 28, 2024
jeancochrane
added a commit
to ccao-data/assessr
that referenced
this pull request
May 28, 2024
This PR implements the same change as ccao-data/model-res-avm#244 in order to fix the same bug in the `pre-commit` workflow. See that PR for more background on this change. I didn't test timing for serial execution vs parallel execution in the same way that I did in ccao-data/model-res-avm#244 and ccao-data/model-condo-avm#49 since the results of those two PRs have me convinced that serial execution is likely better and at least no worse.
wrridgeway
approved these changes
May 28, 2024
jeancochrane
added a commit
to ccao-data/assessr
that referenced
this pull request
May 29, 2024
* Fix file permissions error in `style-files` pre-commit hook This PR implements the same change as ccao-data/model-res-avm#244 in order to fix the same bug in the `pre-commit` workflow. See that PR for more background on this change. I didn't test timing for serial execution vs parallel execution in the same way that I did in ccao-data/model-res-avm#244 and ccao-data/model-condo-avm#49 since the results of those two PRs have me convinced that serial execution is likely better and at least no worse. * Update precommit R hooks to a more recent version
jeancochrane
deleted the
jeancochrane/fix-file-permissions-error-for-style-files-pre-commit-hook
branch
May 29, 2024 14:15
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the intermittent errors we see in the
style-files
hook of thepre-commit
workflow by settingrequire_serial
totrue
for the hook our pre-commit config. This config value prevents pre-commit from running in parallel, which is the root cause of the error.This change also has the nice side effect of decreasing the runtime of the hook. See here for a workflow run that times
style-files
when run in parallel (real clock time 5.6s) and here for a workflow run that times it when run serially (real clock time 2.4s). These timings are consistent with what I saw locally, so I think the numbers are solid. My guess is that we have few enough R files in the repo such that the overhead of forking the process outweighs the benefit of styling multiple files in parallel.