Skip to content

feat: add utility functions for scheduler #66

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

Diaphteiros
Copy link
Contributor

@Diaphteiros Diaphteiros commented Jun 23, 2025

What this PR does / why we need it:
When implementing preemptive scheduling, I needed a few utility functions which I put into this repo.
See release notes for more details.

Which issue(s) this PR fixes:
None

Special notes for your reviewer:
Prerequisite for openmcp-project/openmcp-operator#67

Release note:

The `pkg/collections/maps` package now has `MapKeys`, `MapValues`, and `GetAny` functions to extract data from maps.
The `pkg/collections` package now has projection (`ProjectSlice`, `ProjectMapToSlice`, `ProjectMapToMap`) and aggregation (`AggregateSlice`, `AggregateMap`) functions to perform operations for each entry of a slice or map.
The `pkg/controller` package has a new `RemoveFinalizerWithPrefix` function that removes the first finalizer from the object with the given prefix.
The testing library's `ComplexEnvironment` and `Environment` types can now be configured to add UIDs to created resources (the fake client doesn't do this). Use the `WithUIDs` method in the builder and additionally use `InjectUIDOnObjectCreation` if you overwrite the fake client's interceptor funcs to enable this functionality.
Added a `pkg/retry` package that contains a `client.Client` implementation which retries failed k8s operations according to configurable parameters (interval, max number of attempts, timeout, interval backoff multiplier).

@Diaphteiros Diaphteiros changed the title add utility functions for scheduler feat: add utility functions for scheduler Jun 23, 2025
@Diaphteiros Diaphteiros marked this pull request as draft June 23, 2025 11:50
@Diaphteiros Diaphteiros marked this pull request as ready for review June 23, 2025 15:47
reshnm
reshnm previously approved these changes Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants