voxpupuli / puppet-catalog_diff

📄↔📄 A tool to diff Puppet catalogs
https://forge.puppet.com/modules/puppet/catalog_diff/readme
Apache License 2.0
14 stars 16 forks source link

catalog diff should set non-zero error code when evaluates a broken catalog #45

Open vchepkov opened 3 years ago

vchepkov commented 3 years ago

Even though problems with catalog are found, puppet catalog diff returns 0 as error code:

# puppet catalog diff puppet.example.com/development puppet.example.bnaint.com/fix_loop --certless --show_resource_diff
Notice: Add --debug for realtime output, add --render-as {json,yaml} for parsed output
Error: Unable to compile catalog for node1.example.com
    Error parsing json output of puppet catalog query for node1.bnaint.com: source 'Internal Server Erro' not in PSON!. Content: Internal Server Error: org.jruby.exceptions.RuntimeError: (PreformattedError) Evaluation Error: Resource type not found: Bwip::Rails_app (file: /etc/puppetlabs/code/environments/development/modules/bpub/manifests/bwip.pp, line: 39, column: 21) on node pubdevx-opns102.bnaint.com
Error: Unable to compile catalog for node2.example.com
    Error parsing json output of puppet catalog query for node2.example.com: source 'Internal Server Erro' not in PSON!. Content: Internal Server Error: org.jruby.exceptions.RuntimeError: (PreformattedError) Evaluation Error: Resource type not found: Bwip::Rails_app (file: /etc/puppetlabs/code/environments/development/modules/bpub/manifests/bwip.pp, line: 39, column: 21) on node pubdevx-opns202.bnaint.com
Notice: Add --debug for realtime output, add --render-as {json,yaml} for parsed output
Error: Missing partner catalog for node1.example.com.pson
Error: Missing partner catalog for node2.example.com.pson
....
# echo $?
0
vchepkov commented 3 years ago

also, if catalog has a dependency cycle, tool doesn't produce any indication of a failure

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

vchepkov commented 3 years ago

hmm. one way to close the tickets

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

vchepkov commented 3 years ago

ping

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

vchepkov commented 2 years ago

ping

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.