Skip to content
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

Add feature to retry process killing after specified duration #208

Merged
merged 51 commits into from Jun 1, 2019

Conversation

zokker13
Copy link
Contributor

@zokker13 zokker13 commented Apr 28, 2019

Hi,

this PR fixes #105.
I'm wondering if the approach is good. If so, I'll add tests.

Personally, I'm not sure about the options parameter. It seems odd to be forced pass a parameter for the timeout but at the same time it's fine since there's a default value in the code.

Copy link
Collaborator

@ehmicky ehmicky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR @zokker13.

Sorry for the verbosity of the review!

Also at the end, don't forget to:

  • add tests.
  • make sure CI is passing.
  • update the documentation.

Thanks!

index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
@zokker13
Copy link
Contributor Author

@ehmicky Thanks or the review. I implemented some changes, feel free to check them out again.
The CI seems to hate me - sometimes it works, sometimes not. I'll add docs/tests if you like the changes and deem them worthy.

index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
@ehmicky
Copy link
Collaborator

ehmicky commented Apr 29, 2019

Looks good to me! We need a review from @sindresorhus as well.

I added two minor suggestions. It does not look like CI has failed, so all good there :)

Thanks for this PR again! 🎉 🎉 🎉

@zokker13
Copy link
Contributor Author

zokker13 commented May 1, 2019

@ehmicky Implemented some more changes and added documentation. I have problems with the tests though. Maybe it's too early for me. Could have take a look if you have time?
8d06a6c

readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
@ehmicky
Copy link
Collaborator

ehmicky commented May 3, 2019

@zokker13 thanks for this new batches of updates! Hopefully we can merge this soon! 🎉 🎉

@zokker13
Copy link
Contributor Author

zokker13 commented May 5, 2019

@ehmicky Ready for another attempt ^^

index.js Outdated Show resolved Hide resolved
@ehmicky
Copy link
Collaborator

ehmicky commented May 5, 2019

Thanks! I think I figured out the problem with your test, see my comment. Also I added a suggestion for another test. And there are some linting issue with the fixture file. Thanks for holding on :)

@zokker13
Copy link
Contributor Author

zokker13 commented May 5, 2019

Thanks for finding that detail! I'm ready for anothr go :)

test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
@ehmicky
Copy link
Collaborator

ehmicky commented May 5, 2019

The tests are failing on CI for Windows.

From looking at the commit history, it started failing on Windows after adding the ipc option and waitForProcessLaunch().

@zokker13
Copy link
Contributor Author

zokker13 commented May 5, 2019

I think the ipc change is just the bad messenger since the tests never truly reported what's really there. I'll make a quick cross check with normal stdout as trigger tomorrow evening.

@zokker13 zokker13 force-pushed the feature/retry_process_kill branch from ca5532c to 756cb78 Compare May 27, 2019 19:03
@zokker13
Copy link
Contributor Author

@ehmicky wow, I was finally able to rebase master in here so you may check it out again.
git rebase --preserve-merges is truly a blessing. <3

@ehmicky
Copy link
Collaborator

ehmicky commented May 27, 2019

Rebase looks good :)

@zokker13
Copy link
Contributor Author

zokker13 commented Jun 1, 2019

@ehmicky what else is needed to have it merged?

@sindresorhus sindresorhus merged commit 0bd5596 into sindresorhus:master Jun 1, 2019
@sindresorhus
Copy link
Owner

Looks good now :)

@ehmicky
Copy link
Collaborator

ehmicky commented Jun 1, 2019

Thanks a lot @zokker13!

I hope the code review process was not too tedious for you!

@zokker13
Copy link
Contributor Author

zokker13 commented Jun 1, 2019

It was okay. I didn't expect so much back and forth but that means people care for the package/feature so it's a good thing :)

@ehmicky
Copy link
Collaborator

ehmicky commented Jun 1, 2019

Yes execa is used directly or indirectly by 2 million GitHub repositories so changes need extra care. I hope this was not too tedious, especially having to rebase.

This feature is great, thanks a lot for the effort put into it!

@zokker13
Copy link
Contributor Author

zokker13 commented Jun 1, 2019

Ya, the usage is pretty overwhelming.
But rebasing is fun and good practice I think. Once you figure it out that is ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When killing a process, ensure it was killed
4 participants