Skip to content
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

Update hardcoded JDK next values #1574

Merged
merged 1 commit into from
May 27, 2020

Conversation

ShishirH
Copy link
Contributor

@ShishirH ShishirH commented Mar 2, 2020

#1514

Closes #1514

Signed-off-by: Shishir Halaharvi [email protected]

@ShishirH
Copy link
Contributor Author

ShishirH commented Mar 2, 2020

@adam-thorpe Please let me know if there is anything left to be done.

@adam-thorpe
Copy link
Contributor

Think it was just those two values, thanks @ShishirH

Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, we'd handle the case explicitly when System.getenv(...) returns empty. I.e. the environment variable is not set. I'd suggest a similar course of action as in the else branch.

Please also remove the comment as it's no longer true.

@ShishirH ShishirH force-pushed the removeHardCodeEnv branch from e22a12b to a2253c3 Compare March 4, 2020 06:33
@ShishirH
Copy link
Contributor Author

ShishirH commented Mar 4, 2020

@jerboaa Made suggested changes

Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nit: Perhaps we should be explicit and write Environment variable JAVA_FEATURE_VERSION not set. You can make that change when you push.

@ShishirH ShishirH force-pushed the removeHardCodeEnv branch from a2253c3 to 188be1e Compare March 4, 2020 10:10
@ShishirH
Copy link
Contributor Author

ShishirH commented Mar 4, 2020

@jerboaa Updated the message.

@ShishirH ShishirH force-pushed the removeHardCodeEnv branch from 188be1e to bff31ce Compare March 4, 2020 10:13
@jerboaa
Copy link
Contributor

jerboaa commented Mar 4, 2020

Looks good.

@johnoliver
Copy link
Contributor

I am not sure where we would set JAVA_FEATURE_VERSION so that these scripts would pick it up

@johnoliver
Copy link
Contributor

johnoliver commented Mar 4, 2020

I realise my last comment was a bit cryptic, for further info, the scripts you are changing execute on the Jenkins master server, I am not sure they even are able to access the environment variables due to the jenkins sandbox, but also I am not sure we have a good way of setting that environment variable in the context of the jenkins scripts.

@karianna karianna added the bug Issues that are problems in the code as reported by the community label Mar 6, 2020
@karianna karianna modified the milestones: Icebox, March 2020 Mar 6, 2020
Copy link
Contributor

@karianna karianna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per @johnoliver comment where / How does JAVA_FEATURE_VERSION get set?

@jerboaa
Copy link
Contributor

jerboaa commented Mar 6, 2020

@adam-thorpe
Copy link
Contributor

Looking at @sxa555 's lovely diagram in #957, make-adopt-build-farm.sh is called after build_base_file.groovy and openjdk_build_pipeline.groovy so the value is set later on (i.e. once the job has been initialised by jenkins)

@johnoliver
Copy link
Contributor

Yes that is correct, the groovy files are run by jenkins to setup and configure the jobs, make-adopt-build-farm.sh comes after to do the actual build on the node. So JAVA_FEATURE_VERSION should not be set from inside the groovy code

@ShishirH
Copy link
Contributor Author

@johnoliver @adam-thorpe If I understand correctly, due to the scripts running before the groovy code, the hardcoding shouldn't be removed, and both this PR and issue should be closed without merging, right?

@johnoliver
Copy link
Contributor

@ShishirH its the other way around, since the groovy runs before the scripts so the variable is not set for the groovy to pick up. Removing the hardcoding is good so I would like to find a way around it. One thing to note is that you can set global environment variables inside Jenkins, so this PR would work if you did that. Its possible we could use Jenkins global environment variables as a central place to encode what the most recent version is.

It is an open question as to where we want to centralise this most recent version number information rather than have it scattered around lots of scripts. The api may be the correct place for it, or possibly putting it in Jenkins via a statically hosted file or environment variable. @karianna or @sxa555 may have an opinion on which would be better.

@karianna
Copy link
Contributor

The API is intriguing as it decouples us from Jenkins (we're too tightly coupled as it is). Are you thinking of something like https://api.adoptopenjdk.net/latest_jdk_version which would return say 15?

@johnoliver
Copy link
Contributor

@karianna yeah, something we can bump in a single place to pretty much say what version head is, then other scripts like docker stuff can read from there too.

@karianna
Copy link
Contributor

@johnoliver Works for me, let's do it.

@karianna karianna modified the milestones: March 2020, April 2020 Apr 2, 2020
@M-Davies
Copy link

Created AdoptOpenJDK/openjdk-api-v3#212 to follow up on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that are problems in the code as reported by the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hard-coded JDK next values should be updated
6 participants