KNOX-3278: Update JLine to 3.30.6#1181
Conversation
Test Results21 tests 21 ✅ 1s ⏱️ Results for commit 543095e. ♻️ This comment has been updated with latest results. |
…hade-plugin and knoxshell-log4j. Update aspectj for JDK 17.
… and cleaning up command handling. Overriding name() so that tab completion after semicolon does not show the name of the command registry.
…(to use Launcher taken from knoxshell.jar manifest main class)
…and making knoxshell-log4j2.xml consistent with other log4j2 configurations.
…is not supported. This will impact performance.
| <excludes> | ||
| <exclude>schema/**</exclude> | ||
| <exclude>**/*.ldif</exclude> | ||
| <exclude>META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat</exclude> |
There was a problem hiding this comment.
if we use maven-shade-plugin:3.4.1 and org.apache.logging.log4j:log4j-transform-maven-shade-plugin-extensions, this can be fixed by adding
<transformer implementation="org.apache.logging.log4j.maven.plugins.shade.transformer.Log4j2PluginCacheFileTransformer"/>
Otherwise the Log4j2Plugins.dat will be overwritten by our plugins and will not contain the ones shipped by log4j2.
…nexpected exceptions.
…asses from the lib directory.
| checkJava | ||
| buildAppJavaOpts | ||
| $JAVA "${APP_JAVA_OPTS[@]}" -Dlog4j.configurationFile=conf/knoxshell-log4j2.xml -javaagent:"$APP_BIN_DIR"/../lib/aspectjweaver.jar -cp "$APP_JAR":lib/* org.apache.knox.gateway.shell.Shell "$@" || exit 1 | ||
| $JAVA "${APP_JAVA_OPTS[@]}" -Dlog4j.configurationFile=conf/knoxshell-log4j2.xml -javaagent:"$APP_BIN_DIR"/../lib/aspectjweaver.jar -cp "$APP_JAR":lib/* -cp "$APP_JAR":lib/* org.apache.knox.gateway.launcher.Launcher "$@" || exit 1 |
There was a problem hiding this comment.
Why the change from shell.Shell to launcher.Launcher?
| KnoxLoginDialog dlg = new KnoxLoginDialog(); | ||
| dlg.collect(); | ||
| return dlg; | ||
| LineReader reader = LineReaderBuilder.builder() |
There was a problem hiding this comment.
This appears to be a re-implementation of the credential collector logic in the name of the JLine upgrade? Is it necessary for the dependency upgrade?
KNOX-3278 - Update jline to 3.30.6
What changes were proposed in this pull request?
Update groovy to 5.0.4, jline to 3.30.6, jna to 5.18.1, aspectj to 1.9.25.1 and rest-assured to 6.0.0.
Rewrote gateway-shell using JLine 3 and Groovy 5.
How was this patch tested?
Ran example tests and all repl commands (ExampleWebHdfsLs.groovy and ExampleManagerResourceDeployment.groovy both in REPL with :load and as knoxshell.sh arguments. Both work as expected.)
Integration Tests
There is another ticket for adding integration tests:
KNOX-3280 Add integration tests for KnoxShell and KnoxCLI
UI changes
Login Dialog changed as JLine 3 supports password input.