GithubHelp home page GithubHelp logo

mozilla / mozmill-ci Goto Github PK

View Code? Open in Web Editor NEW
19.0 12.0 18.0 64.95 MB

[OBSOLETE] Mozmill CI system driven by Mozilla Pulse and Jenkins

Home Page: https://wiki.mozilla.org/QA/Automation/Projects/Mozmill_Automation/Mozmill_CI

Python 96.30% Shell 2.27% Groovy 1.43%

mozmill-ci's Introduction

Mozmill CI

Build Status

With the Mozmill CI project the Firefox Automation team aims to keep running a continuous integration system for Mozmill tests written for Firefox. As core system Jenkins is used, and gets enhanced by adding configurations, plugins, and what-ever necessary.

Installation and startup

Mozmill CI can easily be set-up. Please consult our installation instructions for details.

Once done you can follow the instructions to start Jenkins and if necessary the build listeners.

Development

In case you want to help us in further developing Mozmill CI, you might wanna be interested in the details for developers.

Troubleshooting

In case of problems running Mozmill-CI our Troubleshooting page gives necessary hints to get problems solved.

General information

For any other topic in how to work with Jenkins please have a look at our wiki. If you have questions please get in contact with us.

mozmill-ci's People

Contributors

cosmin-malutan avatar davehunt avatar kairo-at avatar nebelhom avatar parkouss avatar peterjeschke avatar retornam avatar simar7 avatar sydvicious avatar whimboo avatar yati-sagade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mozmill-ci's Issues

Add email notifications for Releases

Now that the automation runs automagically when Beta and RC candidates are available (via Pulse), it would be great to get notification of what is happening so we don't have to continually spotcheck Jenkins and Brasstacks. Here is what I am suggesting:

  1. email notification to the QA Desktop team when a functional testrun has been initiated
    "Mozmill-CI functional testrun has been started for Firefox 12.0b6#1"

  2. email notification to the QA Desktop team when a functional testrun has been completed
    "Mozmill-CI functional testrun has finished for Firefox 12.0b6#1 with N failures"

I think a dependency for this might be getting a "[email protected]" email alias set up for the team. If I have support for this idea then I will go ahead and file the appropriate bugzilla request.

get_mozmill-environments should use temporary files for download

Given that we run jobs across platforms on nodes, the execution can fail if we download new environments on the master. To prevent this as best as possible get_mozmill-environments should download the env to a temporary file and rename it right after. So there will be only some milliseconds overlap instead of seconds.

Remove queued items if older than a day

We are not interested in running tests against builds which are more than a day old. It would even be good to not cancel by time but when the next request of the same type comes in. Not sure if that can be done but we should check that.

Bind Jenkins to a specifc version

Right now we haven't specified a version of Jenkins we support for the CI project. We should do so to be able to:

  • Download the correct build
  • Config settings apply correctly
  • Installed plugins working correctly

Make latest version of hg repositories available as artifacts

Cloning the hg repository for the automation scripts and tests each time is not a solution we should continue. It's way broken due to the flakiness of this website. I don't want to see that our system cannot run Mozmill tests when hg.mozilla.org is down. So we should cache the latest version of both repositories locally and make them available as artifacts for all nodes.

We could use a changegroup hook (http://mercurial.selenic.com/wiki/Hook#The_changegroup_hook), use Pulse notifications from the HGConsumer, or simply pull the repository for changes in intervals like 5 minutes.

@davehunt what would you suggest? I'm up for polling solution.

Create branch specific testrun jobs

We need the testrun jobs to be branch specific because different versions of Firefox are really different products. Those can throw a different list of failures which should not be combined with other versions.

Add platform version to email notification

Right now we can only see 'win32' in teh email notification for all windows platforms. We should include the platform version so we can see more detailed failures. Same applies to Mac and Linux. Shall we simply include the node labels instead of the platform?

Dave can you work on this?

Fix job descriptions

The jobs currently have descriptions like:

Execute addon tests for Nighly and Aurora builds.

The testrun type differs, but Nighly (sp) and Aurora are not appropriate to all builds. It would be good to have a sensible description for all jobs.

Pulse consumer for release builds is broken

See the following exception thrown:

INFO:automation:2012-04-18T23:15:36+01:00 - Product: None, Branch: releases/comm-beta, Platform: None, Locale: en-US
Traceback (most recent call last):
File "./pulse.py", line 266, in
main()
File "./pulse.py", line 262, in main
message=options.message)
File "./pulse.py", line 234, in init
Automation.init(self, _args, *_kwargs)
File "./pulse.py", line 84, in init
pulse.listen()
File "/Users/mozilla/mozmill-ci/jenkins-env/lib/python2.6/site-packages/mozillapulse/consumers.py", line 136, in listen
self.consumer.wait()
File "/Users/mozilla/mozmill-ci/jenkins-env/lib/python2.6/site-packages/carrot/messaging.py", line 446, in wait
it.next()
File "/Users/mozilla/mozmill-ci/jenkins-env/lib/python2.6/site-packages/carrot/backends/pyamqplib.py", line 300, in consume
self.channel.wait()
File "/Users/mozilla/mozmill-ci/jenkins-env/lib/python2.6/site-packages/amqplib/client_0_8/abstract_channel.py", line 97, in wait
return self.dispatch_method(method_sig, args, content)
File "/Users/mozilla/mozmill-ci/jenkins-env/lib/python2.6/site-packages/amqplib/client_0_8/abstract_channel.py", line 117, in dispatch_method
return amqp_method(self, args, content)
File "/Users/mozilla/mozmill-ci/jenkins-env/lib/python2.6/site-packages/amqplib/client_0_8/channel.py", line 2060, in _basic_deliver
func(msg)
File "/Users/mozilla/mozmill-ci/jenkins-env/lib/python2.6/site-packages/carrot/messaging.py", line 291, in _receive_callback
self.receive(message.payload, message)
File "/Users/mozilla/mozmill-ci/jenkins-env/lib/python2.6/site-packages/carrot/messaging.py", line 344, in receive
callback(message_data, message)
File "./pulse.py", line 184, in on_build
filename = os.path.join(self.log_folder, branch, basename)
File "/Users/mozilla/mozmill-ci/jenkins-env/bin/../lib/python2.6/posixpath.py", line 65, in join
if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'

I will have to analyze the saved Pulse notifications why this happens.

Jobs are hanging in "Recording test results"

The tests are working fine but most of the nodes are hanging here:

*** Removing old installation at /var/folders/yc/yc-yt4kPHweMwoUftOHQgE+++TQ/-Tmp-/tmplvW9wc.binary/FirefoxAurora.app
*** Removing repository '/var/folders/yc/yc-yt4kPHweMwoUftOHQgE+++TQ/-Tmp-/tmpzjIyBo.mozmill-tests'
Build step 'Invoke XShell command' marked build as failure
Recording test results

They can't finish the recording of test results. I could imagine because that's of the change to '**/results_??.xml. So for now I will revert that. But we should figure out why.

@davehunt have you ever seen that?

All win32 Pulse triggered 13.0b4 testruns failed

Console Output:
Started by user anonymous
Building remotely on windows-7_64_01 in workspace c:\jenkins\workspace\release-mozilla-beta_functional

Deleting project workspace... done

Unable to access upstream artifacts area. Does source project archive artifacts?
Build step 'Copy artifacts from another project' marked build as failure
Recording test results
Finished: FAILURE


I'm not sure what happened but all the Linux and Mac 13.0b4#1 builds ran okay automatically. For some reason all the win32 builds fell down. I'm now triggering an ondemand testrun to see if it reproduces outside of CI.

If Jenkins is not running script should handle the exception and not exit

Traceback (most recent call last):
File "./pulse.py", line 229, in
main()
File "./pulse.py", line 217, in main
handle_notification(data, None)
File "./pulse.py", line 158, in handle_notification
'REPORT_URL': config['tests']['report_url']})
File "/Volumes/data/code/mozmill-ci/jenkins-env/lib/python2.7/site-packages/jenkins/init.py", line 332, in build_job
if not self.job_exists(name):
File "/Volumes/data/code/mozmill-ci/jenkins-env/lib/python2.7/site-packages/jenkins/init.py", line 267, in job_exists
self.get_job_info(name)
File "/Volumes/data/code/mozmill-ci/jenkins-env/lib/python2.7/site-packages/jenkins/init.py", line 150, in get_job_info
response = self.jenkins_open(urllib2.Request(self.server + JOB_INFO%locals()))
File "/Volumes/data/code/mozmill-ci/jenkins-env/lib/python2.7/site-packages/jenkins/init.py", line 174, in jenkins_open
return urllib2.urlopen(req).read()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 394, in open
response = self._open(req, data)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 412, in _open
'_open', req)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 372, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1199, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1174, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 61] Connection refused>

Pulse consumer timed out in amqplib

Probably an external issue but filing for now to have it listed.

Traceback (most recent call last):
File "./pulse.py", line 265, in
main()
File "./pulse.py", line 261, in main
message=options.message)
File "./pulse.py", line 233, in init
Automation.init(self, _args, *_kwargs)
File "./pulse.py", line 85, in init
pulse.listen()
File "/Users/mozilla/mozmill-ci/jenkins-env/lib/python2.6/site-packages/mozillapulse/consumers.py", line 136, in listen
self.consumer.wait()
File "/Users/mozilla/mozmill-ci/jenkins-env/lib/python2.6/site-packages/carrot/messaging.py", line 446, in wait
it.next()
File "/Users/mozilla/mozmill-ci/jenkins-env/lib/python2.6/site-packages/carrot/backends/pyamqplib.py", line 300, in consume
self.channel.wait()
File "/Users/mozilla/mozmill-ci/jenkins-env/lib/python2.6/site-packages/amqplib/client_0_8/abstract_channel.py", line 95, in wait
self.channel_id, allowed_methods)
File "/Users/mozilla/mozmill-ci/jenkins-env/lib/python2.6/site-packages/amqplib/client_0_8/connection.py", line 202, in _wait_method
self.method_reader.read_method()
File "/Users/mozilla/mozmill-ci/jenkins-env/lib/python2.6/site-packages/amqplib/client_0_8/method_framing.py", line 221, in read_method
raise m
socket.error: [Errno 60] Operation timed out

Add platform coverage per branch

Each listed branch should have its own list of supported platforms. It's necessary because Nightly builds of Firefox 13 no longer run on Windows 2000.

Update Readme with Release Automation instructions

Now that we have mozmill-ondemand working in Jenkins, we have a simpler process for testing releases with the automation. I am going to update the Readme.md file to include instructions about running the ondemand tests.

Disable Windows 2000 Jenkins node

Firefox 12 is our last release where we will support Windows 2000. As a result, any bugs we happen to find on Windows 2000 will be resolved WONTFIX. Therefore, I see no point to keep the Windows 2000 node alive either for CI or Ondemand testing.

Integrate DTC automation with CI

Product teams are looking to be able to have nightly Beta builds instead of weekly builds (target is May 17th). One blindspot that creates in QA testing is with add-ons and plugins. It seems like the Default to Compatible automation would fit the bill for filling that blindspot. Can we set up the DTC automation to run in Mozmill-CI on a daily basis?

Here is what we would want:

  • Grab the previous Beta
  • Start with any number of top add-ons installed
  • Run some set of automated tests
  • Update to the latest Beta
  • Re-run the test to make sure nothing has broken (in particular we would look for crashes)

It seems like DTC automation would lend itself well to this type of testing and if we can run this in CI, even better.

Now I know that the DTC automation takes a long time to run, partly because it runs against all locales. Could we restrict the CI integration to en-US for the time being?

Jobs are broken on Windows (VirtualAlloc pointer is null)

Not sure why but we fail to run Cygwin on the PoC. Could be due to lesser memory but I will have to check. Here the failure message:

[mozilla-central_update] $ cmd.exe /C '"mozmill-env\run hg clone https://hg.mozilla.org/qa/mozmill-automation && exit %%ERRORLEVEL%%"'
0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x71110000, RegionSize 0x480000, State 0x10000
c:\jenkins\workspace\mozilla-central_update\mozmill-env\msys\bin\bash.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 487

Mercurial version should be 2.2.1

I suspect there was a typo in the requirements file. It looks like Mercurial 2.1 causes a build to fail when pulling and there are no updates. Upgrading to 2.2.1 fixes this. It's already 2.2.1 locally and on qa-masterblaster.

--debug doesn't save messages anymore

Here the exception I get:

File "./pulse.py", line 116, in init
pulse.listen()
File "/Users/qa/mozmill-ci/jenkins-env/lib/python2.7/site-packages/mozillapulse/consumers.py", line 136, in listen
self.consumer.wait()
File "/Users/qa/mozmill-ci/jenkins-env/lib/python2.7/site-packages/carrot/messaging.py", line 446, in wait
it.next()
File "/Users/qa/mozmill-ci/jenkins-env/lib/python2.7/site-packages/carrot/backends/pyamqplib.py", line 300, in consume
self.channel.wait()
File "/Users/qa/mozmill-ci/jenkins-env/lib/python2.7/site-packages/amqplib/client_0_8/abstract_channel.py", line 97, in wait
return self.dispatch_method(method_sig, args, content)
File "/Users/qa/mozmill-ci/jenkins-env/lib/python2.7/site-packages/amqplib/client_0_8/abstract_channel.py", line 117, in dispatch_method
return amqp_method(self, args, content)
File "/Users/qa/mozmill-ci/jenkins-env/lib/python2.7/site-packages/amqplib/client_0_8/channel.py", line 2060, in _basic_deliver
func(msg)
File "/Users/qa/mozmill-ci/jenkins-env/lib/python2.7/site-packages/carrot/messaging.py", line 291, in _receive_callback
self.receive(message.payload, message)
File "/Users/qa/mozmill-ci/jenkins-env/lib/python2.7/site-packages/carrot/messaging.py", line 344, in receive
callback(message_data, message)
File "./pulse.py", line 203, in on_build
JSONFile(filename).write(data)
File "./pulse.py", line 65, in init
raise NotFoundException('Specified file cannot be found.', filename)

Could be related to my changes from pull request #5

Improve body layout of email notifications

Right now the layout is a bit wonky and links hard to read. So we should improve it.

Here is what we have right now:

Mozmill mozilla-central_update testrun for Firefox Nightly 20120519030527 mac en-US completed with 0 failures.

View the build in Jenkins: http://qa-masterblaster.mv.mozilla.com:8080/job/mozilla-central_update/1260/
View the results in the Mozmill Dashboard: http://mozmill-ci.blargon7.com/#/update/report/f87375a634b1a5ba746e5f763a40383b

Something which would make it way better is:

Mozmill mozilla-central_update testrun for Firefox Nightly 20120519030527 mac en-US completed with 0 failures.

View the build in Jenkins:
    http://qa-masterblaster.mv.mozilla.com:8080/job/mozilla-central_update/1260/

View the results in the Mozmill Dashboard:
    http://mozmill-ci.blargon7.com/#/update/report/f87375a634b1a5ba746e5f763a40383b
    http://mozmill-ci.blargon7.com/#/update/report/f87375a634b1a5ba746e5f763a407f7f

Means each link should be in it's own line for better readability.

Allow jobs to specify a version of Mozmill

Currently only one version of Mozmill is supported (determined by a global variable). If we changed this so that version was an axis of the get_mozmill-environments job then we should be able to specify a version in the testrun job. We should use latest by default.

Unzip the mozmill-env archive on the slave

Right now we have to unzip the downloaded mozmill-environment archive on master because on Windows the unzip command is not available. It takes way more time to transfer all the files to slaves so we should get this fixed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.