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

AWS: Switch to aws-sdk-go #8297

Merged
merged 5 commits into from
May 22, 2015
Merged

Conversation

iterion
Copy link
Contributor

@iterion iterion commented May 15, 2015

Previously we were using the goamz package. This PR switches us to the official AWS sdk.

This is taking a stab at #6162 - still a little bit WIP.

@justinsb PTAL

}

type goamzMetadata struct {
var metadataClient = http.Client{
Timeout: time.Second * 1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably safer to increase this a little bit.... 10 seconds?

@justinsb
Copy link
Member

Looking through the code, this looks awesome. I had one nit that a 1 second timeout on the metadata service feels very short, but it is local (I think) so it'll probably be fine.

I'd like to run the e2e tests, but otherwise LGTM.

@vmarmol vmarmol self-assigned this May 18, 2015
@vmarmol
Copy link
Contributor

vmarmol commented May 18, 2015

@justinsb let me know how the e2e run went and I'll merge :)

res, err := self.ec2.DescribeInstances(&ec2.DescribeInstancesInput{
InstanceIDs: stringPointerArray(instanceIds),
Filters: filters,
NextToken: &nextToken,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out AWS is sort of fussy about nil vs empty string. You have to pass a nil pointer when you have no "next".

I suggest:

var nextToken *string
...
NextToken: nextToken

@justinsb
Copy link
Member

A few problems that need to be corrected, but once those are done I'd like to see this go in. I was able to build on this & the nodeport work to get ELB working and passing e2e tests (except for one unrelated failure)

@iterion here's the branch where I did this work if my comments don't make sense, sadly there's quite a few branches coming together in there so it's not just these changes: https://github.com/justinsb/kubernetes/tree/aws_integration

@iterion
Copy link
Contributor Author

iterion commented May 20, 2015

@justinsb Thanks for the detailed review! I think I've fixed all the issues you mentioned. Let me know if there is anything else.

The pointer issue inside of the loop probably would had baffled me had you not caught it, good to know now. New language, new quirks I guess. This is my first real attempt at any Go, so I really appreciate the review.

@justinsb
Copy link
Member

This LGTM. I may have missed some edge cases, but e2e and the work that I'm going to be doing to add ELB should pick them up (and I am suffering from branch overload).

Let's merge and then I will fix any e2e issues on AWS. Apparently it is e2e day!

Nice work @iterion

@vmarmol vmarmol added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 20, 2015
@vmarmol
Copy link
Contributor

vmarmol commented May 20, 2015

Awesome! We're currently on a merge freeze, but will merge once that is done.

@justinsb
Copy link
Member

Looks like AWS e2e is broken, I'm digging in to it. Can we get this merged as well, while I'm fixing things anyway? :-)

@vmarmol
Copy link
Contributor

vmarmol commented May 21, 2015

@dchen1107 we can merge this

@dchen1107
Copy link
Member

I am merging this one. Thanks for the patience.

dchen1107 added a commit that referenced this pull request May 22, 2015
@dchen1107 dchen1107 merged commit 17ac4b1 into kubernetes:master May 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants