puppet-catalog-diff icon indicating copy to clipboard operation
puppet-catalog-diff copied to clipboard

The content_diff and show_resource_diff options can't be turned off

Open natemccurdy opened this issue 9 years ago • 3 comments

It seems that --content_diff and --show_resource_diff can't be turned off.

The flags are available to set, but they aren't used in the code anywhere.

This causes problems when creating diff reports with a huge amount of changes as the report can be extremely large and un-processable

natemccurdy avatar Oct 14 '15 03:10 natemccurdy

For what it's worth the --show_resource_diff option works fine for me.

alex-harvey-z3q avatar Jan 04 '16 11:01 alex-harvey-z3q

@alexharv074 Do you mean that, when you don't use the --show_resource_diff flag, you correctly don't see any resource differences?

My issue is not that the flags don't work, but that they can't be turned off.

natemccurdy avatar Jan 04 '16 21:01 natemccurdy

@natemccurdy If I run a diff without this option I'll see something like:

Differences in old:
        Logstash::package::install[logstash]:

        logstash::package::install{"logstash":
             package_url => "http://packages.mydomain.com/prod1/nexus/thirdparty/linux/logstash-1.4.1-1_bd507eb.noarch.rpm"
        }

If I add the --show_resource_diff option this output changes to:

Differences as diff:
        Logstash::package::install[logstash]
        logstash::package::install{"logstash":
-            package_url => "http://packages.mydomain.com/uat1/nexus/thirdparty/linux/logstash-1.4.1-1_bd507eb.noarch.rpm"
+            package_url => "http://packages.mydomain.com/prod1/nexus/thirdparty/linux/logstash-1.4.1-1_bd507eb.noarch.rpm"
        }

If you also add --debug you'll get more information about how it is calling diff -u with --show_resource_diff turned on.

alex-harvey-z3q avatar Jan 05 '16 02:01 alex-harvey-z3q