Page MenuHomePhabricator

'puppet parser validate' does not catch common typos
Closed, DeclinedPublic

Description

Author: guido.iaquinti

Description:
gerrit change 107037

the first patch contain a not valid puppet manifest:

modules/generic/manifests/upstart_job.pp
line 13:
wner => 'root',
instead of
owner => 'root',

it could be useful if we try to understand why the build passed


Version: wmf-deployment
Severity: normal

Details

Reference
bz59980

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:41 AM
bzimport set Reference to bz59980.
bzimport added a subscriber: Unknown Object (MLST).

The Jenkins job operations-puppet-validate is running the command 'puppet parser validate' on each .pp file. That command does not detect such issue:

$ echo "file { '/tmp/foo': wner => 'root' }"|puppet parser validate; echo $?
0
$

So that is valid as far as puppet parser is concerned.

Such issue might be caught by compiling the catalog, I am not sure how we can achieve that though.

Rephrased summary.

guido.iaquinti wrote:

That wouldn't get picked up because it's valid syntax. The only solution is compile it on all nodes, get the output and diff it with the previous one (and check if all the diff are expected). Not so easy to implement

Closing bug, we can not really catch such issues :/