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 auto invalidates pants.ini and all pythonpath of pants #7599

Merged
merged 5 commits into from Apr 22, 2019

Conversation

Projects
None yet
2 participants
@patliu85
Copy link
Contributor

commented Apr 20, 2019

As Stu describes it on #7595

The invalidation globs for pantsd (improved in #5567) can be manually configured to cover everything that is known to cause pantsd to need to restart. But many of the things that should trigger a restart are already known to pants. A partial list:

  1. The content of any configured pants.ini files (due to #7022)
  2. The pythonpath of pants itself (since changes to loose-source plugins mean the code that pantsd is running might have changed)

We should automatically include these values (and likely others!) in the values that we use for --invalidation-globs. In cases where the options values point to files that exist outside of the buildroot, we should consider logging a warning (unless that ends up being too noisy).

@stuhood
Copy link
Member

left a comment

Thanks!

It would be good to add an integration test that touching a pants.ini file restarts the daemon: you can do that by creating an empty/temp file, asking pants to use it with --pants-config-files=$tmpfile, and then removing the file to trigger a shutdown.

Show resolved Hide resolved src/python/pants/pantsd/pants_daemon.py

@patliu85 patliu85 force-pushed the twitter:auto-invalidate-globs branch from 9af4df7 to c4c31e6 Apr 21, 2019

@stuhood
Copy link
Member

left a comment

Thanks!

@stuhood stuhood merged commit bf94f3b into pantsbuild:master Apr 22, 2019

1 check passed

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

@stuhood stuhood deleted the twitter:auto-invalidate-globs branch Apr 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.