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

Properly manage the lifetime of Exiters in Daemon Runs #7996

Merged

Conversation

blorente
Copy link
Contributor

@blorente blorente commented Jul 2, 2019

Problem

There is a bug where, once the LocalPantsRunner has reset the global exiter to its own LocalExiter, it won't un-set it ever, and therefore unhandled exceptions will use that exiter to exit.

This has caused issues, around this line, because the LocalPantsRunner reset the global exiter and the DaemonPantsRunner didn't reset it.

There is a regression test to demonstrate this issue.

Solution

Result

The regression test passes, and _log_unhandled_exceptions_and_exit works as expected in DaemonPantsRunner.

Copy link
Contributor

@ity ity left a comment

Choose a reason for hiding this comment

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

I understand the time constraint with this review, so if you want to create a ticket and circle back with the cosmetic changes suggested, that would be completely fine!

@blorente blorente force-pushed the blorente/fix-exiters-and-exceptions branch from dee32d8 to 005c2dc Compare July 24, 2019 16:21
@blorente blorente force-pushed the blorente/fix-exiters-and-exceptions branch from 005c2dc to d9529f8 Compare July 25, 2019 16:10
@blorente
Copy link
Contributor Author

I have made many changes to the PR, so I'd like a fresh review if possible.
Every commit is independently reviewable.

@blorente blorente changed the title Don't use the global exiters in daemon runs Properly manage the lifetime of Exiters in Daemon Runs Jul 25, 2019
Copy link
Member

@stuhood stuhood left a comment

Choose a reason for hiding this comment

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

Thanks a lot! This looks good.

@blorente
Copy link
Contributor Author

Will merge on green.

@blorente blorente merged commit adc9898 into pantsbuild:master Jul 28, 2019
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.

5 participants