-
Notifications
You must be signed in to change notification settings - Fork 29
Swap out spray for Akka http #130
Description
Akka HTTP is the successor for spray. With the first non-experimental release of Akka HTTP, spray has reached its end-of-life. http://doc.akka.io/docs/akka-http/current/scala/http/migration-guide/migration-from-spray.html We would like to swap out spray for Akka HTTP. There was an initial effort here #111.
Although all the tests passed, there seems to be a bug in the PR that was not caught. As a result, a request with the change results in the following error
com.sumologic.elasticsearch.restlastic.RestlasticSearchClient$ReturnTypes$ElasticErrorResponse: ElasticsearchError(status=403): JString({"message":"The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.\n\nThe Canonical String for this request should have been\n'GET\n/_count\n\nhost:search-cche-metrics-es-23-crilv2kbplmz3epf4ykurg3fda.us-west-1.es.amazonaws.com\nx-amz-date:20170710T043641Z\n\nhost;x-amz-date\nbaa6846b65b050d71831bb2e4cd6e6f1593902f6d82b16a6c1f9979d14cfcd12'\n\nThe String-to-Sign should have been\n'AWS4-HMAC-SHA256\n20170710T043641Z\n20170710/us-west-1/es/aws4_request\nb8a1845acaa117e0d7db6b981f53738e749b98b02bfe0140eee14faa2229afb5'\n"})
at com.sumologic.elasticsearch.restlastic.RestlasticSearchClient$$anonfun$runRawEsRequest$1.apply(RestlasticSearchClient.scala:246)
at com.sumologic.elasticsearch.restlastic.RestlasticSearchClient$$anonfun$runRawEsRequest$1.apply(RestlasticSearchClient.scala:240)
I spent half a day on it, all the changes seem legit and I was not able to figure out what was going wrong. A revert back to spray fix the problem. Since it is blocking our upgrade, I am going to keep the spray version and raise an issue to fix the bug and revert-revert changes in #111 here (cc @rcoh @seanpquig).