Knotx / knotx-launcher

Launcher provides a way to configure and run bare Knot.x instance.
https://knotx.io
Apache License 2.0
1 stars 0 forks source link

System properties mechanism doesn't work from included files #8

Closed marcinkp closed 5 years ago

marcinkp commented 5 years ago

Describe the bug Substitution is not resolved for properties withing included configuration

To Reproduce Steps to reproduce the behavior:

  1. In application conf define
    global {
    profile{
    include required("includes/profile-active.conf")
    }
    }
    ...
    config.server.options.config {
    somevalue = ${global.profile.somevalue}
    }
  2. profile-active.conf has:
    somevalue =  ${custom.system.property}
  3. Execute
    ./bin/knotx.bat run-knotx -Dcustom.system.property=myvalue
  4. See error

Could not resolve substitution to a value: ${global.profile.custom.system.property}

tomaszmichalak commented 5 years ago

@marcinkp Can you please implement Unit test?

marcinkp commented 5 years ago

In fact it is not an issue. Its specific HOCON implementation. See: https://github.com/lightbend/config/blob/master/HOCON.md#include-semantics-substitution

I prepared unit test which cover this scenario.