Open Ankitasw opened 2 years ago
/triage accepted /priority backlog /help
@richardcase: This request has been marked as needing help from a contributor.
Please ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help
command.
/assign
@LucaLanziani - it's probably worth synching with @Ankitasw as she is doing some refactoring in a similar area with #3345
@richardcase I think this refactor should not collide with what I am doing in #3345, is it correct? Yeah but since we will have two PRs raised, we might get merge conflicts.
I was looking yesterday at the code and I've seen that in the tests the reconcideDelete method is called using multiple cluster scopes instead of passing the different scopes.
I didn't have time to go into details on why that is but I was thinking that it might look confusing when passing in a struct if the struct looks something like this:
type ReconcilerScopes struct {
machineScope *scope.MachineScope
clusterScope cloud.ClusterScoper
ec2Scope scope.EC2Scope
elbScope scope.ELBScope
objectStoreScope scope.S3Scope
}
rs := ReconcilerScopes{
machineScope: ms,
clusterScope: cs,
ec2Scope: cs,
elbScope: cs,
objectStoreScope: cs,
}
@richardcase I think this refactor should not collide with what I am doing in #3345, is it correct? Yeah but since we will have two PRs raised, we might get merge conflicts.
What you are telling me is that I should move faster and try to get my PR in before yours ;P
@richardcase I think this refactor should not collide with what I am doing in #3345, is it correct? Yeah but since we will have two PRs raised, we might get merge conflicts.
What you are telling me is that I should move faster and try to get my PR in before yours ;P
:rofl: I only mentioned it for awareness because you are working on the same controllers.
I didn't have time to go into details on why that is but I was thinking that it might look confusing when passing in a struct if the struct looks something like this:
Personally i think we are getting to the point where passing a struct is preferable to the large number of arguments, it would be a bit cleaner. We could call it something like:
type reconcileDeleteInput struct {
}
Or something like that.
Personally i think we are getting to the point where passing a struct is preferable to the large number of arguments, it would be a bit cleaner. We could call it something like:
type reconcileDeleteInput struct { }
Or something like that.
I just realized that I linked the wrong line on the test, I'm ok to change the name of the structure, I was more referring to the fact that we are assigning the same cs
to ec2Scope, elbScope, objectStoreScope
/lifecycle active
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the PR is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
This issue has not been updated in over 1 year, and should be re-triaged.
You can:
/triage accepted
(org members only)/close
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/
/remove-triage accepted
/kind refactor
Describe the solution you'd like SInce we have got a lot of input scope parameters to reconcile functions in controllers, it would be good to add an input struct for these functions with all the scopes we are passing in.
Example Current code
Expectation
We should take care of all such instances in controllers. Originally posted by @richardcase in https://github.com/kubernetes-sigs/cluster-api-provider-aws/pull/2271#r805753482