Commit Graph

31 Commits

Author SHA1 Message Date
OpenDev Sysadmins f9852612d9 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:51:16 +00:00
Jenkins a5f13c53f0 Merge "Support Jenkins to Zuul rename" 2017-09-15 21:39:44 +00:00
Jenkins 00d49d38e1 Merge "Cleanup before Jenkins to Zuul rename" 2017-09-15 21:37:55 +00:00
Swapnil Kulkarni (coolsvap) f8eb22b33a Remove discover from test-requirements
It's only needed for python < 2.7 which is not supported

Change-Id: Ie70dd2c7e7f1eb9859bc1e080704211844ca134d
2016-07-22 04:51:03 +00:00
Mikhail S Medvedev 8fbb338d6e Support Jenkins to Zuul rename
Jenkins went away, and Zuul soon would stop pretending to be Jenkins
[1]. Support new user name along with the old one.

[1] http://lists.openstack.org/pipermail/openstack-dev/2016-June/097595.html

Change-Id: I81ce306af044c3a2e76ff8a7685bcfe964292f0b
2016-06-17 15:37:41 -05:00
Mikhail S Medvedev 4bf341cc15 Cleanup before Jenkins to Zuul rename
OpenStack infra Jenkins was retired and soon the OpenStack gerrit user
used to post comments would be renamed/replaced [1]. The cleanup is to
make it easier to add support for new user in next patch:

 * change couple of names to remove mention of jenkins

 * refactor _is_ci_user so it is easier to add a new condition

[1] http://lists.openstack.org/pipermail/openstack-dev/2016-June/097595.html

Change-Id: Ia7a2c2b217fb6afd99a74777487f155105c7c2ca
2016-06-17 15:37:09 -05:00
Elizabeth K. Joseph 05f8113d5a Add link to source for project under Contact Us
I was asked today where the source for this project was, seems like
this is something that should go in the Contact Us section.

Change-Id: I100dd328f3765d24d86526585870de58a9af6077
2016-02-09 10:38:32 -08:00
Evgeny Antyshev 66d34bff33 Ability to select specific CI results
This change adds ability to see only selected rows (by clicking on them),
to get more illustrative view of a specific CI robot by comparing its
results with some Jenkins job, for example.

Change-Id: I34ab24e1eb7f989d131025ac9cf9dac70fc3fe76
2016-02-03 17:13:53 -08:00
Evgeny Antyshev b880656e32 Fix "verified" attribute assignment
Current version incorrectly parses pipeline, which leads to
un-modified event["author"]["name"], which leads to unassigned
"verified" attribute.

Usual Jenkins comment starts as:
"Patch Set 12: Verified-1\n\nBuild failed (check pipeline)."
This means, pipeline info is on line 2, not 0.
Also, removed unneeded code from projects jinja template

Change-Id: Id1143f2980a3a09ee6ab0e35342a3512525b852c
2016-01-21 09:33:35 +00:00
Jenkins a84ae25788 Merge "Separate votes from Jenkins queues" 2016-01-12 18:25:58 +00:00
Philipp Marek 4f7fda440b Remove jQuery filter to improve page load time
Not building a (long!) list and filtering it then gives a nice
performance improvement.

Change-Id: Ia9f047e8c1ecf8a5df3d6a416848ccb2de18f58d
2015-12-22 19:28:32 +01:00
apoorvad 7b96be1572 Separate votes from Jenkins queues
It was seen that all the queues for Jenkins post the vote under
same ci_owner. This patch separates out the votes based on the
queues.

Also includes performance improvements during compilation of
regex patterns.

Change-Id: I998749316d0b0488068ca20f9be68faf3caecd3a
Closes-Bug: #1517677
2015-12-17 09:44:21 -08:00
Jenkins 6997457f08 Merge "Change ciwatch.log location" 2015-12-08 19:02:35 +00:00
Jenkins a2c08c7d3d Merge "Consolidating database calls in db.py" 2015-12-03 23:37:33 +00:00
apoorvad 948e40cb29 Change ciwatch.log location
In order to make puppet-ciwatch in sync with ciwatch, change
the log file location to /var/log/ciwatch/ciwatch.log from
/var/lib/ciwatch/ciwatch.log

Change-Id: Id3713cbafca3f87db0cf24dc00e800b56e148a41
2015-12-02 17:17:51 -08:00
apoorvad 5d66cc9fa0 Consolidating database calls in db.py
Change-Id: Ic50c3a91aab815056eab9d7c36a7748cacdf6e53
2015-11-30 07:52:26 -06:00
Mikhail S Medvedev 56e474d725 Use zuul gerrit event listener implementation
Current event listener implementation does not handle network problems
well. E.g. if ssh stream connection is lost, it would not reconnect or
recover on its own. Instead of fixing the implementation, use
well-tested gerrit listener used by zuul. Explicitly specify version of
zuul to be 2.1.0 to avoid accidental breakages due to changes in zuul
lib.

Downside is that we need to install zuul and its dependencies just to
use gerrit listener.

parse_json_event function had to be changed, because zuul gerrit event
listener provides object, not json string. We still need to create
event from json in populate_db.py, so that part of the function has
been moved there.

Closes-Bug: #1516820

Change-Id: I8aa7a18460b58998f6c378e9d9c0d783032eca21
2015-11-25 15:11:00 -06:00
apoorvad 822a7a3ac2 Update contact us information for ciwatch
Change-Id: Ia849781f5baa571c330a10f6603e219f03da5134
2015-11-17 15:33:01 -08:00
apoorvad 6f1fee7f2b Replacing legacy references of ci-watch to ciwatch
Change-Id: I20e216caf683f34e4d98e6f82d921bbe5a57f05e
2015-11-16 16:13:32 -08:00
apoorvad f52b39f483 Add highlight Jenkins +1 functionality
Currently ciwatch highlights Jenkins -1 votes, but many
third party CIs pick up Gerrit events only when Jenkins
has voted +1. Hence it is important to highlight vendor
CI failures when Jenkins has verified the change set.

Closes-Bug: #1516110

Change-Id: I5635d344404c21206d7cae049f81fb1f2067ec09
2015-11-16 22:38:44 +00:00
Mikhail S Medvedev 68f1910e77 Use thread-local SQLAlchemy sessions
There are a few problems with how SQLAlchemy session is currently used.

First, there is global, non-thread-safe (see [1]) session instantiated
in db.py. That makes it hard to ensure session is properly closed when
there is no need to keep them open (e.g. in-between Flask requests).  We
also get stale data when we do queries without invalidating the
long-living session. The fix is to use scoped_session, as described in
[2], and by using new session for each Flask request, which is ensured
by using Session.remove() at the end of each request.

Another problem manifests when MySQL backend is used. During long idle
time, MySQL would close inactive connections. And because SQLAlchemy
does maintain a pool of connections open independently from session,
once we try to use it, we'll see 'MySQL server went away' and crash.
This further made worse by single global session that then gets stuck,
not being able to process any additional transactions.  The fix is to
set SQLAlchemy pool_recycle to one hour, which is less than MySQL
interactive timeout.

In the future, instead of continuing to manage Flask with SQLAlchemy by
hand, migration to Flask-SQLAlchemy extension should be considered, [3].

[1] http://docs.sqlalchemy.org/en/rel_1_0/orm/session_basics.html#is-the-session-thread-safe
[2] http://docs.sqlalchemy.org/en/rel_1_0/orm/contextual.html#unitofwork-contextual
[3] https://pythonhosted.org/Flask-SQLAlchemy/quickstart.html#a-minimal-application

Closes-Bug: #1512476

Change-Id: I78a7f3f0715c5aa71d73f9c496ba3b07208674b9
2015-11-16 13:04:06 -06:00
Mikhail S Medvedev 52315eedd7 Refactor configuration handling
This change should make it a bit easier to see when configuration is
read in, and would allow to further centralize parsing and loading of
the conf file.

We should not 'import config' each time when we need to get access to
the settings. Instead, the settings should be loaded once, and then
explicitly passed around. This patch does not make that happen yet, but
is the first step.

Change-Id: If9ad1222ceb806337a745845ee6e76605bab5fd3
2015-11-14 19:22:53 -06:00
Mikhail S Medvedev 32315f3e13 Fix pep8
Change-Id: Ic6834b6fa36d03c6c4633ae4093d26f74af8559a
2015-11-13 14:23:57 -06:00
Mikhail S Medvedev fb75343650 Apply openstack-dev cookiecutter template
CI Watch project started outside of OpenStack infrastructure.
This patch adds missing bits to enables infra testing, documentation
builds, and to make packaging easier if we'd like to do so.

Additional changes to accommodate the template:

 * ciwatch/__init__.py renamed to ciwatch/server.pp, and all related
   imports updated.
 * README.md converted into rst and split up into sections.

Partial-Bug: #1505834
Change-Id: I0aaabcfd1607609a337ce6ca2a71f9889b45de0a
2015-10-23 16:54:27 -05:00
Ramy Asselin 2d0157d525 Move configuration step before installation
The pip install -e . step needs the configuration to succeed.

Original Change-Id: I6c105883fd7b4e84a7151d24e8fd96b6ec2e42f0

Change-Id: Idd5b3cb14447d42162b292b7333d4782fea38949
2015-10-06 11:58:50 -05:00
Mikhail S Medvedev 31782d7949 Remove hardcoded data path
Use the conf setting instead.

Original Change-Id: I3350d1c23201d80941699690a522c1727acbbc3e

Change-Id: Ibf262dff7c1371c2a7088d6d1dcd03faf8713912
2015-10-06 11:58:49 -05:00
Mikhail S Medvedev d66c70d72c Fix sqlalchemy models so they work with MySQL backend
If string length is not specified, we would get:
"VARCHAR requires a length on dialect mysql" when using MySQL backend.

Original Change-Id: I25c71d6ed257974c14672c3cc261c9ccfec5d6cf

Change-Id: I1dfe6bf919313adb963f6c8f2b8b331108a6c680
2015-10-06 11:58:47 -05:00
Mikhail S Medvedev 0683170484 Allow global ciwatch conf file
We want to be able to store the configuration in /etc, as opposed to
source directory.

Try to load configuration from source dir first, and fallback to
/etc/ciwatch/ci-watch.conf.

Wrap everything into a function and add exception if no configuration
is found. We want to move away from having globals.

Original Change-Id: I91f2adc6e90b6252c5839a5ef8dde0fe7cd137f8

Change-Id: Ic939caeff538e290418cff2a6438d63a024994b0
2015-10-06 11:58:44 -05:00
Ramy Asselin bde64a6a1f Allow external access by default
You can disable access to port 5000 via firewall. So let the
default flask setting work outside of localhost.

Original Change-Id: I67b79873c6dfca052becba618f693b754855944d

Change-Id: I392faf8f650353f7a4c1e6df177c4090d77c3b92
2015-10-06 11:58:42 -05:00
Skyler Berg 0e03bec4b1 Add CI Watch, a third-party CI monitoring dashboard
Original Change-Id: I8611f25a6700c6e0c64c3fadf820dbc9adcd5ea5

Change-Id: I847016f87ebd6da559ecd6298c5ad007bc935cb8
2015-10-06 11:58:39 -05:00
OpenStack Project Creator 61b71c2c01 Added .gitreview 2015-10-05 22:17:09 +00:00