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 unused function setCredentials #4208

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

willie-yao
Copy link
Contributor

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
setCredentials is unused since identityRef is now required as of #4201

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

NONE

@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. labels Oct 31, 2023
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 31, 2023
@willie-yao
Copy link
Contributor Author

/cherry-pick release-1.11

@k8s-infra-cherrypick-robot

@willie-yao: once the present PR merges, I will cherry-pick it on top of release-1.11 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.11

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.

@willie-yao willie-yao changed the title Remove unused function setCredentials WIP: Remove unused function setCredentials Oct 31, 2023
@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 Oct 31, 2023
@willie-yao willie-yao force-pushed the remove-setcredentials branch from 9ec1c7c to f247f88 Compare October 31, 2023 16:45
@willie-yao willie-yao changed the title WIP: Remove unused function setCredentials Remove unused function setCredentials Oct 31, 2023
@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 Oct 31, 2023
@willie-yao willie-yao force-pushed the remove-setcredentials branch from f247f88 to 9ec1c7c Compare October 31, 2023 17:47
@CecileRobertMichon
Copy link
Contributor

@willie-yao unit tests are failing PTAL

@k8s-ci-robot k8s-ci-robot added 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 Nov 1, 2023
@willie-yao willie-yao force-pushed the remove-setcredentials branch from 63614e6 to f4231bc Compare November 1, 2023 21:33
@willie-yao willie-yao changed the title Remove unused function setCredentials WIP: Remove unused function setCredentials Nov 1, 2023
@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 Nov 1, 2023
@willie-yao
Copy link
Contributor Author

@CecileRobertMichon Turns out a ton of unit tests need to be refactored (basically all the controller tests) due to them needing to expect AzureClusterIdentity for all cases, so it may take me a bit to get all that done. Will mark the PR as WIP

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 2, 2023
azure/scope/identity.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 7, 2023
@willie-yao willie-yao force-pushed the remove-setcredentials branch from c86ade4 to 2307e6d Compare November 29, 2023 23:24
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 30, 2023
@willie-yao willie-yao force-pushed the remove-setcredentials branch 3 times, most recently from ca4ec25 to 166b2e6 Compare December 1, 2023 01:41
Copy link
Contributor

@mboersma mboersma left a comment

Choose a reason for hiding this comment

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

/lgtm
/assign @nojnhuh

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

LGTM label has been added.

Git tree hash: b36e104be79eefc94d5a5c0a7b755bde9e6c6bb0

@mboersma
Copy link
Contributor

/hold
for squash

Copy link
Contributor

@nojnhuh nojnhuh 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

@willie-yao Could you please open an issue describing any follow-up refactoring for tests?

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 18, 2023
@willie-yao willie-yao force-pushed the remove-setcredentials branch from f58f1ef to 9e6b73b Compare December 18, 2023 21:13
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 18, 2023
@willie-yao
Copy link
Contributor Author

/hold cancel

@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 Dec 18, 2023
@nojnhuh
Copy link
Contributor

nojnhuh commented Dec 18, 2023

@willie-yao Was the dependabot PR in the commit history here intentional?

@willie-yao
Copy link
Contributor Author

@willie-yao Was the dependabot PR in the commit history here intentional?

Whoops lemme fix that

@willie-yao willie-yao force-pushed the remove-setcredentials branch from 9e6b73b to 524b6a7 Compare December 18, 2023 21:23
Copy link
Contributor

@nojnhuh nojnhuh left a comment

Choose a reason for hiding this comment

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

/lgtm

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

LGTM label has been added.

Git tree hash: 1c5c487388fa39620f76737c1c794c5a55660011

Copy link
Contributor

@mboersma mboersma 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
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mboersma, nojnhuh

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 84a5a98 into kubernetes-sigs:main Dec 18, 2023
20 checks passed
@k8s-infra-cherrypick-robot

@willie-yao: #4208 failed to apply on top of branch "release-1.11":

Applying: Remove unused function setCredentials
Using index info to reconstruct a base tree...
M	azure/scope/clients_test.go
M	azure/scope/cluster.go
M	azure/scope/cluster_test.go
M	azure/scope/managedcontrolplane.go
M	azure/scope/managedcontrolplane_test.go
M	controllers/azurecluster_controller_test.go
M	controllers/azurejson_machine_controller_test.go
M	controllers/azurejson_machinepool_controller_test.go
M	controllers/azurejson_machinetemplate_controller_test.go
M	controllers/azuremachine_controller_test.go
M	controllers/azuremanagedcontrolplane_controller_test.go
M	controllers/azuremanagedmachinepool_controller_test.go
M	controllers/helpers_test.go
M	exp/controllers/azuremachinepool_controller_test.go
M	exp/controllers/azuremachinepoolmachine_controller_test.go
Falling back to patching base and 3-way merge...
Auto-merging exp/controllers/azuremachinepoolmachine_controller_test.go
CONFLICT (content): Merge conflict in exp/controllers/azuremachinepoolmachine_controller_test.go
Auto-merging exp/controllers/azuremachinepool_controller_test.go
Auto-merging controllers/helpers_test.go
CONFLICT (content): Merge conflict in controllers/helpers_test.go
Auto-merging controllers/azuremanagedmachinepool_controller_test.go
Auto-merging controllers/azuremanagedcontrolplane_controller_test.go
CONFLICT (content): Merge conflict in controllers/azuremanagedcontrolplane_controller_test.go
Auto-merging controllers/azuremachine_controller_test.go
CONFLICT (content): Merge conflict in controllers/azuremachine_controller_test.go
Auto-merging controllers/azurejson_machinetemplate_controller_test.go
Auto-merging controllers/azurejson_machinepool_controller_test.go
CONFLICT (content): Merge conflict in controllers/azurejson_machinepool_controller_test.go
Auto-merging controllers/azurejson_machine_controller_test.go
Auto-merging controllers/azurecluster_controller_test.go
CONFLICT (content): Merge conflict in controllers/azurecluster_controller_test.go
Auto-merging azure/scope/managedcontrolplane_test.go
CONFLICT (content): Merge conflict in azure/scope/managedcontrolplane_test.go
Auto-merging azure/scope/managedcontrolplane.go
Auto-merging azure/scope/cluster_test.go
CONFLICT (content): Merge conflict in azure/scope/cluster_test.go
Auto-merging azure/scope/cluster.go
CONFLICT (modify/delete): azure/scope/clients_test.go deleted in Remove unused function setCredentials and modified in HEAD. Version HEAD of azure/scope/clients_test.go left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Remove unused function setCredentials
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:

/cherry-pick release-1.11

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

@willie-yao: #4208 failed to apply on top of branch "release-1.12":

Applying: Remove unused function setCredentials
Using index info to reconstruct a base tree...
M	azure/scope/cluster.go
M	azure/scope/cluster_test.go
M	azure/scope/managedcontrolplane.go
M	azure/scope/managedcontrolplane_test.go
M	controllers/azurecluster_controller_test.go
M	controllers/azurejson_machine_controller_test.go
M	controllers/azurejson_machinepool_controller_test.go
M	controllers/azuremanagedcontrolplane_controller_test.go
M	controllers/helpers_test.go
Falling back to patching base and 3-way merge...
Auto-merging controllers/helpers_test.go
Auto-merging controllers/azuremanagedcontrolplane_controller_test.go
CONFLICT (content): Merge conflict in controllers/azuremanagedcontrolplane_controller_test.go
Auto-merging controllers/azurejson_machinepool_controller_test.go
CONFLICT (content): Merge conflict in controllers/azurejson_machinepool_controller_test.go
Auto-merging controllers/azurejson_machine_controller_test.go
Auto-merging controllers/azurecluster_controller_test.go
Auto-merging azure/scope/managedcontrolplane_test.go
CONFLICT (content): Merge conflict in azure/scope/managedcontrolplane_test.go
Auto-merging azure/scope/managedcontrolplane.go
Auto-merging azure/scope/cluster_test.go
Auto-merging azure/scope/cluster.go
Removing azure/scope/clients_test.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 Remove unused function setCredentials
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:

/cherry-pick release-1.12

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.

@willie-yao
Copy link
Contributor Author

Note: I'm holding off on making a cherry-pick to 1.11 for now since the ClusterClass for Managed Clusters PR was not merged for that release which causes massive merge conflicts. @CecileRobertMichon Would we want to do this cherry-pick even though there isn't a functional difference?

@CecileRobertMichon
Copy link
Contributor

If this is just a cleanup (no bug fix) + refactor then we don't believe we want to cherry-pick this (even in 1.12)

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
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants