Skip to content

Simplify dependency ready filters to use IsAvailable directly#674

Merged
mandre merged 1 commit intok-orc:mainfrom
shiftstack:ensure-deps-available
Apr 17, 2026
Merged

Simplify dependency ready filters to use IsAvailable directly#674
mandre merged 1 commit intok-orc:mainfrom
shiftstack:ensure-deps-available

Conversation

@mandre
Copy link
Copy Markdown
Collaborator

@mandre mandre commented Feb 5, 2026

Since IsAvailable implies Status.ID is set, the redundant check for
Status.ID != nil can be removed. Made IsAvailable generic to allow
passing it directly as a filter function, eliminating boilerplate
lambdas across all controllers.

This makes the code more concise and ensures consistent availability
checking for all dependencies.

@github-actions github-actions Bot added the semver:major Breaking change label Feb 5, 2026
@mandre
Copy link
Copy Markdown
Collaborator Author

mandre commented Feb 5, 2026

I'll split this PR into 2 changes to avoid the fix being part of a breaking change.

@mandre
Copy link
Copy Markdown
Collaborator Author

mandre commented Feb 5, 2026

Backward compatible PR submitted here. I'll repurpose this one for the cleanup, that we'll merge later.

@mandre mandre force-pushed the ensure-deps-available branch from 0e71cc5 to 712780b Compare February 5, 2026 15:54
@mandre mandre changed the title Ensure port dependencies are available Simplify dependency ready filters to use IsAvailable directly Feb 5, 2026
@eshulman2
Copy link
Copy Markdown
Contributor

eshulman2 commented Feb 8, 2026

Great change, would simplify management across the entire code base and would make it easier to set user strategies (if implemented) in this feature request #673

/lgtm

@mandre mandre added this to the Release 3.0 milestone Mar 11, 2026
Since IsAvailable implies Status.ID is set, the redundant check for
Status.ID != nil can be removed. Made IsAvailable generic to allow
passing it directly as a filter function, eliminating boilerplate
lambdas across all controllers.

This makes the code more concise and ensures consistent availability
checking for all dependencies.
@mandre mandre force-pushed the ensure-deps-available branch from 712780b to 80aa64d Compare April 17, 2026 15:30
@mandre mandre added this pull request to the merge queue Apr 17, 2026
Merged via the queue into k-orc:main with commit 815934d Apr 17, 2026
10 checks passed
@mandre mandre deleted the ensure-deps-available branch April 17, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:major Breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants