-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[hitless upgrade] Rename maintenance notification configuration properties #3450
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
Conversation
Rename configuration class and properties for maintenance notifications: - MaintenanceEventsOptions → MaintNotificationsConfig - supportMaintenanceEvents() → enableMaintNotifications() - supportsMaintenanceEvents() → maintNotificationsEnabled() - getMaintenanceEventsOptions() → getMaintNotificationsConfig() Updates all references across codebase and tests.
Rename maintenance notification address types to endpoint types: - AddressType → EndpointType enum - AddressTypeSource → EndpointTypeSource class - getAddressType() → getEndpointType() method - fixedAddressType() → endpointType() builder method - autoResolveAddressType() → autoResolveEndpointType() method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR renames configuration classes and properties for maintenance notifications to improve clarity and consistency. The changes align the naming with Redis maintenance notifications terminology while maintaining the same functionality.
- Renames
MaintenanceEventsOptionstoMaintNotificationsConfigfor better semantic clarity - Changes
AddressTypeenum and related classes toEndpointTypefor more accurate terminology - Updates all method names to use the new naming conventions (e.g.,
supportMaintenanceEvents()→maintNotificationsConfig())
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/io/lettuce/scenario/RelaxedTimeoutConfigurationTest.java | Updates test to use new MaintNotificationsConfig class and method names |
| src/test/java/io/lettuce/core/tracing/BraveTracingIntegrationTests.java | Updates tracing tests to use new configuration class and method names |
| src/test/java/io/lettuce/core/RedisHandshakeUnitTests.java | Updates handshake unit tests with new class names and method signatures |
| src/test/java/io/lettuce/core/MaintenanceEventsOptionsUnitTests.java | Removes old unit test file for MaintenanceEventsOptions |
| src/test/java/io/lettuce/core/MaintNotificationsConfigUnitTests.java | Adds new unit test file for MaintNotificationsConfig |
| src/main/java/io/lettuce/core/protocol/RebindState.java | Updates JavaDoc reference to new method name |
| src/main/java/io/lettuce/core/protocol/MaintenanceAwareExpiryWriter.java | Updates JavaDoc references to new configuration method |
| src/main/java/io/lettuce/core/protocol/MaintenanceAwareConnectionWatchdog.java | Updates JavaDoc reference to new configuration method |
| src/main/java/io/lettuce/core/protocol/MaintenanceAwareComponent.java | Updates JavaDoc reference to new configuration method |
| src/main/java/io/lettuce/core/protocol/CommandHandler.java | Adds missing braces and debug check for rebind logging |
| src/main/java/io/lettuce/core/protocol/CommandExpiryWriter.java | Updates method call to use new configuration method name |
| src/main/java/io/lettuce/core/TimeoutOptions.java | Updates JavaDoc references to new configuration method |
| src/main/java/io/lettuce/core/RedisHandshake.java | Updates class to use new EndpointTypeSource and method names |
| src/main/java/io/lettuce/core/MaintenanceEventsOptions.java | Removes old configuration class |
| src/main/java/io/lettuce/core/MaintNotificationsConfig.java | Adds new configuration class with updated naming |
| src/main/java/io/lettuce/core/ConnectionBuilder.java | Updates to use new configuration method name |
| src/main/java/io/lettuce/core/ClientOptions.java | Updates to use new configuration class and method names |
| src/main/java/io/lettuce/core/AbstractRedisClient.java | Updates to use new configuration class and removes unused imports |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/test/java/io/lettuce/core/MaintNotificationsConfigUnitTests.java
Outdated
Show resolved
Hide resolved
- maintenanceEventsConfig -> maintNotificationsConfig - movingEndpointAddressType -> endpointType corresponding lettuce-core change redis/lettuce#3450
runner-config.yaml is not changed to not break existing test configuration Code is updated to use updated builder names from corresponding lettuce-core change redis/lettuce#3450
|
run scenario tests |
1 similar comment
|
run scenario tests |
uglide
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
|
run scenario tests |
|
|
|
|
Rename maintenance notification configuration properties
Summary
Renames configuration classes and properties for better clarity and consistency in maintenance notification handling.
Consistent Naming: Aligns with Redis maintenance notifications terminology
Changes Made
1. MaintenanceEventsOptions → MaintNotificationsConfig
MaintenanceEventsOptionstoMaintNotificationsConfigsupportMaintenanceEvents()→enableMaintNotifications()supportsMaintenanceEvents()→maintNotificationsEnabled()getMaintenanceEventsOptions()→getMaintNotificationsConfig()supportMaintenanceEvents()→maintNotificationsConfig()2. AddressType → EndpointType
AddressTypetoEndpointTypefor better semantic clarityAddressTypeSource→EndpointTypeSourcegetAddressType()→getEndpointType()fixedAddressType()→endpointType()autoResolveAddressType()→autoResolveEndpointType()FixedAddressTypeSource→FixedEndpointTypeSourceAutoresolveAddressTypeSource→AutoresolveEndpointTypeSourceExample after rename
Backward Compatibility
This is a breaking change that requires applications to update their maintenance notification configuration to use the new property names. There is no GA release of the Maintenance Notifications feature, meaning it should not be a concern
mvn formatter:formattarget. Don’t submit any formatting related changes.