Closed thachlp closed 1 week ago
Just talked to @mp911de and he agreed that we should probably remove io.lettuce.core.masterreplica. ReadOnlyCommands
. This could be done in another PR, but it would be awesome if we can do it here.
Hey @thachlp , thanks for submitting this PR.
I think there are a few things we needs to address first:
- Seems like there are two
ReadOnlyCommands
classes - one in theio.lettuce.core.masterreplica
package and one in theio.lettuce.core.protocol
package. The one you modified (in theio.lettuce.core.masterreplica
) appears to be unused. I believe the change needs to be done in theio.lettuce.core.protocol.ReadOnlyCommands
class. Let's change both classes for now similar to how it was done in Add GEOSEARCH to read-only commands #2568Β #2569- The
GEOSEARCH
command is read-only, let's not remove it from the list:COMMAND INFO GEOSEARCH 1) 1) "geosearch" 2) "-7" 3) 1) "readonly" 4) "1"
- In a perfect world I'd love to see an integration test that loops over these commands and verifies that they are readonly so we can quickly adapt to server change (optional, but would be very nice).
@tishun,
You are correct, I rechecked and updated the list, please help review π
Is there any way that I can run the integration test in local? I try to write the test that you recommend but I got the error
java: package jdk.net does not exist
. How can I fix it?
Hey @thachlp , thanks for submitting this PR. I think there are a few things we needs to address first:
- Seems like there are two
ReadOnlyCommands
classes - one in theio.lettuce.core.masterreplica
package and one in theio.lettuce.core.protocol
package. The one you modified (in theio.lettuce.core.masterreplica
) appears to be unused. I believe the change needs to be done in theio.lettuce.core.protocol.ReadOnlyCommands
class. Let's change both classes for now similar to how it was done in Add GEOSEARCH to read-only commands #2568Β #2569- The
GEOSEARCH
command is read-only, let's not remove it from the list:COMMAND INFO GEOSEARCH 1) 1) "geosearch" 2) "-7" 3) 1) "readonly" 4) "1"
- In a perfect world I'd love to see an integration test that loops over these commands and verifies that they are readonly so we can quickly adapt to server change (optional, but would be very nice).
@tishun, You are correct, I rechecked and updated the list, please help review π Is there any way that I can run the integration test in local? I try to write the test that you recommend but I got the error
java: package jdk.net does not exist
. How can I fix it?
You should be able to run test locally if you call make test
You'd need to format your new changes too, try using mvn formatter:format
You'd need to format your new changes too, try using
mvn formatter:format
Thanks @tishun π
You'd need to format your new changes too, try using
mvn formatter:format
Thanks @tishun π
Hi @tishun, the error from CI is weird, could you re-run the job? Do you have any recommend?
You'd need to format your new changes too, try using
mvn formatter:format
Thanks @tishun π
Hi @tishun, the error from CI is weird, could you re-run the job? Do you have any recommend?
Hey @thachlp , [List.of()](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html#of()) is a feature of Java 9, and we compile with Java 8 to achieve maximum backwards compatibility.
Could you change the use of this method with something else like Arrays.asList()
You'd need to format your new changes too, try using
mvn formatter:format
Thanks @tishun π
Hi @tishun, the error from CI is weird, could you re-run the job? Do you have any recommend?
Hey @thachlp , [List.of()](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/List.html#of()) is a feature of Java 9, and we compile with Java 8 to achieve maximum backwards compatibility.
Could you change the use of this method with something else like
Arrays.asList()
Nice, thanks
I think you need to rebase your changes to include the latest fixes to the unit tests to pass the CI
I think you need to rebase your changes to include the latest fixes to the unit tests to pass the CI
@tishun, it's done π
Thanks for the contribution!
Issue: #2832
Make sure that:
[ ] You submit test cases (unit or integration tests) that back your changes.