-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improve smoketester JDK versions support #13107
Comments
Thanks @rmuir for opening the issue. I was about to do the same. It would be good to have a quickndirty solution working with the ongoing Lucene 9.10.0 release. |
I think it may still parse the Java version passed as alternative java homes, but just ensure they are >= the base version. |
gradle should fail with a clear error though if the version is not supported. |
Correct. My problem is in addition: I want to also test java 22, but Gradle refuses to run this one, you need RUNTIME_JAVA_HOME and execute with earlier one. Maybe I run test tests at command line then. |
yeah, i think for the smoketester we should just test only java versions supported by gradle? Since this is different than just running tests but trying to check that much more stuff works correctly. |
There is value in people running smoke tester in various environments and configurations but I think we could also define a github workflow which would run the smoke tester against a matrix of JVMs (and maybe OSs). This is quite trivial to do and the benefit here is that these multiple jobs in the matrix run in parallel. The only thing I'm not sure of is whether a single check would fit within github's timeout limit (but I believe they should). |
It was a thing we previously did with |
From what I remember, at a basic level, the previous "nightly-smoketest" job would create a release, then run the smoketester on the release. Stuff such as GPG checks might have required special touch... |
You could even disable the running of tests (which might be the slowest part) for such a github workflow job. The real value is in the release checks and the packaging and all that, that isn't otherwise validated by any CI. |
I agree - I've just taken a look and tests consume a lot of time on gh jobs. The rest should be doable. |
I have a Jenkins Job for that. Running it in a matrix is possible, but does not help with the problem described here. The base JDK version (11 in 9.x) must always be provided and the alternative one can only Java 17. So I still would like to have the option to let Jenkins run with various JDKs in a flexible way. If you want to parallelize, you can do that - of course. But simplicity of setting up a Jenkins Job like I did is to run a single script with a suitable command line parameter. So basically we need smoketester to run with base Java (enforced to ensure we are compatible). The xtra JVM passed to run tests should be configureable. I'd still like to run all tests with the supplied Javas on the RELEASE.src file not from git checkout. So let's only fix the static spaghetti in smoker to run base and a number of extras. Uwe |
It does not need to be Github (it would consume ASF's credits, which are limited). Jenkins does the matrix testing already. |
well, i think part of what makes changing the smoketester scary is that there's no validation of it in any PR I make. So if the github action would "verify smoketester works" but simply disable the execution of tests, it would make me feel a lot more comfortable. The tests will already be run by the other github action. |
Add a command line parameter to disable tests. The we could test it. Anyways: If you have a branch I can try it on policeman. |
ok, i'm gonna look at trying to tackle the smoketester.py (for main branch first!) this evening. |
I was looking at this in the background and wrote a quick hack to add |
Thanks @stefanvodita. I will give it a try now on Policeman Jenkins! Maybe remove the hard coded java 17. I think instead of printing Java version it could just print the command line / JAVA_HOME. Can I pass multiple I think a better solution may save the version number also in the returned tuple, but for now this helps. |
You can. For example, I ran:
|
Setting up the job already on Jenkins using your branch :-) For Java 22 I will do a separate run of just tests, because it is impossible to run Gradle with Java 22. |
@stefanvodita 's PR branch works on Policeman Jenkins (we had to disable the version check): https://jenkins.thetaphi.de/job/Lucene-Release-Tester-v2/3/console Once this succeeds I will give my +1 vote to Lucene 9.10.0 release :-) May take several hours. |
So, here's what I managed to do so far. I've set up a simple gh workflow that can be triggered manually and provided with a release candidate to verify - here's what it looks like: the workflow runs a matrix test against an array of JDKs: 11, 17, 21, 22-ea, automatically fetching the latest version of these (temurin distribution). A parameter allows one to turn off the tests (I'm not sure how long they'd take on github - was afraid to check...). Interestingly, I didn't have to touch the smoke tester at all as it already allows passing parameters to gradle, so I:
Here is the whole workflow definition - And here's a run I made to confirm it's working: note each run against a different JVM, including 22-ea, the logs confirming this: The execution times are not bad at all - ~10 minutes per job and they're mostly in parallel, so no big deal I think. From here, I think it's a short walk to making a workflow that builds the distribution first, uploads it as an artifact which is then consumed by a job verifying the smoke tester against all the JVMs in question... unfortunately I won't be able to work on this the following week so if somebody wishes to take over and try, please go ahead. |
Description
Currently it is difficult for smoketester to "keep up" with supported java versions, which are moving faster these days.
@uschindler ran into it with the release vote for 9.10, and I ran into it on #12753
From Uwe:
So I think the smoketester should require a specific version and check it, for JAVA_HOME. This should be the minimal required java version. But we should also allow passing other JDKs too.
This would make it easier to maintain the logic going forwards.
The text was updated successfully, but these errors were encountered: