flagr icon indicating copy to clipboard operation
flagr copied to clipboard

Notifier interface, generic webhooks and slack webhooks

Open j4k opened this issue 5 years ago • 9 comments

Description

  • Related to issue #214
  • Add a generic webhook to push updates to flags to a user specified endpoint
  • Add a slack specific webhook to push updates to a slack channel like this:
Screenshot 2019-03-19 at 12 10 04 Screenshot 2019-03-19 at 12 10 44

Motivation and Context

We needed notifications around who was doing what with the flags we had active, when they were enabled / disabled etc

How Has This Been Tested?

Manually and with automated tests

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [x] My code follows the code style of this project.
  • [x] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [x] I have added tests to cover my changes.
  • [x] All new and existing tests passed.

j4k avatar Mar 20 '19 17:03 j4k

Thanks, this is awesome! I will take a look soon

zhouzhuojie avatar Mar 20 '19 17:03 zhouzhuojie

Codecov Report

Merging #240 into master will decrease coverage by 1.22%. The diff coverage is 73.79%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #240      +/-   ##
=========================================
- Coverage   82.62%   81.4%   -1.23%     
=========================================
  Files          25      29       +4     
  Lines        1439    1667     +228     
=========================================
+ Hits         1189    1357     +168     
- Misses        192     234      +42     
- Partials       58      76      +18
Impacted Files Coverage Δ
pkg/handler/crud.go 91.34% <100%> (+0.35%) :arrow_up:
pkg/util/util.go 94.28% <33.33%> (-5.72%) :arrow_down:
pkg/notify/client.go 56.97% <56.97%> (ø)
pkg/notify/notify.go 68.96% <68.96%> (ø)
pkg/notify/webhook.go 78.94% <78.94%> (ø)
pkg/notify/slack.go 89.61% <89.61%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c3ef755...2f05693. Read the comment docs.

codecov-io avatar Mar 20 '19 18:03 codecov-io

thanks, I will fix up

j4k avatar Mar 24 '19 11:03 j4k

@zhouzhuojie - have thrown retryable http into the mix as well as timeouts and everything else you've suggested bar the templates, mind giving some input to the direction?

j4k avatar Mar 25 '19 18:03 j4k

Sorry for the delayed response I have been away.

I'll get this stuff fixed up this week!

j4k avatar Apr 03 '19 20:04 j4k

@j4k sorry to bother you, are you going to be able to complete this? this is something that we can use too

pacoguzman avatar May 10 '19 04:05 pacoguzman

I was about to add the same functionality to flagr so awesome work! Is there a way to also notify on a flag that's rolled out 100% for x time straight (1 week) so we know it's ready and can clean the code? this would be really helpful

vic3lord avatar Nov 05 '19 13:11 vic3lord

I'm also really interesed in this feature, is there something we can do to help out to give it the final push to master? Thanks!

borjafv avatar Oct 07 '20 08:10 borjafv

We started to work on this, and we're continuing this here, so I'm solving the last requests you made before, and I'll we can discuss pending feedback in the meantime

pacoguzman avatar Oct 15 '20 10:10 pacoguzman

Stale pull request message

github-actions[bot] avatar Aug 26 '22 21:08 github-actions[bot]