Giter VIP home page Giter VIP logo

gitlab-ci-monitor's People

Contributors

dapicester avatar waffle-iron avatar

Watchers

 avatar  avatar

Forkers

waffle-iron

gitlab-ci-monitor's Issues

Crash on network error

Traceback (most recent call last):
	18: from ./multi-monitor.rb:19:in `<main>'
	17: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:135:in `start'
	16: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:27:in `start_loop'
	15: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:27:in `loop'
	14: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:28:in `block in start_loop'
	13: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:136:in `block in start'
	12: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:136:in `each'
	11: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:137:in `block (2 levels) in start'
	10: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:146:in `check_latest'
	 9: from /Users/admin/gitlab-ci-monitor/lib/build_fetcher.rb:39:in `latest_build'
	 8: from /Users/admin/gitlab-ci-monitor/lib/build_fetcher.rb:68:in `fetch'
	 7: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/net/http.rb:609:in `start'
	 6: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/net/http.rb:909:in `start'
	 5: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/net/http.rb:920:in `do_start'
	 4: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/net/http.rb:935:in `connect'
	 3: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/timeout.rb:103:in `timeout'
	 2: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/timeout.rb:93:in `block in timeout'
	 1: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/net/http.rb:936:in `block in connect'
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/net/http.rb:939:in `rescue in block in connect': Failed to open TCP connection to gitlab.com:443 (Operation timed out - connect(2) for "gitlab.com" port 443) (Errno::ETIMEDOUT)
Mini:gitlab-ci-monitor admin$ ./multi-monitor.rb

Handle network connectivity problems

This is happening more often:

I, [2017-02-08T13:23:10.541907 #54177]  INFO -- : Fetching pipelines ...
/Users/paolo/.rbenv/versions/2.3.3/lib/ruby/2.3.0/net/http.rb:882:in `rescue in block in connect': Failed to open TCP connection to gitlab.com:443 (getaddrinfo: nodename nor servname provided, or not known) (SocketError)
	from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/2.3.0/net/http.rb:879:in `block in connect'
	from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
	from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
	from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/2.3.0/net/http.rb:878:in `connect'
	from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
	from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/2.3.0/net/http.rb:852:in `start'
	from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/2.3.0/net/http.rb:1398:in `request'
	from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/httparty-0.14.0/lib/httparty/request.rb:118:in `perform'
	from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/httparty-0.14.0/lib/httparty.rb:560:in `perform_request'
	from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/httparty-0.14.0/lib/httparty.rb:486:in `get'
	from ./monitor.rb:36:in `latest_build'
	from ./monitor.rb:130:in `check_latest'
	from ./monitor.rb:124:in `block in start'
	from ./monitor.rb:123:in `loop'
	from ./monitor.rb:123:in `start'
	from ./monitor.rb:185:in `<main>'

Deprecation warning on Fixnum

/Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/arduino_firmata-0.3.7/lib/arduino_firmata/arduino.rb:113: warning: constant ::Fixnum is deprecated

Add simple web interface

Sometimes is easier to have a page open in the browser.
Can use Sinatra with autorefresh (easy) or some kind of refresh on change (websockets?).

Log to file

It would be nice to keep logs saved to files, possibly with daily logrotation.

Net::ReadTimeout exception uncatched

/Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/protocol.rb:176:in rbuf_fill': Net::ReadTimeout (Net::ReadTimeout) from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/protocol.rb:154:in readuntil'
from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/protocol.rb:164:in readline' from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/http/response.rb:40:in read_status_line'
from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/http/response.rb:29:in read_new' from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/http.rb:1446:in block in transport_request'
from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/http.rb:1443:in catch' from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/http.rb:1443:in transport_request'
from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/http.rb:1416:in request' from ./monitor.rb:61:in block in latest_build'
from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/http.rb:877:in start' from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/http.rb:608:in start'
from ./monitor.rb:57:in latest_build' from ./monitor.rb:179:in check_latest'
from ./monitor.rb:173:in block in start' from ./monitor.rb:172:in loop'
from ./monitor.rb:172:in start' from ./monitor.rb:234:in

'

Make everything async

It would be nice if:

  • on server error the yellow and red leds alternately blink
  • on server build the yellow led blinks

Cope with network failures

See here

I, [2018-08-21T17:35:06.120835 #59084]  INFO -- : 1878081: Fetching pipelines ...
Traceback (most recent call last):
        14: from ./monitor.rb:17:in `<main>'
        13: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:51:in `start'
        12: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:27:in `start_loop'
        11: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:27:in `loop'
        10: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:28:in `block in start_loop'
         9: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:52:in `block in start'
         8: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:58:in `check_latest'
         7: from /Users/admin/gitlab-ci-monitor/lib/build_fetcher.rb:36:in `latest_build'
         6: from /Users/admin/gitlab-ci-monitor/lib/build_fetcher.rb:49:in `fetch'
         5: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/net/http.rb:609:in `start'
         4: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/net/http.rb:909:in `start'
         3: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/net/http.rb:920:in `do_start'
         2: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/net/http.rb:981:in `connect'
         1: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/net/protocol.rb:44:in `ssl_socket_connect'
/usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/net/protocol.rb:44:in `connect_nonblock': SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read serve$ hello A (OpenSSL::SSL::SSLError)
Mini:gitlab-ci-monitor admin$ ./monitor.rb

Buzz on build failure

There should be one buzz on the first build failure. Next failures should not buzz.

Example:

  1. build pass -> green
  2. build fail -> red + buzz (this is the first failure)
  3. building -> yellow
  4. build fail -> red (was already failed)
  5. build pass -> green (all is well now)
  6. building -> yellow
  7. build fail -> red + buzz (this is the first failure)

Add checks for arduino presence

Today got a power shortage and the software hanged.
Should add some kind of periodic check on the arduino presence, or a disconnect handler.

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.