kgyrtkirk / hive-dev-box

21 stars 14 forks source link

Add jdk17 #15

Closed wecharyu closed 9 months ago

wecharyu commented 9 months ago

Add jdk17 to support hive sonar analysis https://github.com/apache/hive/pull/5004

wecharyu commented 9 months ago

cc: @kgyrtkirk @zabetak

zabetak commented 9 months ago

Thanks for the PR @wecharyu . How did you test these changes?

kgyrtkirk commented 9 months ago

I guess sw java 17 should configure like the others

wecharyu commented 9 months ago

I'm testing locally, zulu-17 package seems not be found, let me check it.

wecharyu commented 9 months ago

@zabetak @kgyrtkirk pls take a look again, it could install all jdk locally even though my build failed finally by:

wget: unable to resolve host address 'github.infra.cloudera.com'
Error: building at STEP "RUN /tools/install_toolbox": while running runtime: exit status 4
zabetak commented 9 months ago

@wecharyu we may have to revert https://github.com/kgyrtkirk/hive-dev-box/commit/f63e1133339bbe5c972888557df5643b2da7bd0a. Any thoughts @abstractdog ?

abstractdog commented 9 months ago

@wecharyu we may have to revert f63e113. Any thoughts @abstractdog ?

yes, absolutely, we forked hive-dev-box in the meantime to cloudera.infra, so upstream should not contain any cloudera specific

wecharyu commented 9 months ago

The build success after revert f63e113, and jdk install is successful:

jenkins@d4fd2e76cd83:~$ java -version
openjdk version "1.8.0_392"
OpenJDK Runtime Environment (Zulu 8.74.0.17-CA-linux64) (build 1.8.0_392-b08)
OpenJDK 64-Bit Server VM (Zulu 8.74.0.17-CA-linux64) (build 25.392-b08, mixed mode)
jenkins@d4fd2e76cd83:~$ sw java 17 && . /etc/profile.d/java.sh
sudo: unable to send audit message: Operation not permitted
sudo: unable to send audit message: Operation not permitted
export JAVA_HOME=/usr/lib/jvm/zulu17-ca-amd64/
open a new shell or run: . /etc/profile.d/java.sh
jenkins@d4fd2e76cd83:~$ java -version
openjdk version "17.0.9" 2023-10-17 LTS
OpenJDK Runtime Environment Zulu17.46+19-CA (build 17.0.9+8-LTS)
OpenJDK 64-Bit Server VM Zulu17.46+19-CA (build 17.0.9+8-LTS, mixed mode, sharing)
kgyrtkirk commented 9 months ago

ugh...I've reverted that - as that makes it unusable for everyone else outside cldr I'm using a different branch ... so haven't seen the problem

I've added a github action to check that the image can be built

wecharyu commented 9 months ago

@kgyrtkirk Rebased to master, could you take a look again?

kgyrtkirk commented 9 months ago

thank you @wecharyu ! :)

wecharyu commented 9 months ago

@kgyrtkirk BTW, do we need to push the latest image to make sure that hive CI could use it?

kgyrtkirk commented 9 months ago

it was always my plan to add a job to hive-ci to have some place to build&update those images...but never had time for it; it should work like ./buildAll push

actually I think this 3rd approach would be to best to start with - as the 1st and 2nd could possibly cause trouble for other people using the CI

wecharyu commented 9 months ago

it was always my plan to add a job to hive-ci to have some place to build&update those images

Look forward to this feature. 👍

...or you can push the image to your own dockerhub accoung and specify that image to be used in your PR starting to support jdk17

Let me try it.