Skip to content
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

Fix property-based Load Balancing Strategy configuration bug #2802

Merged
merged 3 commits into from Aug 21, 2023

Conversation

smcvb
Copy link
Member

@smcvb smcvb commented Aug 18, 2023

Although Spring resolved the name for the load balancing properties based on the @ConfigurationProperties annotation on the getter of the AxonServerConfiguration.EventHandlingConfiguration, it was unable to set the properties in this format.
I assume this has to do with the discrepancy between the defined property and the field and its getter/setter.

To keep the property path name that's already propagated throughout our user base, I've opted to rename the AxonServerConfigurationEventProcessorConfiguration to AxonServerConfigurationEventhandling. By doing so, we align with the path "axon.axonserver.eventhandling"`.

Although we should strictly regard this as a breaking change, I think the chances are minimal somebody interacts with the object, i.o. through a property file.

Next to this, I have renamed the method returning the field automaticBalancing from shouldAutomaticallyBalance to isAutomaticBalancing.
Although this time, the IDE did resolve the axon.axonserver.eventhandling.processors.[processor-name].automatic-balancing property, it did complain that it could not resolve it.
After adjusting the getter to align with the property name, the IDE no longer complained.

Similarly, as with the class rename, we should regard this as a breaking change.
But, again, similarly, I do not anticipate users to interact directly with this operation and instead use the property files.

Although Spring resolved the name for the properties based on the
ConfigurationProperties annotation on the getter, it is unable to set
the properties in this format. To keep the property path name that's
already propagated throughout our user base, I've opted to rename the
EventProcessorConfiguration to Eventhandling, to align with the path
"axon.axonserver.eventhandling". Although we should strictly regard this
 as a breaking change, I think the chances are minimal somebody is
 directly interacting with the object i.o. through property files.

#bug/load-balancing-strategy-in-property-file
Rename shouldAutomaticallyBalance to isAutomaticBalancing to align with
the field name. Without doing so, the property can be auto-completed in
an IDE, but is regarded as unresolved for documentation.

#bug/load-balancing-strategy-in-property-file
Add load balancing property test case

#bug/load-balancing-strategy-in-property-file
@smcvb smcvb added Type: Bug Use to signal issues that describe a bug within the system. Priority 1: Must Highest priority. A release cannot be made if this issue isn’t resolved. Status: In Progress Use to signal this issue is actively worked on. labels Aug 18, 2023
@smcvb smcvb added this to the Release 4.8.2 milestone Aug 18, 2023
@smcvb smcvb requested a review from a team August 18, 2023 15:29
@smcvb smcvb self-assigned this Aug 18, 2023
@smcvb smcvb requested review from gklijs and CodeDrivenMitch and removed request for a team August 18, 2023 15:29
Copy link
Contributor

@gklijs gklijs left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@sonarcloud
Copy link

sonarcloud bot commented Aug 21, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@smcvb smcvb merged commit f43e5c5 into axon-4.8.x Aug 21, 2023
8 of 11 checks passed
@smcvb smcvb deleted the bug/load-balancing-strategy-in-property-file branch August 21, 2023 09:39
@smcvb smcvb added Status: Resolved Use to signal that work on this issue is done. and removed Status: In Progress Use to signal this issue is actively worked on. labels Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority 1: Must Highest priority. A release cannot be made if this issue isn’t resolved. Status: Resolved Use to signal that work on this issue is done. Type: Bug Use to signal issues that describe a bug within the system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants