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

Creating and deleting a Kinesis stream returns an error despite success #21

Closed
shooit opened this issue Dec 10, 2018 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@shooit
Copy link

shooit commented Dec 10, 2018

Despite receiving an error after invoking this, the stream has actually been created. The same is seen when invoking :DeleteStream.

(aws/invoke kc {:op :CreateStream
                :request {:StreamName stream-name
                          :ShardCount 1}})
#> {:cognitect.anomalies/category :cogniect.anomalies/fault, :cognitect.aws.client/throwable #error {
 :cause nil
 :via
 [{:type java.lang.NullPointerException
   :message nil
   :at [java.io.StringReader <init> "StringReader.java" 50]}]
 :trace
 [[java.io.StringReader <init> "StringReader.java" 50]
  [clojure.data.json$read_str invokeStatic "json.clj" 278]
  [clojure.data.json$read_str doInvoke "json.clj" 274]
  [clojure.lang.RestFn invoke "RestFn.java" 439]
  [cognitect.aws.shape$json_parse invokeStatic "shape.clj" 117]
  [cognitect.aws.shape$json_parse invoke "shape.clj" 114]
  [cognitect.aws.protocols.json$eval15788$fn__15791 invoke "json.clj" 48]
  [clojure.lang.MultiFn invoke "MultiFn.java" 239]
  [cognitect.aws.client$handle_http_response invokeStatic "client.clj" 37]
  [cognitect.aws.client$handle_http_response invoke "client.clj" 31]
  [cognitect.aws.client$send_request$fn__13875 invoke "client.clj" 56]
  [clojure.core$map$fn__5847$fn__5848 invoke "core.clj" 2742]
  [clojure.core.async.impl.channels$chan$fn__1496 invoke "channels.clj" 300]
  [clojure.core.async.impl.channels.ManyToManyChannel put_BANG_ "channels.clj" 83]
  [clojure.core.async$put_BANG_ invokeStatic "async.clj" 165]
  [clojure.core.async$put_BANG_ invoke "async.clj" 158]
  [cognitect.http_client.Client$fn$reify__13176 onComplete "http_client.clj" 236]
  [org.eclipse.jetty.client.ResponseNotifier notifyComplete "ResponseNotifier.java" 193]
  [org.eclipse.jetty.client.ResponseNotifier notifyComplete "ResponseNotifier.java" 185]
  [org.eclipse.jetty.client.HttpReceiver terminateResponse "HttpReceiver.java" 454]
  [org.eclipse.jetty.client.HttpReceiver responseSuccess "HttpReceiver.java" 401]
  [org.eclipse.jetty.client.http.HttpReceiverOverHTTP messageComplete "HttpReceiverOverHTTP.java" 268]
  [org.eclipse.jetty.http.HttpParser parseHeaders "HttpParser.java" 957]
  [org.eclipse.jetty.http.HttpParser parseNext "HttpParser.java" 1188]
  [org.eclipse.jetty.client.http.HttpReceiverOverHTTP parse "HttpReceiverOverHTTP.java" 158]
  [org.eclipse.jetty.client.http.HttpReceiverOverHTTP process "HttpReceiverOverHTTP.java" 119]
  [org.eclipse.jetty.client.http.HttpReceiverOverHTTP receive "HttpReceiverOverHTTP.java" 69]
  [org.eclipse.jetty.client.http.HttpChannelOverHTTP receive "HttpChannelOverHTTP.java" 90]
  [org.eclipse.jetty.client.http.HttpConnectionOverHTTP onFillable "HttpConnectionOverHTTP.java" 113]
  [org.eclipse.jetty.io.AbstractConnection$ReadCallback succeeded "AbstractConnection.java" 273]
  [org.eclipse.jetty.io.FillInterest fillable "FillInterest.java" 95]
  [org.eclipse.jetty.io.ssl.SslConnection onFillable "SslConnection.java" 197]
  [org.eclipse.jetty.io.AbstractConnection$ReadCallback succeeded "AbstractConnection.java" 273]
  [org.eclipse.jetty.io.FillInterest fillable "FillInterest.java" 95]
  [org.eclipse.jetty.io.SelectChannelEndPoint$2 run "SelectChannelEndPoint.java" 75]
  [org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume produceAndRun "ExecuteProduceConsume.java" 213]
  [org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume run "ExecuteProduceConsume.java" 147]
  [org.eclipse.jetty.util.thread.QueuedThreadPool runJob "QueuedThreadPool.java" 654]
  [org.eclipse.jetty.util.thread.QueuedThreadPool$3 run "QueuedThreadPool.java" 572]
  [java.lang.Thread run "Thread.java" 748]]}}```
@shooit
Copy link
Author

shooit commented Dec 10, 2018

The first invocation of both :CreateStream and :DeleteStream returns the above. However subsequent invocations will correctly return that the resource already exists or does not exist e.g.

{"__type" "ResourceInUseException", "message" "Stream stream-name under account ############# already exists.", :cognitect.anomalies/category :cognitect.anomalies/incorrect}

@dchelimsky
Copy link
Contributor

Looks like CreateStream is an anomalous case in which there is no "output" shape: https://github.com/aws/aws-sdk-js/blob/master/apis/kinesis-2013-12-02.normal.json#L44-L65. The aws-api code assumes that's always present. My guess is this will be an easy fix. Assuming that's correct, I should be able to address this in the next day or so. I'll report back here either way.

@dchelimsky dchelimsky added the bug Something isn't working label Dec 10, 2018
@dchelimsky
Copy link
Contributor

Released in 0.8.146.

@shooit
Copy link
Author

shooit commented Dec 11, 2018

@dchelimsky working great now. Thank you for the fast turn around!

@dchelimsky
Copy link
Contributor

Great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants