-
Notifications
You must be signed in to change notification settings - Fork 24
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
Adding slack sink connector #60
Conversation
Can one of the admins verify this patch? |
slack/src/main/java/com/hazelcast/jet/contrib/slack/SlackSinks.java
Outdated
Show resolved
Hide resolved
Thanks a lot for the contribution! I couldn't see your name in our contributor list: could you follow the steps at https://hazelcast.atlassian.net/wiki/spaces/COM/pages/6357071/Hazelcast+Contributor+Agreement ? |
slack/src/main/java/com/hazelcast/jet/contrib/slack/SlackSinks.java
Outdated
Show resolved
Hide resolved
slack/src/main/java/com/hazelcast/jet/contrib/slack/SlackSinks.java
Outdated
Show resolved
Hide resolved
slack/src/main/java/com/hazelcast/jet/contrib/slack/SlackSinks.java
Outdated
Show resolved
Hide resolved
slack/src/main/java/com/hazelcast/jet/contrib/slack/SlackSinks.java
Outdated
Show resolved
Hide resolved
verify |
* Added retry http handler to handle some of the error causes. * Variable names are updated as per review comments. * Addressed other review comments. Signed-off-by: Rajasekhar Kanugula <[email protected]>
slack/src/main/java/com/hazelcast/jet/contrib/slack/SlackSinks.java
Outdated
Show resolved
Hide resolved
slack/src/main/java/com/hazelcast/jet/contrib/slack/SlackSinks.java
Outdated
Show resolved
Hide resolved
urlParameters.add(new BasicNameValuePair("text", message)); | ||
request.setEntity(new UrlEncodedFormEntity(urlParameters)); | ||
response = (CloseableHttpResponse) closeableHttpClient.execute(request); | ||
result = EntityUtils.toString(response.getEntity()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We return the result, but the returned value is ignored. Is there something worthwhile to check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the simple to pojo class to parse the response. In error scenarios sample message will look like this { "ok": false, "error": "not_authed" }
If the Response.ok false means then throwing the RuntimeException.
slack/src/test/java/com/hazelcast/jet/contrib/slack/SlackSInksTest.java
Outdated
Show resolved
Hide resolved
slack/src/test/java/com/hazelcast/jet/contrib/slack/SlackSInksTest.java
Outdated
Show resolved
Hide resolved
slack/src/main/java/com/hazelcast/jet/contrib/slack/SlackSinks.java
Outdated
Show resolved
Hide resolved
slack/src/main/java/com/hazelcast/jet/contrib/slack/SlackSinks.java
Outdated
Show resolved
Hide resolved
Hi @Kanugula , just checking in if there's anything we can help you out with? :) |
> Processing the Rest response to SlackResponse to handle failure causes from the slack apis. Signed-off-by: Rajasekhar Kanugula <[email protected]>
@Kanugula Glad to see your edits :) @viliam-durina Could you please take another look? |
@viliam-durina do you mind picking this up again? |
PR closed by Hazelcast automation as no activity (>6 months). Please reopen with comments, if necessary. Thank you for using Hazelcast and your valuable contributions