Skip to content

Introduce a NeedsRollout filter in util/collections package #7215

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

Closed
ykakarap opened this issue Sep 14, 2022 · 8 comments · Fixed by #7571
Closed

Introduce a NeedsRollout filter in util/collections package #7215

ykakarap opened this issue Sep 14, 2022 · 8 comments · Fixed by #7571
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@ykakarap
Copy link
Contributor

Detailed Description

The MachinesNeedingRollout and the UpToDateMachines functions in controlplane/kubeadm/internal/ use a combination of filters to determine if a machine needs rollout (or the negation = is stable).

Let's introduce a new filter named NeedsRollout that will be used as the single filter in these two functions. This way we can keep the list of filters that make up a rollout in a single place.

/kind cleanup
/good-first-issue

/hold until #6983 is merged as it introduces a new filter to the list.

@k8s-ci-robot
Copy link
Contributor

@ykakarap:
This request has been marked as suitable for new contributors.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

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-good-first-issue command.

In response to this:

Detailed Description

The MachinesNeedingRollout and the UpToDateMachines functions in controlplane/kubeadm/internal/ use a combination of filters to determine if a machine needs rollout (or the negation = is stable).

Let's introduce a new filter named NeedsRollout that will be used as the single filter in these two functions. This way we can keep the list of filters that make up a rollout in a single place.

/kind cleanup
/good-first-issue

/hold until #6983 is merged as it introduces a new filter to the list.

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 kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 14, 2022
@dharmicksai
Copy link
Contributor

Hello, I would like to work on this issue
/assign

@fabriziopandini
Copy link
Member

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 15, 2022
@aniruddha2000
Copy link
Contributor

@dharmicksai are you still working on this?

@dharmicksai
Copy link
Contributor

Hey , I am working on the task

@dharmicksai
Copy link
Contributor

@ykakarap , I dont think it is possible to create NeedsRollout filter in utils/collection .
NeedsRollout filter requires MatchesMachineSpec filter , this filter is present in controlplane/kubeadm/internal and this package imports utils/collections. Inorder to implement NeedsRollout in utils/collection we would be required to import controlplane/kubeadm/internal but this will cause compiler error ( becoz of cyclic imports ).

@dharmicksai
Copy link
Contributor

Alternate solution to this would be to create the NeedsRollout filter in controlplane/kubeadm/internal

@ykakarap
Copy link
Contributor Author

ykakarap commented Nov 2, 2022

Alternate solution to this would be to create the NeedsRollout filter in controlplane/kubeadm/internal

Sounds good. Go ahead with this. The controlplane/kubeadm/internal/filters.go is probably the best place for this since it already holds definitions for other filters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants