Overriding application.conf settings fails
See original GitHub issueI have a required application.conf setting ($KAFKA_BOOTSTRAP_SERVERS) in main/resources/application.conf
which I override in test/resources/application.conf
. When I run sbt clean test
the build passes, but with bloop it fails to read the application.conf in the test resources folder and I get:
com.rewardsnetwork.decisionator.persistence.DataAccessSpec *** ABORTED ***
pureconfig.error.ConfigReaderException: Cannot convert configuration to a com.rewardsnetwork.decisionator.config.DecisionatorConfig. Failures are:
- (file:/Users/kbreidenbach/Development/scala/dff-decisionator/src/main/resources/application.conf:18) Unable to parse the configuration: Could not resolve substitution to a value: ${KAFKA_BOOTSTRAP_SERVERS}.
at pureconfig.module.catseffect.package$.$anonfun$loadF$2(package.scala:23)
at cats.syntax.EitherOps$.leftMap$extension(either.scala:151)
at pureconfig.module.catseffect.package$.$anonfun$loadF$1(package.scala:23)
at cats.effect.internals.IORunLoop$.step(IORunLoop.scala:185)
at cats.effect.IO.unsafeRunTimed(IO.scala:320)
at cats.effect.IO.unsafeRunSync(IO.scala:239)
at com.rewardsnetwork.decisionator.persistence.DataAccessSpec.<init>(DataAccessSpec.scala:34)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
This may be a reintroduction of the bug from this issue: https://github.com/scalacenter/bloop/issues/102
bloop about
:
bloop v1.4.0-RC1
Using Scala v2.12.8 and Zinc v1.3.0-M4+32-b1accb96
Running on Java JDK v12.0.1 (/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home)
-> Supports debugging user code, Java Debug Interface (JDI) is available.
Maintained by the Scala Center (Jorge Vicente Cantero, Martin Duhem)
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Play framework overriding `application.conf` values based on ...
Here is an example of providing a default value for akka.log-config-on-start , which will be overridden by a Java system property or an ......
Read more >Config File - 2.8.x - Play Framework
Settings in application.conf will override settings in reference.conf files. It's also possible to set configuration using system properties. System properties ...
Read more >Akka application.conf does not override values in reference.conf
In the Main_app of my application, I load the akka config like this but the configuration is never print in stdout. If I...
Read more >Notes about loading configuration Examples for Play ...
Allow overriding environment-dependent entries with environment variables. Fail-fast, most configuration models should be loaded eagerly when ...
Read more >Configuration - DataStax Java Driver
Sample application.conf: overrides one option and adds a profile ... error } else if (configChanged) { // do something after the config change...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kbreidenbach and I found a temporary workaround for now: if you rename
test/resources/application.conf
to some other name, then it loads just fine. I think the root of the problem is a namespace conflict since it is trying to load the resource from the main resources folder first.This is very useful. Thank you, will have a look.