Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AB4E1200CAD for ; Wed, 14 Jun 2017 01:35:02 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A9C82160BEB; Tue, 13 Jun 2017 23:35:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F0985160BDC for ; Wed, 14 Jun 2017 01:35:01 +0200 (CEST) Received: (qmail 68330 invoked by uid 500); 13 Jun 2017 23:35:01 -0000 Mailing-List: contact reviews-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@aurora.apache.org Delivered-To: mailing list reviews@aurora.apache.org Received: (qmail 68307 invoked by uid 99); 13 Jun 2017 23:35:00 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jun 2017 23:35:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 84A781A07DF; Tue, 13 Jun 2017 23:35:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.687 X-Spam-Level: **** X-Spam-Status: No, score=4.687 tagged_above=-999 required=6.31 tests=[FORGED_HOTMAIL_RCVD2=1.187, FREEMAIL_REPLYTO_END_DIGIT=0.25, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id lNk86j5OMToV; Tue, 13 Jun 2017 23:34:59 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id D51785F6C7; Tue, 13 Jun 2017 23:34:58 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 74691E018B; Tue, 13 Jun 2017 23:34:58 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id BCF90C402CE; Tue, 13 Jun 2017 23:34:57 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3551956255147294111==" MIME-Version: 1.0 Subject: Re: Review Request 59940: Add a whitelist for TaskStateChange events in Webhook. From: Kai Huang To: Santhosh Kumar Shanmugham , David McLaughlin , Stephan Erb , Zameer Manji Cc: Aurora ReviewBot , Kai Huang , Aurora Date: Tue, 13 Jun 2017 23:34:56 -0000 Message-ID: <20170613233456.15752.98663@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Kai Huang X-ReviewGroup: Aurora X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/59940/ X-Sender: Kai Huang References: <20170613214044.597.4161@reviews-vm2.apache.org> In-Reply-To: <20170613214044.597.4161@reviews-vm2.apache.org> Reply-To: Kai Huang X-ReviewRequest-Repository: aurora archived-at: Tue, 13 Jun 2017 23:35:02 -0000 --===============3551956255147294111== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/59940/ ----------------------------------------------------------- (Updated June 13, 2017, 11:34 p.m.) Review request for Aurora, David McLaughlin, Santhosh Kumar Shanmugham, Stephan Erb, and Zameer Manji. Changes ------- Updated the RELEASE-NOTES for this feature. 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 (updated) ----- RELEASE-NOTES.md c73643d669363a56e530c2d8c79d6ea06cc9415b 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/6/ Changes: https://reviews.apache.org/r/59940/diff/5-6/ 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 --===============3551956255147294111==--