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

Migrates cloudup/gce from v0.beta => v1 #8517

Closed
wants to merge 2 commits into from

Conversation

geojaz
Copy link
Member

@geojaz geojaz commented Feb 9, 2020

This relates to #8516 and is a first pass at modernizing our GCE integration.

#8516 needs to go first to get this green...
We got the vendoring updated so when the tests are green, we can go on this one

@geojaz geojaz added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 9, 2020
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Feb 9, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: geojaz

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 9, 2020
@geojaz
Copy link
Member Author

geojaz commented Feb 9, 2020

/retest

@geojaz geojaz assigned geojaz, justinsb and johngmyers and unassigned geojaz Feb 9, 2020
return nil
})
req := c.Compute().InstanceGroupManagers.ListManagedInstances(project, zoneName, igm.Name)
resp, err := req.Do()
Copy link
Member

Choose a reason for hiding this comment

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

As someone unfamiliar with the GCE api, I see that theres a PageToken for ListManagedInstances but I'm having trouble finding example code that uses it so I can't tell if we should continue to use pagination or not. Do you think that pagination is no longer necessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is unlikely in most cases that it would be needed, but you're right fixing...

Copy link
Member

Choose a reason for hiding this comment

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

Well this is odd - it looks like the Pages method isn't defined there? I can try to dig around to find out why but (1) do we agree there is no Pages method and (2) did we figure out a reason why it might not be needed?

Copy link
Member

Choose a reason for hiding this comment

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

@geojaz Pages was added in v0.22.0 (the compute-gen.go file is too big for me to link to a specific line or commit) so we should consider updating the api client library once more and then revert this particular change.

if i.TargetSize == 0 {
request.ForceSendFields = append(request.ForceSendFields, "TargetSize")
}
op, err := t.Cloud.Compute().InstanceGroupManagers.ResizeAdvanced(t.Cloud.Project(), *e.Zone, i.Name, request).Do()
Copy link
Member

Choose a reason for hiding this comment

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

Interesting! The ForceSendFields was originally here because otherwise we didn't send Size == 0, but it looks like this has been fixed by using the Resize command.

return nil
})
req := c.Compute().InstanceGroupManagers.ListManagedInstances(project, zoneName, igm.Name)
resp, err := req.Do()
Copy link
Member

Choose a reason for hiding this comment

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

Well this is odd - it looks like the Pages method isn't defined there? I can try to dig around to find out why but (1) do we agree there is no Pages method and (2) did we figure out a reason why it might not be needed?

@justinsb
Copy link
Member

Ah - I'm plainly following in your footsteps @geojaz ... looks like googleapis/google-api-go-client#451 is where you asked in the library about the missing method, and so we're likely (temporarily) blocked on this question. I say temporarily because we could always code our own version of the method.

@geojaz
Copy link
Member Author

geojaz commented Feb 24, 2020

that's exactly how I got there :) I've been busy and this isn't blocking me right now....

@justinsb justinsb added this to the v1.19 milestone Apr 10, 2020
@geojaz
Copy link
Member Author

geojaz commented Apr 23, 2020

/close

Now that we have the support in the client lib for that MIG listing, I'll recreate...

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 23, 2020
@k8s-ci-robot
Copy link
Contributor

@geojaz: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot
Copy link
Contributor

@geojaz: Closed this PR.

In response to this:

/close

Now that we have the support in the client lib for that MIG listing, I'll recreate...

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@geojaz geojaz deleted the gce_apiv1 branch April 23, 2020 22:23
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. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants