Skip to content

Understanding Jenkins

Eric Vaandering edited this page Oct 1, 2015 · 26 revisions

The homepage for our Jenkins tests is https://cmssdt.cern.ch/jenkins/view/DMWM/ which is behind the CERN SSO service.

There are two tests that ultimately decide what Jenkins thinks about your pull request: DMWM-PR-test and DMWM-WMAgent-TestAll. Each of these tests or "builds" starts other builds that test specific aspects.

DMWM-PR-test starts DMWM-PR-unittests, DMWM-WMCore-PR-pylint, and DMWM-WMCore-PR-27. DMWM-PR-unittests actually starts 10 jobs each of which tests a "slice" of the unit tests since running them all in one process would take too long. Each of these slices feeds up when done to DMWM-PR-unittests and DMWM-PR-unittests, DMWM-WMCore-PR-pylint, and DMWM-WMCore-PR-27 all feed their information up to DMWM-PR-test which does a final analysis of the results and decides if your PR passes or fails.

In principle, none of these sub-jobs is supposed to fail. It doesn't work out that way, though

  • Any of them can fail because they can't install the WMAgent RPMs from cmsweb
  • Any of them can fail because they can't contact GitHub
  • Unit test slices can fail because they get stuck or take too long, in which case Jenkins kills them
  • PR-27 can fail if the proposed code introduces a python syntax error. That never happens because everyone runs their code, right?

Any time a failure occurs, the job that started it also fails. If this is the case, DMWM-PR-test fails and is restarted (up to four times). It is not restarted if it determines that your code was bad, only if there is a problem with the infrastructure. If Jenkins posts something about pylint and unit tests being good or bad, the build "succeeded". If it doesn't and instead says it is starting tests again, it did not.

Ok, so let's look back at that top level page: https://cmssdt.cern.ch/jenkins/view/DMWM/ You may see DMWM-PR-test as red and with stormy skies (previous builds failed). You shouldn't see the other tests mentioned with anything but green and sunny skies.

Now, you can click on DMWM-PR-test and see the history of tests on our pull requests. On the left you will see a list of pull requests and Jenkins build numbers. If you see a little green arrow in that column, that means Jenkins had to automatically restart the pull request for one of the reasons above. If not, that build was started because of a new commit or someone saying "test this please" on the pull request.

Now lets say you want to see why the unit tests were unable to complete.

Clone this wiki locally