The puppet compiler is very useful, but ATM its utility is limited by the fact we cannot know automatically which servers to check when a change is introduced. Also, it cannot be triggered directly from gerrit for this exact reason.
Given the added value that PCC gives us, we should aim in making it easy to trigger a comprehensive run from gerrit.
Ideally, this could be automated in the following way:
1) when a keyword is set as a comment in gerrit, zuul starts the job
2) the compiler analyzes the change for changed classes and node stanzas in site.pp
3) the compiler queries puppetdb to find which hosts have the changed classes applied
4) the compiler finds which node stanzas to pick from site.pp
5) the compiler runs and the results are linked by jenkins-bot on the gerrit task
In order to do that we need the following things:
[x] Have the puppet compiler be able to run in multiple instances, with a proper proxy in front
[x] Have the puppet compiler be able to query puppetdb (this might need a move to production given the sensitivity of the queries)
[] Implement the node selection via puppetdb.