This pull request expands upon the "force" option added in https://github.com/github/octocatalog-diff/pull/251. This forces the "compare file text" feature to be used, but does not raise an exception if it fails. Hence "soft".
This is useful when octocatalog-diff runs are being broken into individual components (e.g. leveraging bazel for caching). One process compiles the "to" catalog and another compiles the "from" catalog, and then a third step takes those two catalogs as input and does the "diff". To make the "compare file text" function work in this case, we have to force it on for the compilation of the "to" catalog (hence https://github.com/github/octocatalog-diff/pull/251) and force it on, but not raise an exception for problems, for the compilation of the "from" catalog (this PR).
I updated the docs accordingly and added additional integration tests for these options, in addition to the unit tests at 💯 as per project requirements. In addition we have been using this for several months at my employer and it's been working as intended.
Checklist
[x] Make sure that all of the tests pass, and fix any that don't. Just run rake in your checkout directory, or review the CI job triggered whenever you push to a pull request.
[x] Make sure that there is 100% test coverage by running rake coverage:spec or ignoring untestable sections of code with # :nocov comments. If you need help getting to 100% coverage please ask; however, don't just submit code with no tests.
[x] If you have added a new command line option, we would greatly appreciate a corresponding integration test that exercises it from start to finish. This is optional but recommended.
Overview
This pull request expands upon the "force" option added in https://github.com/github/octocatalog-diff/pull/251. This forces the "compare file text" feature to be used, but does not raise an exception if it fails. Hence "soft".
This is useful when octocatalog-diff runs are being broken into individual components (e.g. leveraging bazel for caching). One process compiles the "to" catalog and another compiles the "from" catalog, and then a third step takes those two catalogs as input and does the "diff". To make the "compare file text" function work in this case, we have to force it on for the compilation of the "to" catalog (hence https://github.com/github/octocatalog-diff/pull/251) and force it on, but not raise an exception for problems, for the compilation of the "from" catalog (this PR).
I updated the docs accordingly and added additional integration tests for these options, in addition to the unit tests at 💯 as per project requirements. In addition we have been using this for several months at my employer and it's been working as intended.
Checklist
rake
in your checkout directory, or review the CI job triggered whenever you push to a pull request.rake coverage:spec
or ignoring untestable sections of code with# :nocov
comments. If you need help getting to 100% coverage please ask; however, don't just submit code with no tests.