-
Notifications
You must be signed in to change notification settings - Fork 44
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
Select java package version based on Puppet Platform Version #611
Conversation
This PR uses version sniffing to determine the appropriate java version for puppetdb/puppetserver, which is a bit of a hack. But we have made the major versions of the Agent/Server/DB match for many years now, so it seems OK. It does not attempt to filter puppetlabs vs external projects because we already have other puppet-specific things hardcoded into the packages. And PE projects get an entirely different java setting, so this would only affect FOSS projects. It also does not attempt to limit itself to PuppetDB/Puppetserver for FOSS projects because I don't know of any other non-PE clojure projects using ezbake so it seemed like unnecessary complexity, but if someone else knows of one I can add that. |
This will also limit Platform 8's SLES support. Earlier SLES 12 releases did not ship Java 11 (the original 12 release doesn't even appear to have had Java 8), but the current supported SP, SP 5, ships java 11 so it should continue to work there. |
I dont understand why we need to intuit this from the version and not explicitly set it as a configuration? |
07176dd
to
1a96af8
Compare
Does not change PE package builds. Add a puppet-platform-version argument to EZBake defaulting to 7 (which maintains the current dependency list) when building for Puppet Platform 8 select newer more appropriate JDK's for each platform. Fails for unrecognized Platform versions so that we remember to select appropriate JDKs. Selecting JDK 11 for SLES 12 means that we will only be compatible with the most recent (and supported) SP 5.
@@ -15,6 +15,7 @@ | |||
options.sles = 0 | |||
options.java = 'java-1.8.0-openjdk-headless' | |||
options.release = 1 | |||
options.platform_version = 0 |
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.
should this be 7
?
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.
The default is provided by the local->ruby
call in core.clj
and the --platform-version
flag is always passed through controller.sh.erb
, so this value is unused.
end | ||
when 6..7 | ||
'java-8-openjdk-headless' | ||
end |
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.
The other OS branches will fail if it doesn't match the listed conditions, should we do that here?
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.
Ah yes, I must've lost the explicit failure in the refactor.
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.
This looks extraordinarily complicated. If this will unblock us I think this is fine. Thanks for working through all this.
On Redhat 8 and Debian platforms, take advantage of boolean dependencies to allow Java 11 or Java 17. Platform 8 will go into PE 2023, which uses Java 17, so the dependencies prefer Java 17. Redhat 7 may not understand the or dependencies, or have java 17, so just depend on 11.
When not building a PE package, select the java dependency based on operating system and Puppet Platform version, which is assumed to be the major version of the package you are building.
This will allow us to maintain the same java versions between puppetserver and puppetdb, maintain a given dependency for an entire major version, and move that version forward between major versions.