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

mig_info_provider.GetMigForInstance will now use locking when calli… #4660

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

jayantjain93
Copy link
Contributor

…ng the gce api.

This is to avoid multiple gce calls for the same mig during scale down (which is done in parallel).

Which component this PR applies to?

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@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. labels Feb 2, 2022
@jayantjain93
Copy link
Contributor Author

/assign @MaciekPytel

@x13n
Copy link
Member

x13n commented Feb 2, 2022

/assign @BigDarkClown
/cc @bpineau

@k8s-ci-robot
Copy link
Contributor

@x13n: GitHub didn't allow me to assign the following users: BigDarkClown.

Note that only kubernetes members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @BigDarkClown
/cc @bpineau

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

@x13n: GitHub didn't allow me to request PR reviews from the following users: bpineau.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/assign @BigDarkClown
/cc @bpineau

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.

Copy link
Contributor

@BigDarkClown BigDarkClown left a comment

Choose a reason for hiding this comment

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

The lock is miss-placed here, I think we should lock the GetXYZ functions instead. Also checking the cache in fillMigInstances introduced a bug, so we should not be doing that.

cluster-autoscaler/cloudprovider/gce/mig_info_provider.go Outdated Show resolved Hide resolved
cluster-autoscaler/cloudprovider/gce/gce_manager_test.go Outdated Show resolved Hide resolved
…ng the gce api.

This is to avoid multiple gce calls for the same mig during scale down (which is done in parallel).
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 3, 2022
@BigDarkClown
Copy link
Contributor

After the changes this LGTM. @MaciekPytel, could you take a look and push approve button if everything is ok?

@jayantjain93 jayantjain93 changed the title mig_info_provider.go:fillMigInstances will now use locking when calli… mig_info_provider.GetMigForInstance will now use locking when calli… Feb 3, 2022
@BigDarkClown
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

@BigDarkClown: changing LGTM is restricted to collaborators

In response to this:

/lgtm
/approve

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.

@towca
Copy link
Collaborator

towca commented Feb 3, 2022

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BigDarkClown, jayantjain93, towca

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 3, 2022
@towca
Copy link
Collaborator

towca commented Feb 3, 2022

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 3, 2022
@k8s-ci-robot k8s-ci-robot merged commit c8e78c2 into kubernetes:master Feb 3, 2022
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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants