-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Expose Python/Groovy version to clients
* Sets `groovy.version` configuration property, as sourced from class `groovy.lang.GroovyShell`. * Sets `python.version` configuration property, as sourced from python code `platform.python_version()` * Adds `groovy.version` and `python.version` to `client.configuration.list` in dh-defaults.prop (to be returned to client as part of `ConfigService.GetConfigurationConstants` gRPC) * Adds `io.deephaven.client.examples.PrintConfigurationConstants` to print invoke and print out results of `ConfigService.GetConfigurationConstants` Fixes #5938
- Loading branch information
1 parent
7b13def
commit 9032adc
Showing
4 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...sion-examples/src/main/java/io/deephaven/client/examples/PrintConfigurationConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending | ||
// | ||
package io.deephaven.client.examples; | ||
|
||
import io.deephaven.client.impl.Session; | ||
import io.deephaven.proto.backplane.grpc.ConfigValue; | ||
import picocli.CommandLine; | ||
import picocli.CommandLine.Command; | ||
|
||
import java.util.Map.Entry; | ||
|
||
@Command(name = "print-configuration-constants", mixinStandardHelpOptions = true, | ||
description = "Print configuration constants", version = "0.1.0") | ||
class PrintConfigurationConstants extends SingleSessionExampleBase { | ||
|
||
@Override | ||
protected void execute(Session session) throws Exception { | ||
for (Entry<String, ConfigValue> entry : session.getConfigurationConstants().get().entrySet()) { | ||
System.out.println(entry.getKey() + "=" + entry.getValue().getStringValue()); | ||
} | ||
} | ||
|
||
public static void main(String[] args) { | ||
int execute = new CommandLine(new PrintConfigurationConstants()).execute(args); | ||
System.exit(execute); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters