-
-
Notifications
You must be signed in to change notification settings - Fork 277
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 problem with Open3.popen3
where confirm_documentation
task never finishes waiting for child processes
#1979
Conversation
8eee0ac
to
9e2ecd9
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.
I think I need some more explanation of each commit in this PR.
@bquorning Updated PR description. How do you like it? |
memo) Perhaps without this support, the |
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.
I didn’t know about the deadlock problem with popen3
, but it makes perfect sense now that you mention it.
There’s a few problems with your PR (stdin is in fact stdout, and we get a status object returned, not a process – which means we can call #success?
on it.
I would also suggest that we don’t raise
at the end of the task, but just exit
with an error status.
…ver finishes waiting for child processes see: https://github.com/rubocop/rubocop-rspec/actions/runs/11360936578/job/31599655573
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.
One nitpick
Thank you!
I yet to dive into the pr description to understand why this suddenly started happening in the first place
We run out of IO buffer and deadlock the process when there are too many errors. |
But yes, why did the task suddenly start failing? Did something change in rubocop master branch? |
I think it's because the following change made the header links to be output, and there were a lot of diffs for |
Thank you! ❤️ |
Similar to rubocop/rubocop-rspec#1979
see: https://github.com/rubocop/rubocop-rspec/actions/runs/11360936578/job/31599655573
This PR is composed of the following three commits:
1. Fix problem with
Open3.popen3
whereconfirm_documentation
task never finishes waiting for child processes 799df91It freezes at confirm_documentation as follows:
The documentation for
Open3.popen3
described the following:Refs: https://www.rubydoc.info/stdlib/open3/Open3.popen3
Perhaps, but the following deadlock conditions were present.
2. Improve confirm_documentation task to display out-of-sync documentation e6ccc37
This is a change to output what is the difference when the
confirm_documentation
task fails and prompts you to runrake generate_cops_documentation
but you have not made any changes that affect the documentation.I actually got confused when using ruby 3.4.0dev because I forgot that the hash format had changed as follows
https://github.com/rubocop/rubocop-rspec/pull/1974/files
3. bundle exec rake generate_cops_documentation 9e2ecd9
This is a change that only updates the documentation. using
rake generate_cops_documentation
Without this, CI will fail.
Before submitting the PR make sure the following are checked:
master
(if not - rebase it).CHANGELOG.md
if the new code introduces user-observable changes.bundle exec rake
) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).If you have created a new cop:
config/default.yml
.Enabled: pending
inconfig/default.yml
.Enabled: true
in.rubocop.yml
.VersionAdded: "<<next>>"
indefault/config.yml
.If you have modified an existing cop's configuration options:
VersionChanged: "<<next>>"
inconfig/default.yml
.