kubernetes / cloud-provider-aws

Cloud provider for AWS
https://cloud-provider-aws.sigs.k8s.io/
Apache License 2.0
376 stars 300 forks source link

Moves Instances interface methods out of aws.go #849

Closed mmerkes closed 4 months ago

mmerkes commented 5 months ago

What type of PR is this? /kind cleanup

What this PR does / why we need it:

Per this PR, we need to migrate to the InstancesV2 interface. This PR does some clean up related to that migration. I moved all of methods in the Instances interface out of aws.go (and their related tests out of aws_test.go) to instances.go, which is a more appropriate home, as a first step toward eventually cleaning that code. There are no actual changes to the code. Everything was just cut and paste as is.

Which issue(s) this PR fixes: N/A

Special notes for your reviewer: This felt like a good first step in tidying up the code base and has the added benefit of reducing the size of aws.go. If reviewers disagree, I'm ok closing out this PR unmerged. I didn't move any of the underlying methods (i.e. package private methods) to keep the PR smaller and test the water on this one first.

Does this PR introduce a user-facing change?:

NONE
k8s-ci-robot commented 5 months ago

This issue is currently awaiting triage.

If cloud-provider-aws contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
k8s-ci-robot commented 5 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign andrewsykim for approval. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/kubernetes/cloud-provider-aws/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
mmerkes commented 5 months ago

/assign @cartermckinnon

cartermckinnon commented 5 months ago

I don't see a ton of value in moving this to a different file if the plan is to delete the code prior to 1.30, tbh. But I don't have any major objections otherwise.

Can you check if this is going to force other pending PR's to rebase?

mmerkes commented 4 months ago

I'll close this for now. Will sync with @cartermckinnon directly on how to best migrate/clean up this code base.