Move the CLI into its own subproject#27114
Conversation
Projects the depend on the CLI currently depend on core. This should not always be the case. The EnvironmentAwareCommand will remain in :core, but the rest of the CLI components have been moved into their own subproject of :core, :core:cli.
core/cli/build.gradle
Outdated
| apply plugin: 'elasticsearch.build' | ||
| apply plugin: 'ru.vyarus.animalsniffer' | ||
| apply plugin: 'nebula.maven-base-publish' | ||
| apply plugin: 'nebula.maven-scm' |
There was a problem hiding this comment.
hmm, prolly dont some of these. will test w/o them.
| } | ||
|
|
||
| @Override | ||
| protected void beforeExecute() { |
core/cli/build.gradle
Outdated
|
|
||
| dependencies { | ||
| compile 'net.sf.jopt-simple:jopt-simple:5.0.2' | ||
| compile "org.apache.lucene:lucene-core:${versions.lucene}" |
There was a problem hiding this comment.
Why is Lucene here, that seems unfortunate?
| import java.lang.annotation.ElementType; | ||
| import java.lang.annotation.Retention; | ||
| import java.lang.annotation.RetentionPolicy; | ||
| import java.lang.annotation.Target; |
There was a problem hiding this comment.
The indentation is off here.
| import java.lang.annotation.Retention; | ||
| import java.lang.annotation.RetentionPolicy; | ||
| import java.lang.annotation.Target; | ||
| /** |
There was a problem hiding this comment.
Can you spare a line of whitespace?
| compile 'org.elasticsearch:securesm:1.1' | ||
|
|
||
| // utilities | ||
| compile "org.elasticsearch:elasticsearch-cli:${version}" |
There was a problem hiding this comment.
Do we actually need to publish this? If we first move the ES cli under a distribution/tools project, then this could could be something like distribution/tools/base-cli?
|
@elasticmachine test this please. |
|
@elasticmachine test this please. I think you are lying to me on purpose. |
I haven't read the PR but I liked this commit message. In general my take is "yes", we should move whatever tests make sense. |
|
@elasticmachine test this please. I no longer think you are lying to me. I think gradle is. |
I will do this in a followup PR, as my priorities have shifted a bit. As is, we will need to create a new "cli test" framework so that we can move things like MockTerminal into it, since many classes in core use this. Then we can move the cli tests into this project, and depend on this cli test framework instead of the core test framework. Its a bit more work than i want to tackle with this PR, and I think itll make it larger than necessary. But its the right thing to do, I think, so Ill circle back soon (tm). |
…ore runtime configurations (which also had cli in it)
…im having to add a es notice/license still.
|
yay build finally passed cc @jasontedor |
|
I think we still have an issue w/ this in that the core project should not be depending on a license/notice from another subproject (ie, the |
jasontedor
left a comment
There was a problem hiding this comment.
Looks good, I left a few comments.
|
|
||
| test.enabled = false | ||
| // Since CLI does not depend on :core, it cannot run the jarHell task | ||
| jarHell.enabled = false |
There was a problem hiding this comment.
I think we should refactor out the JAR hell check too, as there are other places where we will want to run JAR hell checks that will not depend on core.
There was a problem hiding this comment.
as part of this PR or just as a separate issue @jasontedor ?
| } | ||
|
|
||
| /** Gets the shutdown hook thread if it exists **/ | ||
| public Thread getShutdownHookThread() { |
There was a problem hiding this comment.
I don't think this needs to be public, only package-private?
| protected boolean shouldConfigureLoggingWithoutConfig() { | ||
| return true; | ||
| } | ||
| protected void beforeExecute() throws Exception {} |
There was a problem hiding this comment.
Why does this declare a checked exception?
There was a problem hiding this comment.
cruft from the refactor. itll be gone next push.
|
|
||
| /** Gets the shutdown hook thread if it exists **/ | ||
| public Thread getShutdownHookThread() { | ||
| protected Thread getShutdownHookThread() { |
There was a problem hiding this comment.
Can we get away with this being package visible only?
Projects the depend on the CLI currently depend on core. This should not always be the case. The EnvironmentAwareCommand will remain in :core, but the rest of the CLI components have been moved into their own subproject of :core, :core:cli.
* master: (31 commits) [TEST] Fix `GeoShapeQueryTests#testPointsOnly` failure Transition transport apis to use void listeners (#27440) AwaitsFix GeoShapeQueryTests#testPointsOnly #27454 Bump test version after backport Ensure nested documents have consistent version and seq_ids (#27455) Tests: Add Fedora-27 to packaging tests Delete some seemingly unused exceptions (#27439) #26800: Fix docs rendering Remove config prompting for secrets and text (#27216) Move the CLI into its own subproject (#27114) Correct usage of "an" to "a" in getting started docs Avoid NPE when getting build information Removes BWC snapshot status handler used in 6.x (#27443) Remove manual tracking of registered channels (#27445) Remove parameters on HandshakeResponseHandler (#27444) [GEO] fix pointsOnly bug for MULTIPOINT Standardize underscore requirements in parameters (#27414) peanut butter hamburgers Log primary-replica resync failures Uses TransportMasterNodeAction to update shard snapshot status (#27165) ...
* 6.x: (41 commits) [TEST] Fix `GeoShapeQueryTests#testPointsOnly` failure Transition transport apis to use void listeners (#27440) AwaitsFix GeoShapeQueryTests#testPointsOnly #27454 Ensure nested documents have consistent version and seq_ids (#27455) Tests: Add Fedora-27 to packaging tests #26800: Fix docs rendering Move the CLI into its own subproject (#27114) Correct usage of "an" to "a" in getting started docs Avoid NPE when getting build information Remove manual tracking of registered channels (#27445) Standardize underscore requirements in parameters (#27414) Remove parameters on HandshakeResponseHandler (#27444) [GEO] fix pointsOnly bug for MULTIPOINT peanut butter hamburgers Uses TransportMasterNodeAction to update shard snapshot status (#27165) Log primary-replica resync failures Add limits for ngram and shingle settings (#27411) Enforce a minimum task execution and service time of 1 nanosecond Fix place-holder in allocation decider messages (#27436) Remove newline from log message (#27425) ...
Projects the depend on the CLI currently depend on core. This should not
always be the case. The EnvironmentAwareCommand will remain in :core,
but the rest of the CLI components have been moved into their own
subproject of :core, :core:cli.