-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Encapsulate Redis Scan CursorId #2802
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
I do like having a dedicated type to encapsulate the cursor id. However, I'm curious if we'd be able to leverage |
01953d1
to
20fb0f4
Compare
We now retain the raw cursor value without attempting to convert it into a long as Redis uses 64 bit unsigned integers exceeding Long.MAX_VALUE. Fix broken id parsing for unsigned long value Update deprecation warnings and method visibility.
update jenkinsfile to test against redis 7.2 Switch test to stable config property. Replace usage of DEBUG command.
eafb8f5
to
36e50e7
Compare
@@ -14,6 +14,7 @@ docker.mongodb.7.0.version=7.0.2 | |||
|
|||
# Supported versions of Redis | |||
docker.redis.6.version=6.2.13 | |||
docker.redis.7.version=7.2.4 |
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.
Mind updating the property in Spring Data Build as well?
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.
created the task already spring-projects/spring-data-build#2212 waiting for final review.
Jenkinsfile
Outdated
sh "PROFILE=none LONG_TESTS=true JENKINS_USER_NAME=${p['jenkins.user.name']} ci/test.sh" | ||
} | ||
} | ||
} |
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.
Something is off in indentation (tabs vs spaces).
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.
let me have a look at that.
ci/test.sh
Outdated
@@ -18,7 +18,7 @@ export JENKINS_USER=${JENKINS_USER_NAME} | |||
export GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} | |||
|
|||
# Execute maven test | |||
MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml clean test -P${PROFILE} -DrunLongTests=${LONG_TESTS:-false} -U -B | |||
MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml clean test -P${PROFILE} -DrunLongTests=${LONG_TESTS:-false} -Dgradle.cache.local.enabled=false -Dgradle.cache.remote.enabled=false -U -B |
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.
@erichaagdev Can you provide guidance on how to not skip tests when running builds against different build stages where the only change is the Redis or JDK version?
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.
This PR will cause all tests to re-run in builds with these Maven options since it disables the build cache.
Test results come from cache when all inputs to the surefire/failsafe goal match a previous invocation in the cache. These inputs include the JDK version and the runtime classpath. So, assuming you have Redis in the classpath, these tests should re-execute on these sorts of changes even with the cache enabled.
Have you seen different behavior than this?
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.
This PR will cause all tests to re-run in builds with these Maven options since it disables the build cache.
That is intended because we want to run integration tests against a different Redis version. Our Redis service is an externally managed service that does not affect the classpath. We would need to have to tell the caching inputs about a changed cache key somehow.
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.
I see. Essentially, you want to represent the version of Redis as an input to the surefire/failsafe goals. The documentation for that can be found here.
More specifically, you could either:
- Pass in the Redis version as a system property to
<argLine>
- Specify some file in the Redis installation that represents the version as an input file
Either of these would invalidate the cache when the Redis version changes.
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.
Thanks for the detail. <argLine>
seems the most promising approach for now.
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.
CI changes look good.
Update jenkinsfile to test against redis 7.2 Replace usage of DEBUG command. Provide Redis server version and client lib version to maven build system / gradle cache. Original Pull Request: #2802
We now retain the raw cursor value without attempting to convert it into a long as Redis uses 64 bit unsigned integers exceeding
Long.MAX_VALUE
.Closes #2796