Uploaded image for project: 'Metron (Retired)'
  1. Metron (Retired)
  2. METRON-2324

verify_licenses.sh and list_dependencies.sh don't properly handle maven failures

Add voteWatch issue
    XMLWordPrintableJSON

Details

    • Bug
    • Status: To Do
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      It produces different results for me on Travis than locally and implies I need to readd a dep (because seems right: e.g. JUnit is a correct dependency of our compiled source: specifically metron-integration-test).

      The difference between local and Travis seems to be that our shell scripts are faulty. They try to exit if an error occurs, but exit during a pipe chain doesn't stop the chain, so it ends up passing along to builtins that exit with 0 (because for grep, sort, etc, nothing went wrong). Note that mvn dependency:list should pretty much always fail midway because we don't have the Metron artifacts built, so we can't run a build all the way through (because it can't find intermodule deps). Locally, they tend to always be built for the devs, so it succeeds.

      To see this sort of thing in action:

      { echo "test" && exit 1 } | grep t
      echo $?
      

      This will still run the grep on test, and because the grep succeeds, the return code is 0.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              leet Justin Leet

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 20m
                  3h 20m

                  Slack

                    Issue deployment