Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-16655

cassandra-cqlsh-tests.sh should return different return codes on circle vs jenkins

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Urgent
    • Resolution: Fixed
    • 4.0-rc2, 4.0, 4.1-alpha1, 4.1
    • CI
    • None

    Description

      Recent jenkins runs appear broken (red) bc of a cqlsh test failure. That reports the whole run as broken instead of that specific step with failures and an unstable (yellow) run.

      It appears the reason may be this change. At that time that was necessary to make circle fail that step. Otherwise cqlsh failures would be ignored and that step rendered green regarless making it useless. But it has been found now this makes jenkins report the whole run red upon a cqlsh test failure.

      The solution seems to be to return different codes depending on whether we're on jenkins or circle. mck has suggested sthg along these lines:

      # circleci wants non-zero exit to report failures, jenkins wants zero exit for a unstable status
      [[ command -v circleci >/dev/null 2>&1 ]] && exit ${RETURN}
      exit 0
      

      Procedure:

      • Fix the sh script
      • Break a cqlsh test
      • Test the test gets reported as a failure in circle
      • Test the test gets reported as a failure in jenkins and that the run and step are yellow (not red)
      • Fix the test
      • Both circle and jenkins report green for that step

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bereng Berenguer Blasi
              Berenguer Blasi, Michael Semb Wever
              Michael Semb Wever
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: