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

Remove Services.Get() from syncNegStatusAnnotation() #1926

Merged
merged 1 commit into from
Feb 8, 2023

Conversation

gauravkghildiyal
Copy link
Member

/assign @swetharepakula

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 31, 2023
@k8s-ci-robot k8s-ci-robot requested review from aojea and MrHohn January 31, 2023 18:35
@k8s-ci-robot
Copy link
Contributor

Hi @gauravkghildiyal. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 31, 2023
@mmamczur
Copy link
Contributor

mmamczur commented Feb 1, 2023

we tried a very similar thing along with adding more goroutines for the controller itself. It seemed to definitely help, at least in manual testing.

I'm not sure why it was getting the service from a client before though. Can patch fail if we give it an outdated version?

@gauravkghildiyal
Copy link
Member Author

@swetharepakula gave some historical context for this: Fetching the service from the api-server was needed when patch didn't exist and we had to work with updates APIs. When we replaced the APIs to use patch instead of update, replacing this specific Get call to the api-server most likely got missed.

There are existing places in our code (example1, example2) where we do fetch from the informer and then perform the update and I feel this should be fine too.

There's atleast one other place I know where we could also fetch from the informer. That, along with increasing the number of workers and a few other optimizations is something that I'm working on and will soon send them in separate PRs.

@mmamczur
Copy link
Contributor

mmamczur commented Feb 2, 2023

let's have this merged then (I can't review nor lgtm yet)
/lgtm

@k8s-ci-robot
Copy link
Contributor

@mmamczur: changing LGTM is restricted to collaborators

In response to this:

let's have this merged then (I can't review nor lgtm yet)
/lgtm

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
Member

@swetharepakula swetharepakula left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 7, 2023
@gauravkghildiyal
Copy link
Member Author

/retest

@k8s-ci-robot
Copy link
Contributor

@gauravkghildiyal: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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 k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 7, 2023
@gauravkghildiyal
Copy link
Member Author

New changes are detected. LGTM label has been removed.

FYI: Just rebased -- no new changes

@aojea
Copy link
Member

aojea commented Feb 7, 2023

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 7, 2023
@aojea
Copy link
Member

aojea commented Feb 7, 2023

/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 7, 2023
@aojea
Copy link
Member

aojea commented Feb 7, 2023

you have to remove some unused code now

pkg/neg/controller.go:20:2: imported and not used: "context"
pkg/neg/controller.go:27:2: imported and not used: "k8s.io/apimachinery/pkg/apis/meta/v1" as metav1

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 7, 2023
@gauravkghildiyal
Copy link
Member Author

/retest

@gauravkghildiyal gauravkghildiyal marked this pull request as draft February 7, 2023 22:41
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 7, 2023
@gauravkghildiyal
Copy link
Member Author

/retest

@gauravkghildiyal gauravkghildiyal marked this pull request as ready for review February 7, 2023 23:39
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 7, 2023
@k8s-ci-robot k8s-ci-robot requested a review from freehan February 7, 2023 23:39
@gauravkghildiyal
Copy link
Member Author

/uncc @MrHohn
/uncc @freehan
/retest

@swetharepakula
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 8, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aojea, gauravkghildiyal, mmamczur, swetharepakula

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 merged commit ed35b2e into kubernetes:master Feb 8, 2023
@gauravkghildiyal gauravkghildiyal deleted the noget branch February 8, 2023 19:42
cezarygerard added a commit to cezarygerard/ingress-gce that referenced this pull request Feb 10, 2023
cezarygerard added a commit to cezarygerard/ingress-gce that referenced this pull request Feb 13, 2023
k8s-ci-robot added a commit that referenced this pull request Feb 13, 2023
[Cherry pick #1926] Remove Services.Get() from syncNegStatusAnnotation()
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

5 participants