GithubHelp home page GithubHelp logo

cachet's Introduction

๐Ÿ‘‹ Hi, I'm Andy Grunwald

I am a Software Engineer and Engineering Manager from Germany with a focus on Backend-Systems and Infrastructure, Engineering Culture and People.

๐Ÿ‘ท Check out what I'm currently working on

๐Ÿ”ญ Latest releases I've contributed to

๐Ÿ”จ Latest Pull Requests I published

๐Ÿ“ My recent blog posts

๐Ÿ“ซ How to reach me

Twitter Follow

cachet's People

Contributors

andygrunwald avatar hugomcfonseca avatar jbrockopp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

cachet's Issues

Subscribers retain their component subscription

If I subscribe an email, un-subscribe it, then subscribe it again, I'm registered twice every for components.

Here's an excerpt of the metrics that are sent back. Please note that the "subscriptions" array has several entries with the same "component_id".

{
"id": 2,
"email": "[email protected]",
"verify_code": "xxxx",
"verified_at": "Monday 16th January 2017 09:48:41",
"created_at": "2017-01-16 09:47:39",
"updated_at": "2017-01-16 09:48:41",
"global": true,
"subscriptions": [
{
"id": 21,
"subscriber_id": 2,
"component_id": 1,
"created_at": "2017-01-16 14:36:46",
"updated_at": "2017-01-16 14:36:46"
},
{
"id": 22,
"subscriber_id": 2,
"component_id": 2,
"created_at": "2017-01-16 14:36:46",
"updated_at": "2017-01-16 14:36:46"
},
{
"id": 23,
"subscriber_id": 2,
"component_id": 3,
"created_at": "2017-01-16 14:36:46",
"updated_at": "2017-01-16 14:36:46"
},
{
"id": 24,
"subscriber_id": 2,
"component_id": 4,
"created_at": "2017-01-16 14:36:46",
"updated_at": "2017-01-16 14:36:46"
},
{
"id": 25,
"subscriber_id": 2,
"component_id": 1,
"created_at": "2017-01-16 14:38:35",
"updated_at": "2017-01-16 14:38:35"
},
{
"id": 26,
"subscriber_id": 2,
"component_id": 2,
"created_at": "2017-01-16 14:38:35",
"updated_at": "2017-01-16 14:38:35"
},
{
"id": 27,
"subscriber_id": 2,
"component_id": 3,
"created_at": "2017-01-16 14:38:35",
"updated_at": "2017-01-16 14:38:35"
},
{
"id": 28,
"subscriber_id": 2,
"component_id": 4,
"created_at": "2017-01-16 14:38:35",
"updated_at": "2017-01-16 14:38:35"
},
{
"id": 29,
"subscriber_id": 2,
"component_id": 1,
"created_at": "2017-01-16 14:47:39",
"updated_at": "2017-01-16 14:47:39"
},
{
"id": 30,
"subscriber_id": 2,
"component_id": 2,
"created_at": "2017-01-16 14:47:39",
"updated_at": "2017-01-16 14:47:39"
},
{
"id": 31,
"subscriber_id": 2,
"component_id": 3,
"created_at": "2017-01-16 14:47:39",
"updated_at": "2017-01-16 14:47:39"
},
{
"id": 32,
"subscriber_id": 2,
"component_id": 4,
"created_at": "2017-01-16 14:47:39",
"updated_at": "2017-01-16 14:47:39"
}
]
}

Also, you can see the problem in the subscribers page (see attached file)

cachetbug

Subscribers receive too much emails

The context is:

  • A cachet page that monitors the state of a service.
  • The service availability is verified every 10 minutes, and the cachet component is updated with the value.
  • Subscribers want to be warned whenever the service changes state.

Currently, the user is warned whenever the component state is updated, regardless of the value.

Solution: send notification email only when new information is available (for example: the component state is updated with a different status than the current one).

Workaround: update the component only when the value has actually changed. The problem with this is that the person looking at the component has no way of knowing the state of the service was actually monitored.

406 Not Acceptable

I'm receiving this error when running the tests:

--- FAIL: ExampleGeneralService_Ping (0.66s)
panic: API call to https://demo.cachethq.io/api/v1/ping failed: 406 Not Acceptable [recovered]
    panic: API call to https://demo.cachethq.io/api/v1/ping failed: 406 Not Acceptable

goroutine 1 [running]:
testing.runExample.func2(0xece73579b, 0xc8097b5a36, 0x56b520, 0xc8200b63f0, 0xc820032010, 0xc8201e7500, 0x3f5480, 0x1a, 0x447750, 0x3f5a20, ...)
    /usr/local/Cellar/go/1.5.3/libexec/src/testing/example.go:93 +0x3f9
github.com/andygrunwald/cachet_test.ExampleGeneralService_Ping()
    /Users/eminetto/Documents/Projects/moveis-simonetti/consulta-cpf-cnpj-server/src/github.com/andygrunwald/cachet/cachet_example_test.go:16 +0xf7
testing.runExample(0x3f5480, 0x1a, 0x447750, 0x3f5a20, 0x1d, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/testing/example.go:98 +0x3cb
testing.RunExamples(0x447778, 0x567660, 0x2, 0x2, 0xf7301)
    /usr/local/Cellar/go/1.5.3/libexec/src/testing/example.go:36 +0x31b
testing.(*M).Run(0xc820063ef8, 0xf74a3)
    /usr/local/Cellar/go/1.5.3/libexec/src/testing/testing.go:495 +0xac
main.main()
    github.com/andygrunwald/cachet/_test/_testmain.go:132 +0x116

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/local/Cellar/go/1.5.3/libexec/src/runtime/asm_amd64.s:1721 +0x1

goroutine 227 [runnable]:
syscall.Syscall(0x6, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/syscall/asm_darwin_amd64.s:16 +0x5
syscall.Close(0x6, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/syscall/zsyscall_darwin_amd64.go:404 +0x4a
net.(*netFD).destroy(0xc8201fcfc0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/fd_unix.go:135 +0x46
net.(*netFD).decref(0xc8201fcfc0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/fd_unix.go:153 +0x40
net.(*netFD).Close(0xc8201fcfc0, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/fd_unix.go:199 +0x87
net.(*conn).Close(0xc8200d64d8, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/net.go:196 +0xab
crypto/tls.(*Conn).Close(0xc8200e8b00, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/crypto/tls/conn.go:953 +0xe3
net/http.(*persistConn).closeLocked(0xc820155600)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/http/transport.go:1248 +0x4e
net/http.(*persistConn).close(0xc820155600)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/http/transport.go:1242 +0x7a
net/http.(*persistConn).readLoop(0xc820155600)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/http/transport.go:1004 +0x954
created by net/http.(*Transport).dialConn
    /usr/local/Cellar/go/1.5.3/libexec/src/net/http/transport.go:685 +0xc78

goroutine 228 [select]:
net/http.(*persistConn).writeLoop(0xc820155600)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/http/transport.go:1009 +0x40c
created by net/http.(*Transport).dialConn
    /usr/local/Cellar/go/1.5.3/libexec/src/net/http/transport.go:686 +0xc9d
exit status 2
FAIL    github.com/andygrunwald/cachet  0.696s

My go version is go1.5.3 darwin/amd64

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.