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

Include JDKs in Dists #1510

Merged
merged 19 commits into from
Aug 24, 2023
Merged

Include JDKs in Dists #1510

merged 19 commits into from
Aug 24, 2023

Conversation

CRogers
Copy link
Contributor

@CRogers CRogers commented Aug 21, 2023

Before this PR

We want to include JDKs in dists (reasons in this doc). There is currently no way to do this.

I had tried to do this all from an internal plugin, but it's impossible to set javaHome correctly and maintain laziness.

After this PR

We add a way to include a number of JDKs to a dist, up to one per version, and then set javaHome in go-java-launcher to the correct one.

Multiple JDKs are required as some internal services run user code, which select from multiple JDK versions, and these should continue to work. I'm assuming we won't need multiple variants of the same JDK version, as that would be hugely wasteful to deploy and we should avoid this as much as we can.

==COMMIT_MSG==
Add jdks property to distribution extension to help include JDKs into dists.
==COMMIT_MSG==

Possible downsides?

@changelog-app
Copy link

changelog-app bot commented Aug 21, 2023

Generate changelog in changelog/@unreleased

What do the change types mean?
  • feature: A new feature of the service.
  • improvement: An incremental improvement in the functionality or operation of the service.
  • fix: Remedies the incorrect behaviour of a component of the service in a backwards-compatible way.
  • break: Has the potential to break consumers of this service's API, inclusive of both Palantir services
    and external consumers of the service's API (e.g. customer-written software or integrations).
  • deprecation: Advertises the intention to remove service functionality without any change to the
    operation of the service itself.
  • manualTask: Requires the possibility of manual intervention (running a script, eyeballing configuration,
    performing database surgery, ...) at the time of upgrade for it to succeed.
  • migration: A fully automatic upgrade migration task with no engineer input required.

Note: only one type should be chosen.

How are new versions calculated?
  • ❗The break and manual task changelog types will result in a major release!
  • 🐛 The fix changelog type will result in a minor release in most cases, and a patch release version for patch branches. This behaviour is configurable in autorelease.
  • ✨ All others will result in a minor version release.

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Add jdks property to distribution extension to help include JDKs into dists.

Check the box to generate changelog(s)

  • Generate changelog entry

@CRogers CRogers marked this pull request as ready for review August 24, 2023 14:31
@CRogers CRogers requested a review from felixdesouza August 24, 2023 14:31
`Provider#zip` is introduced in 6.6. However, it seems that gradle introduced plugin bytecode rewriting sometime between 6.1 and 6.6. This means it now falls over on the jackson 2.15.2 dep, so we need to go all the way to 7.6
@@ -179,7 +179,6 @@ class JavaServiceDistributionPluginTests extends GradleIntegrationSpec {
}

repositories {
jcenter()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deprecation warning with new higher version of gradle

@@ -31,7 +31,7 @@ public class SlsBaseDistPlugin implements Plugin<Project> {

public static final String SLS_DIST_USAGE = "sls-dist";

public static final GradleVersion MINIMUM_GRADLE = GradleVersion.version("6.1");
public static final GradleVersion MINIMUM_GRADLE = GradleVersion.version("7.6");
Copy link
Contributor Author

@CRogers CRogers Aug 24, 2023

Choose a reason for hiding this comment

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

Provider#zip is introduced in 6.6. However, it seems that gradle introduced plugin bytecode rewriting sometime between 6.1 and 6.6. This means 6.6 now falls over on the jackson 2.15.2 dep from baseline, so we need to go all the way to 7.6

Copy link
Contributor

Choose a reason for hiding this comment

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

don't we need 7.6.2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

happy to merge if 7.6 doesn't break and have a lower min version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Huh, I wonder why it works...

@felixdesouza
Copy link
Contributor

👍

@bulldozer-bot bulldozer-bot bot merged commit 68a8082 into develop Aug 24, 2023
@bulldozer-bot bulldozer-bot bot deleted the callumr/include-jdk branch August 24, 2023 17:11
@svc-autorelease
Copy link
Collaborator

Released 7.37.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants