Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sensor registration and webhook trigger registration #927

Merged
merged 16 commits into from
Dec 22, 2014

Conversation

Kami
Copy link
Member

@Kami Kami commented Dec 21, 2014

This fixes sensor registration and webhook trigger registration (which appears never worked).

Here is a context on this bug - https://gist.github.com/Kami/7fd428765fe516673880

I'm too tired now to recap it in a more "friendly" and "readable" manner, but I will do it tomorrow.

P.S. 1 The change which introduced a bug didn't just broke registration, it also changed the behavior. Previously trigger information in the DB was updated every time the registration code was called. With the new / broken code, DB models were never updated, just created.

P.S. 2 We need tests for sensor / action / rules registration and for webhook trigger type registration.

P.S. 3 I mostly reverted to the old way of doing it. In the future, I will probably update services.triggers methods to also update a model if it already exists in the DB, but before doing that, I want full test coverage for those code paths. Last thing we want is another regression.

Kami added a commit that referenced this pull request Dec 22, 2014
Fix sensor registration and webhook trigger registration
@Kami Kami merged commit c052d38 into master Dec 22, 2014
@Kami Kami deleted the fix_sensor_registration branch December 22, 2014 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant