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

[pantsd] Clear the global state of subsystems earlier, plus refactorings #8130

Merged

Conversation

@blorente
Copy link
Contributor

commented Jul 31, 2019

Problem

In DaemonPantsRunner, we were clearing the global options state after we had warmed the v1 graph and ran every v2 rule. This means that those runs were running with potentially old state.

Solution

Move the clearing of Subsystem and related global state to before we compute v2 rules.
This state is re-initialized in LocalPantsRunner.parse_options(), right after clearing.

Commits should be independently reviewable. The first commit are some refactorings unrelated to this change, the second one is the actual change. I deemed this a small enough change to bunch them together.

@blorente blorente requested review from stuhood, wisechengyi and ity Jul 31, 2019

@blorente blorente added the pantsd label Jul 31, 2019

@stuhood

stuhood approved these changes Aug 1, 2019

Copy link
Member

left a comment

Thanks!

@blorente blorente merged commit a63ce2f into pantsbuild:master Aug 1, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@stuhood stuhood added this to the 1.19.x milestone Aug 1, 2019

stuhood added a commit that referenced this pull request Aug 1, 2019

[pantsd] Clear the global state of subsystems earlier, plus refactori…
…ngs (#8130)

**Problem**
In DaemonPantsRunner, we were clearing the global options state after we had warmed the v1 graph and ran every v2 rule. This means that those runs were running with potentially old state.

**Solution**
Move the clearing of Subsystem and related global state to before we compute v2 rules.
This state is re-initialized in LocalPantsRunner.parse_options(), right after clearing.

Commits should be independently reviewable. The first commit are some refactorings unrelated to this change, the second one is the actual change. I deemed this a small enough change to bunch them together.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.