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:
- when a keyword is set as a comment in gerrit, zuul starts the job
- the compiler analyzes the change for changed classes and node stanzas in site.pp
- the compiler queries puppetdb to find which hosts have the changed classes applied
- the compiler finds which node stanzas to pick from site.pp
- 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:
- Have the puppet compiler be able to run in multiple instances, with a proper proxy in front
- 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.