Code Monkey home page Code Monkey logo

vertx-config's People

Contributors

aergul avatar afloarea avatar bmcustodio avatar boliza avatar cazacugmihai avatar cescoffier avatar claudenirfreitas avatar cmoulliard avatar daltrogama avatar danielprinz avatar gaket avatar gaol avatar jpiecuch avatar julianladisch avatar kadary avatar lecogiteur avatar leibnizhu avatar okou19900722 avatar panchmp avatar paulgallagher75 avatar pmlopes avatar ppatierno avatar ruslansennov avatar shash-singh avatar slinkydeveloper avatar stundzig avatar traderjoe95 avatar tsegismont avatar vietj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vertx-config's Issues

OpenJDK11 does not build

Underlying exception : java.lang.UnsupportedOperationException: Cannot define class using reflection
	at net.bytebuddy.ClassFileVersion.ofJavaVersion(ClassFileVersion.java:135)
	at net.bytebuddy.ClassFileVersion$VersionLocator$ForJava9CapableVm.locate(ClassFileVersion.java:357)
	at net.bytebuddy.ClassFileVersion.ofThisVm(ClassFileVersion.java:147)
	at net.bytebuddy.dynamic.loading.ClassInjector$UsingReflection$Dispatcher$CreationAction.run(ClassInjector.java:301)
	at net.bytebuddy.dynamic.loading.ClassInjector$UsingReflection$Dispatcher$CreationAction.run(ClassInjector.java:290)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at net.bytebuddy.dynamic.loading.ClassInjector$UsingReflection.<clinit>(ClassInjector.java:70)
	at net.bytebuddy.dynamic.loading.ClassLoadingStrategy$Default$InjectionDispatcher.load(ClassLoadingStrategy.java:184)
	at net.bytebuddy.dynamic.TypeResolutionStrategy$Passive.initialize(TypeResolutionStrategy.java:79)
	at net.bytebuddy.dynamic.DynamicType$Default$Unloaded.load(DynamicType.java:4456)
	at org.mockito.internal.creation.bytebuddy.SubclassBytecodeGenerator.mockClass(SubclassBytecodeGenerator.java:115)
	at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator$1.call(TypeCachingBytecodeGenerator.java:37)
	at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator$1.call(TypeCachingBytecodeGenerator.java:34)
	at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:138)
	at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:346)
	at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:161)
	at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:355)
	at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator.mockClass(TypeCachingBytecodeGenerator.java:32)
	at org.mockito.internal.creation.bytebuddy.SubclassByteBuddyMockMaker.createMockType(SubclassByteBuddyMockMaker.java:71)
	at org.mockito.internal.creation.bytebuddy.SubclassByteBuddyMockMaker.createMock(SubclassByteBuddyMockMaker.java:42)
	at org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker.createMock(ByteBuddyMockMaker.java:25)
	at org.powermock.api.mockito.mockmaker.PowerMockMaker.createMock(PowerMockMaker.java:41)
	at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:35)
	at org.mockito.internal.MockitoCore.mock(MockitoCore.java:51)
	at org.mockito.Mockito.mock(Mockito.java:1798)
	at org.powermock.api.mockito.internal.mockcreation.DefaultMockCreator.createMethodInvocationControl(DefaultMockCreator.java:108)
	at org.powermock.api.mockito.internal.mockcreation.DefaultMockCreator.doCreateMock(DefaultMockCreator.java:61)
	at org.powermock.api.mockito.internal.mockcreation.DefaultMockCreator.createMock(DefaultMockCreator.java:53)
	at org.powermock.api.mockito.internal.mockcreation.DefaultMockCreator.mock(DefaultMockCreator.java:40)
	at org.powermock.api.mockito.PowerMockito.mockStatic(PowerMockito.java:62)
	at io.vertx.config.impl.spi.RawDataTrueEnvVariablesConfigStoreTest.init(RawDataTrueEnvVariablesConfigStoreTest.java:54)

could not go farther

Be able to parse Consul values on read

It would be really useful to be able to parse Consul KV values as rich data (JSON, YML) on the fly instead of always using String value.

ConsulConfigStore:80 for reference.

I can do a PR.

config-server should allow version to be empty

private void parse(JsonObject body, Handler<AsyncResult> handler) {
String version = body.getString("version", null);
JsonArray sources = body.getJsonArray("propertySources", null);
//does not use version at all. should allow version to be null
if (sources == null) {

handler.handle(Future.failedFuture("Invalid configuration server response, property sources missing"));
} else {
JsonObject configuration = new JsonObject();
for (int i = 0; i < sources.size(); i++) {
JsonObject source = sources.getJsonObject(i);
JsonObject content = source.getJsonObject("source");
configuration = configuration.mergeIn(content);
}
handler.handle(Future.succeededFuture(Buffer.buffer(configuration.encode())));
}

Preventing 'EnvVariablesConfigStore' from attempting to convert values.

The EnvVariablesConfigStore attempts a number of conversions on the values of envvar values before making them available to the config.getXXX methods. For instance, if I define

CLIENT_ID="162738491282"

as one of my environment variables it will end up in config() as a Double instead of a String. This happens because EnvVariablesConfigStore uses JsonObjectHelper#put on the set of envvars. However, sometimes all you need are the "raw" string values. Also, if you are later querying these with methods like config().getDouble() and config().getString(), I see little to no point in this behaviour—config().getString("CLIENT_ID") will throw in this use case.

Could we get one of the following?

  1. Make EnvVariablesConfigStore not use JsonObjectHelper#put and get raw values in config().
  2. Introduce a RawEnvVariablesConfigStore in order not to break any existing code out there and still get raw values in config()?

In any of the cases, would you consider a PR?

an HttpClient is probably shared between different Verticles

Tests shows some problems with HttpClient (see also vert-x3/vertx-consul-client#32):

Jul 06, 2017 8:49:33 PM io.vertx.core.http.impl.ConnectionManager
WARNING: Reusing a connection with a different context: an HttpClient is probably shared between different Verticles

It seems that ConsulConfigStore's constructor and get() method called in different Vertx contexts. I can confirm this by check Vertx.currentContext() instance in both points. This patch ruslansennov/vertx-consul-client@319b78c fixes the problem but I'm not sure that this is right way. Maybe the problem is inside WebClient and/or HttpClient implementations

Adding multiple file stores generates a wrong JsonObject

In my project I have two config files (one for application configuration and the other for tests):

config.json:

{
  "server": {
    "port": 8080
  },
  "jwt": {
    "secret": "mySecret",
    "signatureAlgorithm": "HS512",
    "tokenValidityMinutes": 600
  }
}

test-config.json:

{
  "server": {
    "port": 0
  }
}

They are loaded this way (kotlin code):

val fileStore = ConfigStoreOptions()
         .setType("file")
         .setOptional(false)
         .setConfig(JsonObject().put("path", "conf/config.json"))

val testFileStore = ConfigStoreOptions()
        .setType("file")
        .setOptional(true)
        .setConfig(JsonObject().put("path", "conf/test-config.json"))

var retriever = ConfigRetriever.create(vertx, ConfigRetrieverOptions().addStore(fileStore).addStore(testFileStore))

If I do not add the testFileStore to the ConfigRetrieverOptions(), everything works fine and the generated JsonObject is:

{"server":{"port":8080},"jwt":{"secret":"mySecret","signatureAlgorithm":"HS512","tokenValidityMinutes":600}}

But, when I add the testFileStore then the JsonObject is wrong:

{"server":{"map":{"port":0},"empty":false},"jwt":{"secret":"mySecret","signatureAlgorithm":"HS512","tokenValidityMinutes":600}}

Please note that the error can be reproduced by simply adding two times the same file. For example this code:

val fileStore = ConfigStoreOptions()
        .setType("file")
        .setOptional(false)
        .setConfig(JsonObject().put("path", "conf/config.json"))

var retriever = ConfigRetriever.create(vertx, ConfigRetrieverOptions().addStore(fileStore).addStore(fileStore))

generates this wrong JsonObject:

{"server":{"map":{"port":8080},"empty":false},"jwt":{"map":{"secret":"mySecret","signatureAlgorithm":"HS512","tokenValidityMinutes":600},"empty":false}}

java.lang.NoClassDefFoundError: io/vertx/lang/groovy/ConversionHelper

Hi,

I'm using vertx-config and vertx-config-yaml modules in my app and, sometimes, when the application starts, I've got this error:

java.lang.NoClassDefFoundError: io/vertx/lang/groovy/ConversionHelper

It seems that the class is part of vertx-lang-groovy and I don't have it in my class path (I didn't add it because I don't use it - at least, directly).

The question is: is it mandatory to add this module in order to use the two other ones? And, why it works sometimes?

Thanks!

Environment:

  • java 1.8.0_121-b13
  • vertx-core 3.4.0-SNAPSHOT
  • vertx-config 3.4.0-SNAPSHOT
  • vertx-config-yaml 3.4.0-SNAPSHOT

Feature request: Support for cookies in HTTP Config Retriever

The HTTP configuration store used by the Config Retriever takes in just the host, port, and path (as mentioned here and supposedly other options mentioned here). This feature request is for adding an option to send cookies along with the HTTP request. In my case, I use cookies to send authentication token along with the HTTP request.

PS: I had raised the same feature request here as well.

require("vertx-config-js/config_retriever") broken as of 3.6.0

require("vertx-config-js/config_retriever");

works as of vertx 3.5.4 latest but appears to be broken at 3.6.0:

ERROR: vertx-config-js/config_retriever.js#88:17<eval>:130:40 Expected ident but found function
  this.setBeforeScanHandler =  function(function) {
                                        ^ in file vertx-config-js/config_retriever.js at line 130
javax.script.ScriptException: SyntaxError: <eval>#88:17<eval>:130:40 Expected ident but found function
  this.setBeforeScanHandler =  function(function) {
                                        ^ in <eval> at line number 111 at column number 6
	at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:454)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
	at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
	at io.vertx.lang.js.JSVerticleFactory$JSVerticle.start(JSVerticleFactory.java:109)
	at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$8(DeploymentManager.java:494)
	at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:320)
	at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:745)

I believe this is due to a6dcc91 where a javascript reserved word ("function") is used as a parameter name. Changing it to "handler" fixed it for me so I will send a pr.

CI build error

on Java 8:

testDeploymentOfVerticles(io.vertx.config.verticle.VerticleDeploymentTest)  Time elapsed: 0.042 sec  <<< FAILURE!
java.lang.AssertionError: Expected true
	at io.vertx.ext.unit.impl.TestContextImpl.reportAssertionError(TestContextImpl.java:467)
	at io.vertx.ext.unit.impl.TestContextImpl.assertTrue(TestContextImpl.java:307)
	at io.vertx.ext.unit.impl.TestContextImpl.assertTrue(TestContextImpl.java:313)
	at io.vertx.config.verticle.VerticleDeploymentTest.lambda$null$1(VerticleDeploymentTest.java:54)
Oct 02, 2018 8:55:33 AM io.vertx.core.impl.ContextImpl
SEVERE: Unhandled exception
java.lang.AssertionError: Expected true
	at io.vertx.ext.unit.impl.TestContextImpl.reportAssertionError(TestContextImpl.java:467)
	at io.vertx.ext.unit.impl.TestContextImpl.assertTrue(TestContextImpl.java:307)
	at io.vertx.ext.unit.impl.TestContextImpl.assertTrue(TestContextImpl.java:313)
	at io.vertx.config.verticle.VerticleDeploymentTest.lambda$null$1(VerticleDeploymentTest.java:54)
	at io.vertx.core.eventbus.impl.HandlerRegistration.sendAsyncResultFailure(HandlerRegistration.java:127)
	at io.vertx.core.eventbus.impl.EventBusImpl.deliverMessageLocally(EventBusImpl.java:367)
	at io.vertx.core.eventbus.impl.EventBusImpl.sendOrPub(EventBusImpl.java:332)
	at io.vertx.core.eventbus.impl.EventBusImpl$OutboundDeliveryContext.next(EventBusImpl.java:483)
	at io.vertx.core.eventbus.impl.EventBusImpl.sendOrPubInternal(EventBusImpl.java:440)
	at io.vertx.core.eventbus.impl.EventBusImpl.send(EventBusImpl.java:111)
	at io.vertx.core.eventbus.impl.EventBusImpl.send(EventBusImpl.java:101)
	at io.vertx.config.verticle.VerticleDeploymentTest.lambda$testDeploymentOfVerticles$2(VerticleDeploymentTest.java:53)
	at io.vertx.config.impl.ConfigRetrieverImpl.lambda$getConfig$2(ConfigRetrieverImpl.java:180)
	at io.vertx.config.impl.ConfigRetrieverImpl.lambda$compute$9(ConfigRetrieverImpl.java:294)
	at io.vertx.core.impl.CompositeFutureImpl.lambda$all$1(CompositeFutureImpl.java:49)
	at io.vertx.core.impl.FutureImpl.tryComplete(FutureImpl.java:125)
	at io.vertx.config.impl.ConfigRetrieverImpl.lambda$null$6(ConfigRetrieverImpl.java:264)
	at io.vertx.config.impl.ConfigurationProvider.lambda$null$0(ConfigurationProvider.java:83)
	at io.vertx.config.impl.spi.JsonProcessor.process(JsonProcessor.java:42)
	at io.vertx.config.impl.ConfigurationProvider.lambda$get$1(ConfigurationProvider.java:71)
	at io.vertx.core.impl.FutureImpl.setHandler(FutureImpl.java:79)
	at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:277)
	at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:333)
	at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:39)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:464)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)

[Feature Request] Add support for HashiCorp's Vault

It would be nice to have the possibility to retrieve some configuration/settings (more likely: secrets) from HashiCorp's Vault.

Vault can manage static and dynamic secrets such as username/password for remote applications/resources and provide credentials for external services such as MySQL, PostgreSQL, Apache Cassandra, MongoDB, Consul, AWS and more.

Maybe a new Configuration store?

References: The Spring guys have something similar in the Spring Cloud "umbrella".

redis config - Retrieve json value - WRONGTYPE Operation against a key holding the wrong kind of value

In redis-cli:

    127.0.0.1:6379> get my-microservice-config
    "{\n "http.port": 35001\n}\n"

(the way I set it is from the bash-script: redis-cli -x set my-config < my-microservice-config.json ) where the my-microservice-config.json hold the json configuration.

In the code where I use vertx-config:

    final ConfigStoreOptions redisSore = new ConfigStoreOptions()
    .setType("redis")
    .setConfig(new JsonObject()
    .put("host", "localhost")
    .put("port", 6379)
    .put("key", "my-microservice-config")
    );

    final ConfigRetriever retriever = ConfigRetriever.create(vertx, options);
    retriever.getConfig( ar -> {
    if ( ar.failed()) {
    System.out.println("Failed to retrieve the configuration");

...

got error:

WRONGTYPE Operation against a key holding the wrong kind of value

checking the type of the value: it looks pretty much like string type

    127.0.0.1:6379> type my-microservice-config
    string

but anyways.. the question is: how to retrieve the config value that I see in cli when I do get ?

Add a "raw-data" option for processing properties files

This is already implemented for Environment Variables. From the documentation:

... By default, the retrieved value are transformed into JSON compatible structures (number, string, boolean, json object and json array). To avoid this conversion, configure the raw-data attribute:

ConfigStoreOptions json = new ConfigStoreOptions()
  .setType("env")
  .setConfig(new JsonObject().put("raw-data", true));

For example, I have an API key in my properties file which looks like this

6134789540453672

But it is read like Integer.MAX_VALUE for some reason

2147483647

which could be avoided if there was an option to read all values as strings.

Kubernetes ConfigMap blocks the event loop

See example project... When I use the fabric8 maven plugin to deploy this in either our OCP cluster OR using Minishift, I get the following error repeatedly:

 WARNING: Thread Thread[vert.x-eventloop-thread-0,5,main] has been blocked for 10290 ms, time limit is 2000
io.vertx.core.VertxException: Thread blocked
 at io.vertx.core.impl.BlockedThreadChecker.registerThread(BlockedThreadChecker.java:67)
 at io.vertx.core.impl.VertxThreadFactory.newThread(VertxThreadFactory.java:64)
 at java.util.concurrent.ThreadPoolExecutor$Worker.<init>(ThreadPoolExecutor.java:612)
 at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:925)
 at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1357)
 at io.vertx.core.impl.TaskQueue.execute(TaskQueue.java:78)
 at io.vertx.core.impl.ContextImpl.executeBlocking(ContextImpl.java:291)
 at io.vertx.core.impl.ContextImpl.executeBlocking(ContextImpl.java:240)
 at io.vertx.core.impl.VertxImpl.executeBlocking(VertxImpl.java:650)
 at io.vertx.core.impl.VertxImpl.executeBlocking(VertxImpl.java:656)
 at io.vertx.config.kubernetes.ConfigMapStore.getClient(ConfigMapStore.java:74)
 at io.vertx.config.kubernetes.ConfigMapStore.get(ConfigMapStore.java:105)
 at io.vertx.config.impl.ConfigurationProvider.get(ConfigurationProvider.java:35)
 at io.vertx.config.impl.ConfigRetrieverImpl.lambda$compute$8(ConfigRetrieverImpl.java:167)
 at io.vertx.config.impl.ConfigRetrieverImpl$$Lambda$32/648252746.apply(Unknown Source)
 at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
 at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
 at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
 at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
 at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
 at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
 at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
 at io.vertx.config.impl.ConfigRetrieverImpl.compute(ConfigRetrieverImpl.java:176)
 at io.vertx.config.impl.ConfigRetrieverImpl.getConfig(ConfigRetrieverImpl.java:98)
 at io.vertx.config.impl.ConfigRetrieverImpl.<init>(ConfigRetrieverImpl.java:82)
 at io.vertx.config.ConfigRetriever.create(ConfigRetriever.java:32)
 at com.redhat.labs.ocp.MainVerticle.start(MainVerticle.java:45)
 at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$8(DeploymentManager.java:434)
 at io.vertx.core.impl.DeploymentManager$$Lambda$26/1932831450.handle(Unknown Source)
 at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:337)
 at io.vertx.core.impl.ContextImpl$$Lambda$27/440737101.run(Unknown Source)
 at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
 at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403)
 at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:445)
 at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
 at java.lang.Thread.run(Thread.java:748)

Missing license headers

Hello,

I noticed that most of the .java files in this repo are missing license headers. There is no SCM URL in pom.xml files and tag is also missing from there. This all combined means that people who get these vertx (source-)artifacts from Maven Central need to google what the license might be, or where this repository is.

[Git config store] Username & password authentication config is overridden by idRsa

I'm using the config component with git config store. My config files are stored in a private git repo and I'm authentic by using username and password, which is set via:

new ConfigStoreOptions()
                        .setType("git")
                        .setConfig(new JsonObject()
                                .put("url", ...)
                                .put("path", "local")
                                .put("filesets", ...)
                                .put("user", "user")
                                .put("password", "password");

But I'm not speified a idRsaKeyPath attribute, it always says I don't provide a CredentialsProvider:

org.eclipse.jgit.api.errors.TransportException: https://github.com/xxx/xxx.git: Authentication is required but no CredentialsProvider has been registered
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:135)
	at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:267)
	at io.vertx.config.git.GitConfigStore.lambda$update$4(GitConfigStore.java:205)
	at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:272)
	at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)

I've checked the source code, these lines may overrides the pervious CredentialsProvider which is set by username and password:

if(Objects.nonNull(configuration.getString("idRsaKeyPath"))){

Is it a bug? I'm looking for your response, thanks.

JS/Javascript: ConfigRetriever returns result() in a unclassed object?

Working with Nashorn in this example. Loading a config.json file sitting in $VERTICLE_HOME/conf/config.json

Json file is:

{
  "myKey": "myValue"
}

I have a js snippet of (as based from the docs:http://vertx.io/docs/vertx-config/js/#_using_the_config_retriever:

var ConfigRetriever = require("vertx-config-js/config_retriever")
var retriever = ConfigRetriever.create(vertx)
retriever.getConfig(function (ar, ar_err) {
  if (ar_err != null) {
    print("fail")
    // Failed to retrieve the configuration
  } else {
    var config = ar;
    print(config["myKey"]) // Works
    print(config) // cant print, cant use getClass(), js 'typeof config' returns "object"
  }
})

When i do print(config["myKey"]) it will print the value.
But when i print just print(config), it will print as [Object Object].

If i run config.getClass() it will say there is not function getClass for this object. Running typeof config just returns "object".

Looking at: http://vertx.io/docs/apidocs/io/vertx/config/ConfigRetriever.html and https://github.com/vert-x3/vertx-config/blob/master/vertx-config/src/main/java/io/vertx/config/impl/ConfigRetrieverImpl.java#L172 it returns the current() from the AsyncRequest. Thus base on my understanding this should return a JsonObject (http://vertx.io/docs/apidocs/io/vertx/core/json/JsonObject.html). But it seems to be a typeless object? the jsonobject fucntions does seem to exist on the object being returned.

Is there a "typing" of some kind that i am missing?

(working with nashorn/js, docker: vertx alpine image, and stack manager)

{ 
  "variables": {
    "vertx.version": "3.5.1"
  },
  "dependencies": [
    {
      "groupId": "io.vertx",
      "artifactId": "vertx-config",
      "version": "${vertx.version}",
      "included": true
    }
    {
      "groupId": "io.vertx",
      "artifactId": "vertx-core",
      "version": "${vertx.version}",
      "included": true
    },
    {
      "groupId": "io.vertx",
      "artifactId": "vertx-lang-js",
      "version": "${vertx.version}",
      "included": true
    },
    {
      "groupId": "io.vertx",
      "artifactId": "vertx-web",
      "version": "${vertx.version}",
      "included": true
    },
    {
      "groupId": "io.vertx",
      "artifactId": "vertx-hazelcast",
      "version": "${vertx.version}",
      "included": true
    }
  ]
}

edit:

Dont know enough about java and vertx to know if this is relevant but when:

...
    var JsonObject = Java.type('io.vertx.core.json.JsonObject')
    var myJson = new JsonObject(config)
...

and you print myjson it prints the ensure classpath as a json string.

{"java.runtime.name":"OpenJDK Runtime Environment","sun.boot.library.path":"/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64","java.vm.version":"25.151-b12","java.vm.vendor":"Oracle Corporation","java.vendor.url":"http://java.oracle.com/","path.separator":":","java.vm.name":"OpenJDK 64-Bit Server VM","file.encoding.pkg":"sun.io","java.util.logging.config.file":"/usr/verticles/logging.properties","user.country":"US","sun.java.launcher":"SUN_STANDARD","sun.os.patch.level":"unknown","java.vm.specification.name":"Java Virtual Machine Specification","user.dir":"/usr/verticles","java.runtime.version":"1.8.0_151-b12","java.awt.graphicsenv":"sun.awt.X11GraphicsEnvironment","java.endorsed.dirs":"/usr/lib/jvm/java-1.8-openjdk/jre/lib/endorsed","os.arch":"amd64","java.io.tmpdir":"/tmp","line.separator":"\n","vertx.home":"/usr/local/vertx","java.vm.specification.vendor":"Oracle Corporation","os.name":"Linux","vertx.cli.usage.prefix":"vertx","sun.jnu.encoding":"UTF-8","java.library.path":"/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64:/usr/lib/jvm/java-1.8-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib","io.netty.noJdkZlibDecoder":false,"sun.nio.ch.bugLevel":"","java.specification.name":"Java Platform API Specification","java.class.version":52,"vertx.clusterManagerFactory":"io.vertx.spi.cluster.impl.hazelcast.HazelcastClusterManagerFactory","sun.management.compiler":"HotSpot 64-Bit Tiered Compilers","os.version":"4.9.60-linuxkit-aufs","user.home":"/root","user.timezone":"America/Montreal","java.awt.printerjob":"sun.print.PSPrinterJob","java.specification.version":1.8,"file.encoding":"UTF-8","user.name":"root","java.class.path":":/usr/local/vertx/conf:/usr/local/vertx/lib/netty-codec-4.1.19.Final.jar:/usr/local/vertx/lib/netty-codec-http2-4.1.19.Final.jar:/usr/local/vertx/lib/hazelcast-3.8.2.jar:/usr/local/vertx/lib/vertx-hazelcast-3.5.1.jar:/usr/local/vertx/lib/vertx-web-3.5.1.jar:/usr/local/vertx/lib/mvel2-2.3.1.Final.jar:/usr/local/vertx/lib/netty-codec-http-4.1.19.Final.jar:/usr/local/vertx/lib/vertx-lang-js-3.5.1.jar:/usr/local/vertx/lib/vertx-stack-manager-3.5.1.jar:/usr/local/vertx/lib/netty-common-4.1.19.Final.jar:/usr/local/vertx/lib/vertx-core-3.5.1.jar:/usr/local/vertx/lib/vertx-bridge-common-3.5.1.jar:/usr/local/vertx/lib/vertx-docgen-3.5.1.jar:/usr/local/vertx/lib/netty-transport-native-unix-common-4.1.19.Final.jar:/usr/local/vertx/lib/netty-handler-4.1.19.Final.jar:/usr/local/vertx/lib/netty-resolver-4.1.19.Final.jar:/usr/local/vertx/lib/netty-transport-4.1.19.Final.jar:/usr/local/vertx/lib/jackson-annotations-2.9.0.jar:/usr/local/vertx/lib/netty-resolver-dns-4.1.19.Final.jar:/usr/local/vertx/lib/vertx-codetrans-3.5.1.jar:/usr/local/vertx/lib/vertx-auth-common-3.5.1.jar:/usr/local/vertx/lib/kotlin-stdlib-1.2.20.jar:/usr/local/vertx/lib/vertx-config-3.5.1.jar:/usr/local/vertx/lib/netty-transport-native-kqueue-4.1.19.Final.jar:/usr/local/vertx/lib/netty-transport-native-epoll-4.1.19.Final.jar:/usr/local/vertx/lib/annotations-13.0.jar:/usr/local/vertx/lib/vertx-codegen-3.5.1.jar:/usr/local/vertx/lib/jackson-databind-2.9.3.jar:/usr/local/vertx/lib/netty-buffer-4.1.19.Final.jar:/usr/local/vertx/lib/netty-codec-socks-4.1.19.Final.jar:/usr/local/vertx/lib/netty-codec-dns-4.1.19.Final.jar:/usr/local/vertx/lib/jackson-core-2.9.3.jar:/usr/local/vertx/lib/netty-handler-proxy-4.1.19.Final.jar:/usr/local/vertx/lib/jsoup-1.11.2.jar","java.vm.specification.version":1.8,"sun.arch.data.model":64,"java.home":"/usr/lib/jvm/java-1.8-openjdk/jre","sun.java.command":"io.vertx.core.Launcher run cam-worker.js -cp /usr/verticles/Dockerfile /usr/verticles/cam-worker.js /usr/verticles/cluster.xml /usr/verticles/conf /usr/verticles/config.json /usr/verticles/logging.properties /usr/verticles/verticles /usr/verticles/vertx-stack.json","java.specification.vendor":"Oracle Corporation","user.language":"en","awt.toolkit":"sun.awt.X11.XToolkit","java.vm.info":"mixed mode","java.version":"1.8.0_151","java.ext.dirs":"/usr/lib/jvm/java-1.8-openjdk/jre/lib/ext:/usr/java/packages/lib/ext","sun.boot.class.path":"/usr/lib/jvm/java-1.8-openjdk/jre/lib/resources.jar:/usr/lib/jvm/java-1.8-openjdk/jre/lib/rt.jar:/usr/lib/jvm/java-1.8-openjdk/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-1.8-openjdk/jre/lib/jsse.jar:/usr/lib/jvm/java-1.8-openjdk/jre/lib/jce.jar:/usr/lib/jvm/java-1.8-openjdk/jre/lib/charsets.jar:/usr/lib/jvm/java-1.8-openjdk/jre/lib/jfr.jar:/usr/lib/jvm/java-1.8-openjdk/jre/classes","java.vendor":"Oracle Corporation","file.separator":"/","java.vendor.url.bug":"http://bugreport.sun.com/bugreport/","sun.cpu.endian":"little","sun.io.unicode.encoding":"UnicodeLittle","sun.cpu.isalist":"","PATH":"/usr/local/vertx/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin","VERTX_HOME":"/usr/local/vertx","JAVA_HOME":"/usr/lib/jvm/java-1.8-openjdk/jre","JAVA_OPTS":"-Duser.timezone=America/Montreal","OLDPWD":"/usr/local/vertx","XFILESEARCHPATH":"/usr/dt/app-defaults/%L/Dt","LANG":"C.UTF-8","VERTICLE_NAME":" cam-worker.js","VERTX_JUL_CONFIG":"/usr/verticles/logging.properties","HOSTNAME":"b787ae039331","JAVA_ALPINE_VERSION":"8.151.12-r0","LD_LIBRARY_PATH":"/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64:/usr/lib/jvm/java-1.8-openjdk/jre/../lib/amd64","NLSPATH":"/usr/dt/lib/nls/msg/%L/%N.cat","PWD":"/usr/verticles","JAVA_VERSION":"8u151","VERTICLE_HOME":"/usr/verticles","SHLVL":1,"HOME":"/root","myKey":"myValue"}

Notice the "myKey":"myValue"} at the end.

vertx-config-git tests fail

Running mvn clean install locally makes some vertx-config-git fail.

Failing tests below; seems to be a case sensitivity thing, but the git log does not reveal any changes to the error messaging:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running io.vertx.config.git.GitConfigStoreTest
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Tests run: 24, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 9.654 sec <<< FAILURE! - in io.vertx.config.git.GitConfigStoreTest
testConfigurationUpdateWithMergeIssue_Edit(io.vertx.config.git.GitConfigStoreTest)  Time elapsed: 2.699 sec  <<< FAILURE!
java.lang.AssertionError: 
Expecting:
 <"Unable to rebase repository - Conflicts: [dir/a.json]">
to contain:
 <"conflict"> 
	at io.vertx.config.git.GitConfigStoreTest.lambda$testConfigurationUpdateWithMergeIssue_Edit$20(GitConfigStoreTest.java:565)

testConfigurationUpdateWithMergeIssue_Commit(io.vertx.config.git.GitConfigStoreTest)  Time elapsed: 0.401 sec  <<< FAILURE!
java.lang.AssertionError: 
Expecting:
 <"Unable to rebase repository - Conflicts: [dir/a.json]">
to contain:
 <"conflict"> 
	at io.vertx.config.git.GitConfigStoreTest.lambda$testConfigurationUpdateWithMergeIssue_Commit$17(GitConfigStoreTest.java:519)

Running io.vertx.config.git.GitConfigStoreWithGithubTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.504 sec - in io.vertx.config.git.GitConfigStoreWithGithubTest

Results :

Failed tests: 
  GitConfigStoreTest.lambda$testConfigurationUpdateWithMergeIssue_Commit$17:519 
Expecting:
 <"Unable to rebase repository - Conflicts: [dir/a.json]">
to contain:
 <"conflict"> 
  GitConfigStoreTest.lambda$testConfigurationUpdateWithMergeIssue_Edit$20:565 
Expecting:
 <"Unable to rebase repository - Conflicts: [dir/a.json]">
to contain:
 <"conflict"> 

Tests run: 26, Failures: 2, Errors: 0, Skipped: 0

Documentation shows how to read configuration, doesn't show what to do with it

The documentation page does an excellent job of explaining how to read different types of configurations, but it's not at all clear what to do once you've called retriever.getConfig().

The only example I could find on line was this StackOverflow question, which hard-codes everything (ConfigStoreOptions, ConfigRetrieverOptions , ConfigRetriever) into one verticle's start() method and then constructs DeploymentOptions for a second verticle.

I've literally only been working with Vert.x for a day, so maybe this is more sensible than it sounds, but starting an extra verticle just to read the configuration seems like overkill to me. Alternatively, I could put ConfigRetriever.create() etc. directly in the start() method of my main verticle, call getConfig() there, and make use of the result directly; but this ignores AbstractVerticle.config() (i.e., the config coming from Context), which seems likely to lead to confusion and errors down the road.

It seems like there should be a way to inject the retrieved config into the context, but it's not at all clear what that would be. (Possibly something involving subclassing the Launcher?)

Allow configuring of the Vertx instance itself

I don't know how you'd pull this off since Vertx Config requires a Vertx Instance, hence the chicken-or-egg situation. What I've done as a workaround is have an initial ConfigRetriever that uses a temp Vertx instance. It does the initial retrieve and then I configure Vertx using the properties from there. Then, I close the ConfigRetriever and create a new one that uses the new and configured Vertx instance. It's the one used for subsequent retrievals, both manual and auto-scans.

Thanks and good luck. :)

(This is a follow-up to #23.)

Update Documentation To Clarify Updating Configuration

Currently, the documentation does not make it clear how to update the running configuration from inside of the application. I recently discovered from experimentation that the following appears to work:

vertx.getOrCreateContext().config().mergeIn(newConfigJsonObject);

Can't use multiple stores

Unable to use multiple stores in java:

Using "vault" and "redis" gives: "(known implementations are: [redis])" if redis is first in dependencies and "(known implementations are: [vault])" if vault is first. Can't use them both.

Even when using only one additional store an error is thrown when using the "json" config store. It seems like an additional store is overwriting the available stores.

Overloading rules - shallow json merge

Is there a reason why config retriever merges config JSONs only at depth 1 ?
I have following case where config files is pretty big, so wanted to split it into smaller fragments, and let config retriever to merge it into on. In order to simplify management of configuration of my app, I wanted to split config files into two. For instance, first config file have:

{
   "a": {
       "b": {
           "foo": "bar"
       }
   }
}

In the second one, I wanted to configure other fields under a.b as follows (so keep "c" configurations in a separate file)

{
   "a": {
       "c": {
           "foo": "bar"
       }
   }
}

I configure retriever to get those two files (two file stores) and expected to get

{
   "a": {
       "b": {
           "foo": "bar"
       },
       "c": {
           "foo": "bar"
       }
   }
}

But the resulting configuration is the one from the second file. It simply overwrote the object "a" because the retriever does json.mergeIn(JsonObject) so it merges only on the level of "a" object.
Why it cannot do deep merge ? json.mergeIn(JsonObject, true) ?

Listening to the changes in redis

I would expect that this could that listens to the my-microservice-config's values

Here I

  1. create a redis store
  2. configure retrive options (every 2 sec).
  3. set the options to the retriver

Then if I change a value for the my-microservice-config then it would trigger the System.out.ptintln("123") output.

This seems does not work.

Also (speaking about ConfigStoreOptions abstraction) seems we may not use .setScanPeriod(2000) since it come with pub-sub capabilities already so it would notify as it is changed.

Here is the code I use to test it:

final ConfigStoreOptions redisSore = new ConfigStoreOptions()
           .setType("redis")
           .setConfig(new JsonObject()
               .put("host", "localhost")
               .put("port", 6379)
               .put("key", "my-microservice-config")
           );

       final ConfigRetrieverOptions options = new ConfigRetrieverOptions()   // listen to the config changes
           .setScanPeriod(2000)
           .addStore(redisSore);

       final ConfigRetriever retriever = ConfigRetriever.create(vertx, options);
       retriever.getConfig( ar -> {
           if ( ar.failed()) {

               } else {
               System.out.ptintln("123");  // never reach this after value change
               final JsonObject jsonConfig = ar.result();

Define list of variables to accept from environment

Problem:
Reading all environment variables might "pollute" the configuration with values that are meant for other applications. Most notably the $PORT variable used in containers for the main web server.

Potential solution:

final JsonObject envConfig = new JsonObject().put("keys", new JsonArray("[\"color\",\"taste\"]"));
final ConfigStoreOptions env = new ConfigStoreOptions().setType("env").setConfig(envConfig);

This requires to overwrite https://github.com/vert-x3/vertx-config/blob/master/vertx-config/src/main/java/io/vertx/config/impl/spi/EnvVariablesConfigStore.java like this:

public ConfigStore create(Vertx vertx, JsonObject configuration) {
   return new EnvVariablesConfigStore(
      configuration.getBoolean("raw-data", false),
      configuration.getJsonArray("keys"));
 }

public EnvVariablesConfigStore(boolean rawData, JsonArray keys) {
    this.rawData = rawData;
    this.keys = (keys == null) ? null : keys.getList();
  }

  private static JsonObject all(Map<String, String> env, boolean rawData) {
    JsonObject json = new JsonObject();
    List localKeys = (this.keys == null) ? env.keySet() : this.keys;
    env.entrySet().stream()
        .forEach(entry -> {
              if (localKeys.contains(entry.getKey()) {
                  JsonObjectHelper.put(json, entry.getKey(), entry.getValue(), rawData)
             }
        }
     );
    return json;
  }

Something along that lines

java.lang.IllegalStateException: Result is already complete: succeeded

I use vertx 3.4.1.

I want to load config.json from file-system within a start-method of a vertical-instance:

ConfigStoreOptions configFile = new ConfigStoreOptions()
				  .setType("file")
				  .setFormat("json")
				  .setConfig(new JsonObject().put("path", "src/main/resources/config.json"));
		  
		  ConfigRetrieverOptions options = new ConfigRetrieverOptions().addStore(configFile);
		  ConfigRetriever retriever = ConfigRetriever.create(vertx, options);
		  
		  retriever.getConfig(ar -> {
			  if (ar.failed()) {
				  log.warn("Failed to retrieve the configuration");
			  } else {
				  JsonObject config = ar.result();
				  log.info(config.getString("http.port"));
			  }
			});

However, I get this stacktrace:

[INFO] 16:59:40.774 | vert.x-eventloop-thread-0 | ContextImpl | 343 | Unhandled exception
[INFO] java.lang.IllegalStateException: Result is already complete: succeeded
[INFO] 	at io.vertx.core.impl.FutureImpl.fail(FutureImpl.java:121) ~[vertx-core-3.4.1.jar:?]
[INFO] 	at io.vertx.config.impl.ConfigRetrieverImpl.lambda$null$7(ConfigRetrieverImpl.java:166) ~[vertx-config-3.4.1.jar:?]
[INFO] 	at io.vertx.config.impl.ConfigurationProvider.lambda$null$0(ConfigurationProvider.java:41) ~[vertx-config-3.4.1.jar:?]
[INFO] 	at io.vertx.config.impl.spi.JsonProcessor.process(JsonProcessor.java:27) ~[vertx-config-3.4.1.jar:?]
[INFO] 	at io.vertx.config.impl.ConfigurationProvider.lambda$get$1(ConfigurationProvider.java:39) ~[vertx-config-3.4.1.jar:?]
[INFO] 	at io.vertx.core.impl.FutureImpl.checkCallHandler(FutureImpl.java:188) ~[vertx-core-3.4.1.jar:?]
[INFO] 	at io.vertx.core.impl.FutureImpl.setHandler(FutureImpl.java:100) ~[vertx-core-3.4.1.jar:?]
[INFO] 	at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:287) ~[vertx-core-3.4.1.jar:?]
[INFO] 	at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:337) ~[vertx-core-3.4.1.jar:?]
[INFO] 	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [netty-common-4.1.8.Final.jar:4.1.8.Final]
[INFO] 	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403) [netty-common-4.1.8.Final.jar:4.1.8.Final]
[INFO] 	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:445) [netty-transport-4.1.8.Final.jar:4.1.8.Final]
[INFO] 	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [netty-common-4.1.8.Final.jar:4.1.8.Final]
[INFO] 	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_74]

Is this my fault?

Spring Config Server: wrong overriding order

I've recently used lib for obtaining configuration from Spring Config Server and I think that there is critical bug in there. Basically properties overriding order is wrong. Spring uses order described here https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html.

Spring Config Server when calling for configuration returns collection of propertySources in descending order (most relevant first). In your code you are merging those sources but in the way that properties from the next source override those from previous.

I've fixed this issue for my local development so if you need more clarification I can provide code snippet or even pull request.

TOML Support

I've written a small library to add support for the TOML configuration format here using the toml4j library. Is there any interest in creating a pull request and adding this support to this project? It should only take a small amount of effort to add although I am unsure on how to test the code generation side of things.

[Git config store] META-INF conflicts

When I implemented both vertx-config and vertx-config-git components, the original resources/META-INF/services/io.vertx.config.spi.ConfigStoreFactory file in vertx-config is overridden by the file in vertx-config-git which has the same name. That causes I can't use the original config stores which defined in vertx-config (java.lang.IllegalArgumentException: unknown configuration store implementation: directory (known implementations are: [git])).

The temporary solution is to write a file which contains class names in ConfigStoreFactory files in two components to override them:

# Should be stored in your project resources/META-INF/services/io.vertx.config.spi.ConfigStoreFactory

# Original class names in vertx-config
io.vertx.config.impl.spi.FileConfigtoreFactory
io.vertx.config.impl.spi.JsonConfigStoreFactory
io.vertx.config.impl.spi.EnvVariablesConfigStore
io.vertx.config.impl.spi.SystemPropertiesConfigStore
io.vertx.config.impl.spi.HttpConfigStoreFactory
io.vertx.config.impl.spi.EventBusConfigStoreFactory
io.vertx.config.impl.spi.DirectoryConfigStoreFactory

# Additional class name in vertx-config-git
io.vertx.config.git.GitConfigStoreFactory

The version I'm using is 3.6.0.
Hope that helps!

Intermittent failures in CI: Unhandled exception

Different tests fail from time to time on CI

SEVERE: Unhandled exception
java.util.concurrent.RejectedExecutionException: Task io.vertx.core.impl.TaskQueue$$Lambda$11/1613255205@3cd8b5c0 rejected from java.util.concurrent.ThreadPoolExecutor@321f5c2b[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 2]
	at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2047)
	at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
	at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369)
	at io.vertx.core.impl.TaskQueue.execute(TaskQueue.java:78)
	at io.vertx.core.impl.ContextImpl.executeBlocking(ContextImpl.java:291)
	at io.vertx.core.impl.ContextImpl.executeBlocking(ContextImpl.java:235)
	at io.vertx.core.file.impl.FileSystemImpl$BlockingAction.run(FileSystemImpl.java:809)
	at io.vertx.core.file.impl.FileSystemImpl.readFile(FileSystemImpl.java:280)
	at io.vertx.config.spi.utils.FileSet.lambda$buildConfiguration$3(FileSet.java:85)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at io.vertx.config.spi.utils.FileSet.buildConfiguration(FileSet.java:81)
	at io.vertx.config.impl.spi.DirectoryConfigStore.lambda$get$4(DirectoryConfigStore.java:69)
	at io.vertx.core.impl.FutureImpl.setHandler(FutureImpl.java:81)
	at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:287)
	at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:337)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:445)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
	at java.lang.Thread.run(Thread.java:745)

https://vertx.ci.cloudbees.com/job/vert.x3-config/407
https://vertx.ci.cloudbees.com/job/vert.x3-config/405
https://vertx.ci.cloudbees.com/job/vert.x3-config/390

Not possible to reach code to clone git repo

As far as I can see it is not possible to reach line

due to the fact that path is checked, if it is a file here:

and also checked if it is a directory here:

So it seems it is unreachable if you do a proper configuration. Also the documentation says (https://vertx.io/docs/vertx-config/java/) that "If the local path does not exist, the configuration store clones the repository into this directory. Then it reads the file matching the different file sets."
which is not possible.

Am I missing something here ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.