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

Refactoring to use cloud method for getting cloud groups #3446

Merged
merged 5 commits into from
Sep 30, 2017

Conversation

chrislovecnm
Copy link
Contributor

@chrislovecnm chrislovecnm commented Sep 25, 2017

This builds on various other PRs. The only two SHAs to review are:

  1. Moving delete instancesgroups into its own file chrislovecnm@d52d767
  2. Refactoring to use cloud based GetCloudGroups c33a078

AWS is the only one that has GetCloudGroups implemented at this point. GCE is next.

TODO

  • e2e testing rolling-update
  • e2e testing rolling-update with only one instance group
  • e2e testing force
  • e2e testing cloud-only

Updates

I have moved more of the code into /pkg/cloudinstances per guidance from @justinsb! I am liking it more!

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 25, 2017
@chrislovecnm
Copy link
Contributor Author

Still want to keep this in WIP, as I want to do a bit more testing.

@justinsb
Copy link
Member

I'd rather we didn't move more into fi, but kept it in instancegroups. Is that an option?

@justinsb
Copy link
Member

Aha - so an approach that might be easier:

  • Rather than put it into fi, move the classes into a new package (pkg/cloudinstancegroups)
  • Just move FindAutoscalingGroups, don't copy it

I think then I can OK this, if you can beat our unit tests ;-)

@justinsb justinsb added this to the backlog milestone Sep 25, 2017
@krzyzacy
Copy link
Member

kubernetes/test-infra#4719

/retest

@chrislovecnm chrislovecnm force-pushed the aws-get-groups branch 2 times, most recently from 47cc37d to 548a829 Compare September 28, 2017 20:42
@justinsb
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 30, 2017
@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 30, 2017
@k8s-github-robot
Copy link

/lgtm cancel //PR changed after LGTM, removing LGTM. @chrislovecnm @justinsb

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 30, 2017
func (d *clusterDiscoveryGCE) listGCEInstanceTemplates() ([]*tracker.Resource, error) {
var resourceTrackers []*tracker.Resource

templates, err := d.findInstanceTemplates()
templates, err := d.gceCloud.FindInstanceTemplates(d.clusterName)
Copy link
Member

Choose a reason for hiding this comment

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

We lost caching here

@justinsb
Copy link
Member

Can we get caching/memoization back please? Then LGTM

if err != nil {
return nil, fmt.Errorf("error listing instance groups: %v", err)
return nil, fmt.Errorf("unable to find intance templates: %v", err)
Copy link
Member

Choose a reason for hiding this comment

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

Probably just return nil, err because one assumes that FindInstanceTemplates already wrapped the error, but NBD

@justinsb
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 30, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue.

@k8s-github-robot k8s-github-robot merged commit c7b4f7e into kubernetes:master Sep 30, 2017
k8s-github-robot pushed a commit that referenced this pull request Oct 1, 2017
Automatic merge from submit-queue.

Minor cleanups to #3446

Felt easier than iterating in PR comments!
@chrislovecnm chrislovecnm deleted the aws-get-groups branch December 30, 2017 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants