Repository navigation
Make lease allocation strategy pluggable - #65
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a8a6c806d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| public class AllocationStrategyConfiguration { | ||
|
|
||
| @Bean | ||
| @ConditionalOnMissingBean(AllocationStrategy.class) |
There was a problem hiding this comment.
Keep the missing-bean condition behind user configurations
If a consumer declares its custom strategy in a separate @Configuration class that is processed after this imported configuration, @ConditionalOnMissingBean can register the default first, leaving two AllocationStrategy beans and making injection into capacityAllocator ambiguous. TrafficControlConfiguration imports this class directly rather than loading it through Boot’s auto-configuration ordering; the new test uses AutoConfigurations.of(...) and does not cover that import path. Ensure user bean definitions are considered before registering the default.
Useful? React with 👍 / 👎.



Summary
AllocationStrategyConfigurationto register a default allocation strategy.@ConditionalOnMissingBeanto allow applications to provide customAllocationStrategyimplementations.TrafficControlConfigurationto inject the configured strategy.Testing
mvn clean testCloses #3