-
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
Allow multiple JDKs in smoke test #13108
Conversation
Can we remove the java 17 one? Or at least map the java 17 command line parameter as additional alternative. |
We can, that would be cleaner. But this should work for testing 9.10, right? |
It's already in testing: https://jenkins.thetaphi.de/job/Lucene-Release-Tester-v2/1/console |
waaah it doesnt like the version :-(
Can you comment out the version check in your branch? |
Thanks, will retrigger the job! |
Runs: https://jenkins.thetaphi.de/job/Lucene-Release-Tester-v2/3/console I had a stupid build timeout, so retriggered. |
Smoke tester succeeded (see mailing list). |
That's great! If we extract the JDK version number as well, maybe we can commit this. |
Extracting the JDK version number is already implemented, because there's a check for Java 11 and Java 17 already.
I would remove all of them. Only the base version should be checked (so in 9.x base version must be 11). The other versions passed as cmd line parameter should maybe just checked to be >= base version. If you want backwards compatibility, you can keep the old cmd line parameters and just add the arguments from the specific parameters to the list of alternative versions. But as this is a developer tools only, I don't think we need any backwards compatibility. |
+1
+1 What's the latest status of this PR? It looks like it is in reasonable shape and just needs to address some comments, right? |
Right, there are only a couple things left to do. I'll wrap this one up during the weekend. |
Basically, to make the whole script better maintainable:
|
Allow multiple JDKs in smoke test Comment out version check Remove special handling for JDK 17 Consolidate base version into a single constant Handle version checks and logs
87a083f
to
d49369c
Compare
@uschindler - I addressed your first three points. On the last two points I think I'm missing some of the context to understand the issues. I'll try to dig a bit to understand those better. Is this a "progress not perfection" situation, where we can treat the last 2 points in a separate PR or are they tightly bound with the rest of this work? As far as testing, it's a bit annoying to do, but I think I've got the script working correctly. I used the latest available RC (9.9.0):
There was an error about 8.11.3 back compatibility not being tested, but I think that has to do with it being released after 9.9.0, and not with the changes to the script. |
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 just found a minor problem and suggest to change the messages a bit. Otherwise looks fine +1
We can open another issue about the problem with Java 22+ (Gradle does not start with Java 22, so you can't test it). What you do is the following (Jenkins does this for example): JAVA_HOME
always points to base version, but RUNTIME_JAVA_HOME
is used to instruct Gradle to run all compilation and tests with that JDK.
I agree, this can be a separate issue. The workaround at moment is to run the smoketester with RUNTIME_JAVA_HOME
env var :-)
testDemo(java.run_java, isSrc, version, BASE_JAVA_VERSION) | ||
if java.run_alt_javas: | ||
for run_alt_java, alt_java_version in zip(java.run_alt_javas, java.alt_java_versions): | ||
print("DELETEME") |
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, DELETE ME ! :-)
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 noticing, I forgot about this one.
print('Java %s JAVA_HOME=%s' % (actual_version, java_home)) | ||
|
||
if (is_base_version and BASE_JAVA_VERSION != actual_version) \ | ||
or int(BASE_JAVA_VERSION) > int(actual_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.
I think the messages are a bit misleading depending on context. Maybe differentiate between is_base_version
and the alternate version mode:
- if
is_base_version == true
then compare with exact same version and complain about that - if
is_base_version == false
print a message aboutactual_version
need to be>= BASE_JAVA_VERSION
The >=
is important, because I want to test OpenJ9 vs Hotspot.
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.
Sure, I'll do separate messages for the two cases.
If you run with Lucene 9.10.0 (just released last week), it should work. |
I think so, but the 9.10.0 RC artefacts were no longer available at https://dist.apache.org/repos/dist/dev/lucene/. Not sure why some versions are still there and some aren't. It was easier just to use the 9.9.0 RC that is still there. |
Just FYI - I've returned to trying to add a nightly smoketester workflow check. The main branch required some changes to the script as well, which sort of proves Rob's point that we need to run it regularly, otherwise it goes out of sync with the code quickly... I'll try to forward-port @stefanvodita 's changes to main and will create a pr when I think it presents a reasonable state (still working my way through some python checks). |
I checked the script. Forward port should be more or less:
The new script is no longer a search replace Desaster. |
I don't think it's going to be so easy - some things just didn't work for me with local artifacts. I'll follow up, perhaps tomorrow. |
I think we can merge this? |
That was always a problem, I know. Therefore we had in the old ant build some target that created a "release folder" in the exact way how it is deployed on web server. After that it worked with file URLs: https://github.com/apache/lucene-solr/blob/1f6bd6cbf80513327054239b610076e3804133cd/build.xml#L420-L466 There is the Jenkins task still available: https://ci-builds.apache.org/job/Lucene/job/Lucene-Solr-SmokeRelease-8.11/, the 9.x and main ones were disabled and later removed after the gradle switch. I'd like to add the Jenkins task back, Github is IMHO too expensive unless we run no tests. +1 to merge this. |
Will you forward port the patch to main branch? I can help with that, have some freetime. This will allow us to make everything Java 21 ready tomorrow, so we have one file less to search/replace version numbers. |
Allow multiple JDKs in smoke test Remove special handling for JDK 17/19 Consolidate base version into a single constant Handle version checks and logs
The other PR looks straight-forward to me. Have you compared the two files directly after merging? They should be mostly identical and only the BASE_VERSION line should be different. |
I have. The diff looks correct. |
Introduce
--test-alternative-java
tosmokeTestRelease.py
, allowing the tests to run on multiple JDKs.