Skip to content

sls-packaging Default JVM arguments are not applied in launcher scripts #630

@mglazer

Description

@mglazer

What happened?

LaunchConfigTask applies a set of sls-packaging defaults to all services:

https://github.com/palantir/sls-packaging/blob/develop/gradle-sls-packaging/src/main/groovy/com/palantir/gradle/dist/service/tasks/LaunchConfigTask.java#L58

This is great, however, it only applies to things invoked via the go-java-launcher. In the case where your service provides some form of CLI based functionality where you would want to invoke:

service/bin/myservice SOME ARGS GO HERE

The DEFAULT_JVM_OPTS environment variable only pulls from what you specify in defaultJvmOpts. The alwaysOnJvmOptions are not merged in.

I believe this is because the JavaServiceDistributionExtension extends from BaseDistributionExtension but does not apply the same set of JVM opts from LaunchConfigTask

What did you want to happen?

The on disk CLI invoker operates the same as what your service sees. Note that go-java-launcher does not work well with CLI invocations because it does not accept CLI args last time I checked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions