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
Add timestream support #1918
base: master
Are you sure you want to change the base?
Add timestream support #1918
Conversation
[dependencies.rusoto_timestream_query] | ||
optional = true | ||
path = "../rusoto/services/timestream-query" |
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.
You need to add timestream-write
here too?
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
@@ -805,6 +809,7 @@ all = [ | |||
"sts", | |||
"support", | |||
"swf", | |||
"timestream-query", |
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
input: QueryRequest, | ||
) -> Result<QueryResponse, RusotoError<QueryError>> { | ||
self.update_endpoint().await.map_err(|e| match e { | ||
// Remap any DescribeEndpointError to WriteRecordErrors |
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.
Wrong comment
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.
Changed
input: CancelQueryRequest, | ||
) -> Result<CancelQueryResponse, RusotoError<CancelQueryError>> { | ||
self.update_endpoint().await.map_err(|e| match e { | ||
// Remap any DescribeEndpointError to WriteRecordErrors |
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.
Wrong comment
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.
Changed
@@ -805,6 +809,7 @@ all = [ | |||
"sts", | |||
"support", | |||
"swf", | |||
"timestream-query", |
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
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.
LGTM but I haven't tested it though. Could you explain a bit how you test this?
&mut self, | ||
input: QueryRequest, | ||
) -> Result<QueryResponse, RusotoError<QueryError>> { | ||
self.update_endpoint().await.map_err(|e| match e { |
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.
may be misunderstanding this, but does this mean we update the endpoint every time we do a call?
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.
Yes, this is due to the endpoints for queries are dynamic. The same for the writer. Also see here service.json of boto
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.
Yes, the endpoints are dynamic -- but they are meant to be cached for the TTL that comes with them (i.e point 3 here:https://docs.aws.amazon.com/timestream/latest/developerguide/Using-API.endpoint-discovery.describe-endpoints.implementation.html). On a second pass though, we don't actually update the endpoint with each call, only when we find at the time of calling that the expiry for the endpoint has passed. Which seems correct.
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.
So this is ok then?
@tiratatp I'm using it in my own project, I just use the writer part but since I only updated the code to the 0.46 version I assume the other authors who also made the PR for the other parts are using (or did) as well. I just pushed a new commit since I did some better digging into the code and also generated the new files and tested some more bits. |
@tiratatp do you need input from my side or are you just busy? |
I don't have a write request to this repo. The code looks good to me though. |
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.
LGTM
Hi, is there any work/review need before merging? Happy to help if there is. Thanks! |
…Note, I had to skip the Timestream query service as it fails to compile due to recursive types in the generated code.
Rebased on the new master. |
@johansmitsnl thanks for this! It looks like you rebased and bumped rusoto_core to 0.47 but timestream still depends on 0.46. |
@nevins-b I have just updated the version and depends. Hope this can get merged soon. |
See PR #1857 which I used as a base platform.
Todo's: