-
Notifications
You must be signed in to change notification settings - Fork 702
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
Add cross-version test framework (and a simple test) #1371
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #1371 +/- ##
============================================
+ Coverage 70.80% 70.95% +0.15%
============================================
Files 121 121
Lines 65132 65132
============================================
+ Hits 46118 46216 +98
+ Misses 19014 18916 -98 |
This includes a way to run two versions of the server from the TCL test framework. The runtest script accepts a new parameter --old-server-path path/to/valkey-server and a new tag "needs:old-server" for test cases and start_server. Includes an attempt to run it in CI as well. Signed-off-by: Viktor Söderqvist <[email protected]>
8403010
to
77c4c0d
Compare
and linebreak long lines in the ./runtest --help output Signed-off-by: Viktor Söderqvist <[email protected]>
.github/workflows/ci.yml
Outdated
cd tests/tmp | ||
wget https://download.valkey.io/releases/valkey-7.2.7-focal-x86_64.tar.gz | ||
tar -xvf valkey-7.2.7-focal-x86_64.tar.gz |
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 would prefer this to be in a script which can be invoked by multiple tests and provide engine version as parameter and skip downloading if it already exists.
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 was thinking keep it minimal and that we can add some abstraction for it when we need it.
What kind of script do you have in mind? A python script under utils/, a yaml file under .github/ or a TCL script under tests/? If we put it under utils/, does that mean we officially support the script?
If we add a script with these few lines, is the version parameter a string like "7.2.7" and we assume the rest of the URLs are always identical? What if we're testing something from another URL, or with a different executable name (an old redis-server, kvdb-server, etc.) Then the parameters are bigger than the script itself.
So far, we don't have any scripts that downloads anything from hard-coded URLs, apart from in the CI jobs, so it think this might be the best place for it. Can we add some github action definition that can be used from multiple github actions?
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.
Sticking to Github actions options seems problematic i.e. how do other vendors/users test backward compatibility locally?
My thought is to have a python script with well defined old server name+version (enum) and download path (doesn't need to be identical). And yes, we would need to support it officially.
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.
how do other vendors/users test backward compatibility locally?
Like this:
./runtest --old-server-path ../my-other-valkey-clone/src/valkey-server
You may want to build it from source, either a source release or a git checkout, even to test a development branch against unstable.
Using a binary release from our website was just a simple way to get the CI running. Not sure it's the best way or a method I want to officially support.
My thought is to have a python script with well defined old server name+version (enum) and download path (doesn't need to be identical). And yes, we would need to support it officially.
It seems like a commitment to support a bunch of URLs to binary releases. I don't really see the benefit. Is it to have predictable tests? Each compatiblity test uses a fixed version, so it knows what to expect?
Keep in mind that it's also a different binary for a different architecture and per OS. To run it on ARM, you can't use the same binary. There are even differences between ubuntu versions, like OpenSSL version and such things.
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.
For daily are we going to run it against all supported versions? That can also be a followup.
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.
Yes, sounds good, and we should add some more meaningful test cases too, like the one we wanted for the light-weight cluster message and the cluster ping-extension issues we've had in the past. I just wanted to create the scaffolding and a simple test case first.
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's do this incrementally maybe? I think it's better to have this code in and running and we can adjust it as needed, for now just a wget seems OK.
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.
Simple and efficient.
.github/workflows/ci.yml
Outdated
cd tests/tmp | ||
wget https://download.valkey.io/releases/valkey-7.2.7-focal-x86_64.tar.gz | ||
tar -xvf valkey-7.2.7-focal-x86_64.tar.gz |
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.
For daily are we going to run it against all supported versions? That can also be a followup.
Signed-off-by: Viktor Söderqvist <[email protected]>
Yes, a follow up. More importantly, we should add some cross-version tests for the cluster bus with ping extensions, lightweigt pubsub and such things, especially when we're developing new such features to make sure we don't break the rolling upgrade scenarios. I'd like to see rolling upgrade tests of a whole cluster too. |
The
|
I've never seen this fail anywhere else before. I wonder if there is something about how it's being used in this instance that might take extra time. |
Signed-off-by: Viktor Söderqvist <[email protected]>
Thx @madolson. I'm just worried about introducing a flaky test here. I'll merge it if everything passes after updating the PR. |
@zuiderkwast let us know if you need any help with wrapping up this PR. @sarthakaggarwal97 is happy to help. |
I answered this in my previous comment. Please help ensure we don't have a flaky test. And please clean up the flaky tests in unstable. Let's have at least two weeks without Daily failing. |
Signed-off-by: Viktor Söderqvist <[email protected]>
After merging unstable, the
And they're built with libssl 1.1.1 so they refuse to start on any recent OS.... @hpatro Any suggestions what to do now? |
Signed-off-by: Viktor Söderqvist <[email protected]>
It seems the binary for 7.2.8 for "noble" is just missing. Using 7.2.7 for noble works. However, it might break automatically next time ubuntu-latest is bumbed, in two years or so. I'm going to merge this now. Follow-up: If we use binaries built for ubuntu-24, we should probably lock the CI job to run on ubuntu-24 rather than ubuntu-latest. Another option is to run a container instead of a binary download. Help wanted with this follow-up. |
It's odd that we have noble for 7.2.7, unsure if we built it manually and uploaded it to the S3 bucket. I don't see we have it listed on the website as well https://valkey.io/download/releases/v7-2-7/ . |
This includes a way to run two versions of the server from the TCL test framework. It's a preparation to add more cross-version tests. The runtest script accepts a new parameter
and a new tag "needs:other-server" for test cases and start_server. Tests with this tag are automatically skipped if
--other-server-path
is not provided.This PR adds it in a CI job with Valkey 7.2.7 by downloading a binary release.
Fixes #76