Skip to content

Conversation

@afritzler
Copy link
Member

Proposed Changes

Refactor BIOSSettingsSetReconciler and improve watch setup.

@afritzler afritzler requested a review from a team as a code owner December 16, 2025 11:41
@github-actions github-actions bot added size/L enhancement New feature or request labels Dec 16, 2025
Copy link
Contributor

@Nuckal777 Nuckal777 left a comment

Choose a reason for hiding this comment

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

Thanks, just some nitpicks from my side.

}
return reqs

result := make([]ctrl.Request, 0, 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Capacity should probably be len(reqs).

func handleIgnoreAnnotationPropagation(ctx context.Context, log logr.Logger, c client.Client, parentObj client.Object, ownedObjects client.ObjectList) error {
var errs []error
_ = meta.EachListItem(ownedObjects, func(obj runtime.Object) error {
if err := meta.EachListItem(ownedObjects, func(obj runtime.Object) error {
Copy link
Contributor

@Nuckal777 Nuckal777 Dec 16, 2025

Choose a reason for hiding this comment

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

Taking the error from meta.EachListItem changes the semantics. Previously the whole list of items was iterated and the patching was always tried for each object. Now, remaining items after an item caused an error would be ignored.

return nil
})
}); errs != nil {
errs = append(errs, err)
Copy link
Contributor

Choose a reason for hiding this comment

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

If we use the error from meta.EachListItem() the errs slice isn't needed anymore.

func handleRetryAnnotationPropagation(ctx context.Context, log logr.Logger, c client.Client, parentObj client.Object, ownedObjects client.ObjectList) error {
var errs []error
_ = meta.EachListItem(ownedObjects, func(obj runtime.Object) error {
if err := meta.EachListItem(ownedObjects, func(obj runtime.Object) error {
Copy link
Contributor

@Nuckal777 Nuckal777 Dec 16, 2025

Choose a reason for hiding this comment

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

Taking the error from meta.EachListItem changes the semantics. Previously the whole list of items was iterated and the patching was always tried for each object. Now, remaining items after an item caused an error would be ignored.

return nil
})
}); errs != nil {
errs = append(errs, err)
Copy link
Contributor

Choose a reason for hiding this comment

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

If we use the error from meta.EachListItem() the errs slice isn't needed anymore.

@afritzler
Copy link
Member Author

Thanks a lot @Nuckal777 for the feedback. I addressed your comments and rolled back the error handling in the propagation methods. Lets deal with that in a separate PR.

@Nuckal777 Nuckal777 merged commit 6843aee into main Dec 17, 2025
14 of 17 checks passed
@Nuckal777 Nuckal777 deleted the enh/biossettingsset branch December 17, 2025 13:41
@github-project-automation github-project-automation bot moved this to Done in Roadmap Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size/L

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants