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

Chores: refactor armclient and add request decorator to CRUD functions #1687

Merged
merged 4 commits into from
Jun 15, 2022
Merged

Chores: refactor armclient and add request decorator to CRUD functions #1687

merged 4 commits into from
Jun 15, 2022

Conversation

MartinForReal
Copy link
Contributor

@MartinForReal MartinForReal commented May 6, 2022

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Add request decorator to CRUD functions in armclient

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

putresources function is removed. and ratelimiter in putresourceasync is refactored.

Does this PR introduce a user-facing change?

NONE

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


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 6, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MartinForReal

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 6, 2022
@coveralls
Copy link

coveralls commented May 6, 2022

Coverage Status

Coverage decreased (-0.4%) to 79.918% when pulling c7e42e0 on MartinForReal:feat/refactor-client into ee2d15b on kubernetes-sigs:master.

@MartinForReal MartinForReal changed the title Chores: refactor armclient and add decorator to CRUD functions Chores: refactor armclient and add request decorator to CRUD functions May 6, 2022
@MartinForReal
Copy link
Contributor Author

/retest

@MartinForReal
Copy link
Contributor Author

/assign @nilo19 @lzhecheng

@MartinForReal
Copy link
Contributor Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 7, 2022
@MartinForReal
Copy link
Contributor Author

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 9, 2022
@MartinForReal
Copy link
Contributor Author

/test pull-cloud-provider-azure-e2e-ccm-vmss-basic-lb


@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 9, 2022
@lzhecheng
Copy link
Contributor

The coverage drops quite a bit (0.4%)... Is it possible to make up for it?

Signed-off-by: MartinForReal <fanshangxiang@gmail.com>
Signed-off-by: MartinForReal <fanshangxiang@gmail.com>
Signed-off-by: MartinForReal <fanshangxiang@gmail.com>
@MartinForReal
Copy link
Contributor Author

updated

@MartinForReal
Copy link
Contributor Author

/retest

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Jun 13, 2022

@MartinForReal: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cloud-provider-azure-e2e-ccm-vmss-basic-lb 2ff88eee4c3c1c5ad36db5bc379dfab45ad4bed7 link true /test pull-cloud-provider-azure-e2e-ccm-vmss-basic-lb

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@MartinForReal
Copy link
Contributor Author

/test pull-cloud-provider-azure-e2e-ccm-capz


@MartinForReal
Copy link
Contributor Author

/test pull-cloud-provider-azure-e2e-ccm-vmss-capz

@nilo19
Copy link
Contributor

nilo19 commented Jun 15, 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 Jun 15, 2022
@k8s-ci-robot k8s-ci-robot merged commit 9e2a309 into kubernetes-sigs:master Jun 15, 2022
@MartinForReal MartinForReal deleted the feat/refactor-client branch June 15, 2022 09:47
@MartinForReal
Copy link
Contributor Author

/cherrypick release-1.24

@MartinForReal
Copy link
Contributor Author

/cherrypick release-1.23

@MartinForReal
Copy link
Contributor Author

/cherrypick release-1.1

@MartinForReal
Copy link
Contributor Author

/cherrypick release-1.0

@k8s-infra-cherrypick-robot

@MartinForReal: new pull request created: #1842

In response to this:

/cherrypick release-1.24

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-infra-cherrypick-robot

@MartinForReal: #1687 failed to apply on top of branch "release-1.23":

Applying: chore: add decorators parameter to putresource in armclient and use channel as ratelimiter.
Applying: chores: add decorators to parameters of patchresource function
Applying: chores: add decorators to parameters of deleteresource function
Using index info to reconstruct a base tree...
M	pkg/azureclients/armclient/azure_armclient.go
M	pkg/azureclients/containerserviceclient/azure_containerserviceclient.go
M	pkg/azureclients/diskclient/azure_diskclient.go
M	pkg/azureclients/diskclient/azure_diskclient_test.go
M	pkg/azureclients/snapshotclient/azure_snapshotclient.go
M	pkg/azureclients/snapshotclient/azure_snapshotclient_test.go
M	pkg/azureclients/storageaccountclient/azure_storageaccountclient.go
M	pkg/azureclients/storageaccountclient/azure_storageaccountclient_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/azureclients/storageaccountclient/azure_storageaccountclient_test.go
Auto-merging pkg/azureclients/storageaccountclient/azure_storageaccountclient.go
Auto-merging pkg/azureclients/snapshotclient/azure_snapshotclient_test.go
Auto-merging pkg/azureclients/snapshotclient/azure_snapshotclient.go
Auto-merging pkg/azureclients/diskclient/azure_diskclient_test.go
CONFLICT (content): Merge conflict in pkg/azureclients/diskclient/azure_diskclient_test.go
Auto-merging pkg/azureclients/diskclient/azure_diskclient.go
Auto-merging pkg/azureclients/containerserviceclient/azure_containerserviceclient.go
Auto-merging pkg/azureclients/armclient/azure_armclient.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0003 chores: add decorators to parameters of deleteresource function
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.23

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-infra-cherrypick-robot

@MartinForReal: #1687 failed to apply on top of branch "release-1.1":

Applying: chore: add decorators parameter to putresource in armclient and use channel as ratelimiter.
Using index info to reconstruct a base tree...
M	pkg/azureclients/armclient/azure_armclient.go
M	pkg/azureclients/armclient/azure_armclient_test.go
M	pkg/azureclients/containerserviceclient/azure_containerserviceclient.go
M	pkg/azureclients/loadbalancerclient/azure_loadbalancerclient.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/azureclients/loadbalancerclient/azure_loadbalancerclient.go
Auto-merging pkg/azureclients/containerserviceclient/azure_containerserviceclient.go
Auto-merging pkg/azureclients/armclient/azure_armclient_test.go
CONFLICT (content): Merge conflict in pkg/azureclients/armclient/azure_armclient_test.go
Auto-merging pkg/azureclients/armclient/azure_armclient.go
CONFLICT (content): Merge conflict in pkg/azureclients/armclient/azure_armclient.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 chore: add decorators parameter to putresource in armclient and use channel as ratelimiter.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.1

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-infra-cherrypick-robot

@MartinForReal: #1687 failed to apply on top of branch "release-1.0":

Applying: chore: add decorators parameter to putresource in armclient and use channel as ratelimiter.
Using index info to reconstruct a base tree...
M	pkg/azureclients/armclient/azure_armclient.go
M	pkg/azureclients/armclient/azure_armclient_test.go
M	pkg/azureclients/armclient/interface.go
M	pkg/azureclients/armclient/mockarmclient/interface.go
M	pkg/azureclients/containerserviceclient/azure_containerserviceclient.go
M	pkg/azureclients/loadbalancerclient/azure_loadbalancerclient.go
A	pkg/azureclients/privatednsclient/azure_privatednsclient.go
A	pkg/azureclients/privatednsclient/azure_privatednsclient_test.go
A	pkg/azureclients/privatednszonegroupclient/azure_privatednszonegroupclient.go
A	pkg/azureclients/privatednszonegroupclient/azure_privatednszonegroupclient_test.go
A	pkg/azureclients/privateendpointclient/azure_privateendpointclient.go
A	pkg/azureclients/privateendpointclient/azure_privateendpointclient_test.go
A	pkg/azureclients/virtualnetworklinksclient/azure_virtualnetworklinksclient.go
A	pkg/azureclients/virtualnetworklinksclient/azure_virtualnetworklinksclient_test.go
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): pkg/azureclients/virtualnetworklinksclient/azure_virtualnetworklinksclient_test.go deleted in HEAD and modified in chore: add decorators parameter to putresource in armclient and use channel as ratelimiter.. Version chore: add decorators parameter to putresource in armclient and use channel as ratelimiter. of pkg/azureclients/virtualnetworklinksclient/azure_virtualnetworklinksclient_test.go left in tree.
CONFLICT (modify/delete): pkg/azureclients/virtualnetworklinksclient/azure_virtualnetworklinksclient.go deleted in HEAD and modified in chore: add decorators parameter to putresource in armclient and use channel as ratelimiter.. Version chore: add decorators parameter to putresource in armclient and use channel as ratelimiter. of pkg/azureclients/virtualnetworklinksclient/azure_virtualnetworklinksclient.go left in tree.
CONFLICT (modify/delete): pkg/azureclients/privateendpointclient/azure_privateendpointclient_test.go deleted in HEAD and modified in chore: add decorators parameter to putresource in armclient and use channel as ratelimiter.. Version chore: add decorators parameter to putresource in armclient and use channel as ratelimiter. of pkg/azureclients/privateendpointclient/azure_privateendpointclient_test.go left in tree.
CONFLICT (modify/delete): pkg/azureclients/privateendpointclient/azure_privateendpointclient.go deleted in HEAD and modified in chore: add decorators parameter to putresource in armclient and use channel as ratelimiter.. Version chore: add decorators parameter to putresource in armclient and use channel as ratelimiter. of pkg/azureclients/privateendpointclient/azure_privateendpointclient.go left in tree.
CONFLICT (modify/delete): pkg/azureclients/privatednszonegroupclient/azure_privatednszonegroupclient_test.go deleted in HEAD and modified in chore: add decorators parameter to putresource in armclient and use channel as ratelimiter.. Version chore: add decorators parameter to putresource in armclient and use channel as ratelimiter. of pkg/azureclients/privatednszonegroupclient/azure_privatednszonegroupclient_test.go left in tree.
CONFLICT (modify/delete): pkg/azureclients/privatednszonegroupclient/azure_privatednszonegroupclient.go deleted in HEAD and modified in chore: add decorators parameter to putresource in armclient and use channel as ratelimiter.. Version chore: add decorators parameter to putresource in armclient and use channel as ratelimiter. of pkg/azureclients/privatednszonegroupclient/azure_privatednszonegroupclient.go left in tree.
CONFLICT (modify/delete): pkg/azureclients/privatednsclient/azure_privatednsclient.go deleted in HEAD and modified in chore: add decorators parameter to putresource in armclient and use channel as ratelimiter.. Version chore: add decorators parameter to putresource in armclient and use channel as ratelimiter. of pkg/azureclients/privatednsclient/azure_privatednsclient.go left in tree.
Auto-merging pkg/azureclients/loadbalancerclient/azure_loadbalancerclient.go
Auto-merging pkg/azureclients/diskclient/azure_diskclient_test.go
CONFLICT (content): Merge conflict in pkg/azureclients/diskclient/azure_diskclient_test.go
Auto-merging pkg/azureclients/containerserviceclient/azure_containerserviceclient.go
Auto-merging pkg/azureclients/armclient/mockarmclient/interface.go
CONFLICT (content): Merge conflict in pkg/azureclients/armclient/mockarmclient/interface.go
Auto-merging pkg/azureclients/armclient/interface.go
CONFLICT (content): Merge conflict in pkg/azureclients/armclient/interface.go
Auto-merging pkg/azureclients/armclient/azure_armclient_test.go
CONFLICT (content): Merge conflict in pkg/azureclients/armclient/azure_armclient_test.go
Auto-merging pkg/azureclients/armclient/azure_armclient.go
CONFLICT (content): Merge conflict in pkg/azureclients/armclient/azure_armclient.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 chore: add decorators parameter to putresource in armclient and use channel as ratelimiter.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.0

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.

nilo19 added a commit to nilo19/cloud-provider-azure that referenced this pull request Apr 19, 2023
A regression was introduced by kubernetes-sigs#1687 where the behavior of updating resources in batches changes from sending requests asynchonously to synchonously. This would lead to latencies when updating vmss vms, especially when the cluster size is huge. This unexpected change is reverted in this fix.
k8s-infra-cherrypick-robot pushed a commit to k8s-infra-cherrypick-robot/cloud-provider-azure that referenced this pull request Apr 20, 2023
A regression was introduced by kubernetes-sigs#1687 where the behavior of updating resources in batches changes from sending requests asynchonously to synchonously. This would lead to latencies when updating vmss vms, especially when the cluster size is huge. This unexpected change is reverted in this fix.
k8s-infra-cherrypick-robot pushed a commit to k8s-infra-cherrypick-robot/cloud-provider-azure that referenced this pull request Apr 20, 2023
A regression was introduced by kubernetes-sigs#1687 where the behavior of updating resources in batches changes from sending requests asynchonously to synchonously. This would lead to latencies when updating vmss vms, especially when the cluster size is huge. This unexpected change is reverted in this fix.
k8s-infra-cherrypick-robot pushed a commit to k8s-infra-cherrypick-robot/cloud-provider-azure that referenced this pull request Apr 20, 2023
A regression was introduced by kubernetes-sigs#1687 where the behavior of updating resources in batches changes from sending requests asynchonously to synchonously. This would lead to latencies when updating vmss vms, especially when the cluster size is huge. This unexpected change is reverted in this fix.
k8s-infra-cherrypick-robot pushed a commit to k8s-infra-cherrypick-robot/cloud-provider-azure that referenced this pull request Apr 20, 2023
A regression was introduced by kubernetes-sigs#1687 where the behavior of updating resources in batches changes from sending requests asynchonously to synchonously. This would lead to latencies when updating vmss vms, especially when the cluster size is huge. This unexpected change is reverted in this fix.
k8s-infra-cherrypick-robot pushed a commit to k8s-infra-cherrypick-robot/cloud-provider-azure that referenced this pull request Apr 20, 2023
A regression was introduced by kubernetes-sigs#1687 where the behavior of updating resources in batches changes from sending requests asynchonously to synchonously. This would lead to latencies when updating vmss vms, especially when the cluster size is huge. This unexpected change is reverted in this fix.
k8s-infra-cherrypick-robot pushed a commit to k8s-infra-cherrypick-robot/cloud-provider-azure that referenced this pull request Apr 20, 2023
A regression was introduced by kubernetes-sigs#1687 where the behavior of updating resources in batches changes from sending requests asynchonously to synchonously. This would lead to latencies when updating vmss vms, especially when the cluster size is huge. This unexpected change is reverted in this fix.
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. 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

7 participants