> On June 13, 2017, 6:30 p.m., Santhosh Kumar Shanmugham wrote:
> > src/main/java/org/apache/aurora/scheduler/events/WebhookInfo.java
> > Lines 103 (patched)
> > <https://reviews.apache.org/r/59940/diff/2/?file=1749520#file1749520line103>
> >
> >     private?
> >     
> >     It is not being used outside the class.

Making it private does not pass pmd styleCheck: Avoid instantiation through 
private constructors from outside of the constructors class. We need to make it 
package private instead?


> On June 13, 2017, 6:30 p.m., Santhosh Kumar Shanmugham wrote:
> > src/main/java/org/apache/aurora/scheduler/events/WebhookInfo.java
> > Lines 107-109 (patched)
> > <https://reviews.apache.org/r/59940/diff/2/?file=1749520#file1749520line107>
> >
> >     Make this package-private and mark it as @VisibleForTesting.

addressed


> On June 13, 2017, 6:30 p.m., Santhosh Kumar Shanmugham wrote:
> > src/main/java/org/apache/aurora/scheduler/events/WebhookInfo.java
> > Lines 111 (patched)
> > <https://reviews.apache.org/r/59940/diff/2/?file=1749520#file1749520line111>
> >
> >     package-private?

addressed


- Kai


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59940/#review177769
-----------------------------------------------------------


On June 13, 2017, 6:21 p.m., Kai Huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59940/
> -----------------------------------------------------------
> 
> (Updated June 13, 2017, 6:21 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin, Santhosh Kumar Shanmugham, 
> Stephan Erb, and Zameer Manji.
> 
> 
> Bugs: AURORA-1934
>     https://issues.apache.org/jira/browse/AURORA-1934
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Add a whitelist for TaskStateChange events in Webhook.
> 
> Aurora Scheduler has a webhook module that watches all TaskStateChanges and 
> send events to configured endpoint. This will flood the endpoint with a lot 
> of noise if we only care about certain types of TaskStateChange event(e.g. 
> task state change from RUNNING -> LOST). This CR allows user to provide a 
> whitelist of TaskStateChange event types in their webhook configuration file, 
> so that the webhook will only post these events to the configured endpoint.
> 
> 
> Diffs
> -----
> 
>   docs/features/webhooks.md a060975488a50ea34c79aebd66d056df8a3b437e 
>   src/main/java/org/apache/aurora/scheduler/events/Webhook.java 
> 3868779986285ac302d028f8713f683192951b83 
>   src/main/java/org/apache/aurora/scheduler/events/WebhookInfo.java 
> 37c0d7944c7a37e1a5c65dafb290fcdd28765db3 
>   src/test/java/org/apache/aurora/scheduler/events/WebhookTest.java 
> e8335d9b78dbf30bf3ae08b6bdd02018cea76f6b 
> 
> 
> Diff: https://reviews.apache.org/r/59940/diff/3/
> 
> 
> Testing
> -------
> 
> ./build-support/jenkins/build.sh
> 
> This change is backward compatible. By default, all TaskStateChange statuses 
> will be matched and posted to the configured endpoint.
> 
> The user can also match all TaskStateChange statuses using a wildcard 
> character "*" in webhook.json like below:
> ```
> {
>   "headers": {
>     "Content-Type": "application/vnd.kafka.json.v1+json",
>     "Producer-Type": "reliable"
>   },
>   "targetURL": "http://localhost:5000/";,
>   "timeoutMsec": 50,
>   "statuses": ["*"]
> }
> ```
> 
> If they are only interested in TaskStateChange statuses: LOST, FAILED, they 
> can provide them in the whitelist:
> ```
> {
>   "headers": {
>     "Content-Type": "application/vnd.kafka.json.v1+json",
>     "Producer-Type": "reliable"
>   },
>   "targetURL": "http://localhost:5000/";,
>   "timeoutMsec": 50,
>   "statuses": ["LOST", "FAILED"]
> }
> ```
> 
> 
> Thanks,
> 
> Kai Huang
> 
>

Reply via email to