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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Urgent
    • Resolution: Fixed
    • Fix Version/s: 4.1, 4.0-rc2, 4.0
    • Component/s: CI
    • Labels:
      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. Michael Semb Wever 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

              • Assignee:
                Unassigned
                Reporter:
                bereng Berenguer Blasi
                Authors:
                Berenguer Blasi, Michael Semb Wever
                Reviewers:
                Michael Semb Wever
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: