Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 3926 - Hocon #includes not handled properly #3960

Closed
wants to merge 6 commits into from

Conversation

trentjeff
Copy link
Member

discoveries:

  1. Hocon include is actually enabled by default in Helidon - we thought it was turned off by default but it's not.
  2. The config context root directory (our Config.builder()) seems to be causing the includes not to be resolved properly - and in fact will cause surprising errant behavior for the customer.

This PR Fixes #3926 for discoveries above.

@tomas-langer will need to discuss this with you since I went much deeper than I was hoping to go. I've made notes in the code for specific things you should pay particular attention to. I'm guessing there are more appropriate ways to handle, but was not sure where to look. See slack thread for more background.

1) HOCON's #include is enabled OOTB by default; if we need to disable it we will need to take measures to disable it (not included in this change).  @laird: note that the default options are initialized with null for includer, but then it patches it in later.

2) The bug appears to be located in BuilderImpl in that it doesn't properly reflect the config file path into HOCON for nested directories.  If this is a feature of Helidon, there is an element of surprise with that choice, since most users would expect an include to resolve to the CWD, and not the base directory.

Will wait for guidance on how to proceed..
1) HOCON's #include is enabled OOTB by default; if we need to disable it we will need to take measures to disable it (not included in this change).  @laird: note that the default options are initialized with null for includer, but then it patches it in later.

2) The bug appears to be located in BuilderImpl in that it doesn't properly reflect the config file path into HOCON for nested directories.  If this is a feature of Helidon, there is an element of surprise with that choice, since most users would expect an include to resolve to the CWD, and not the base directory.

Will wait for guidance on how to proceed..
1) HOCON's #include is enabled OOTB by default; if we need to disable it we will need to take measures to disable it (not included in this change).  @laird: note that the default options are initialized with null for includer, but then it patches it in later.

2) The bug appears to be located in BuilderImpl in that it doesn't properly reflect the config file path into HOCON for nested directories.  If this is a feature of Helidon, there is an element of surprise with that choice, since most users would expect an include to resolve to the CWD, and not the base directory.

Will wait for guidance on how to proceed..
@trentjeff trentjeff changed the title Issue 3926 Issue 3926 - Hocon #includes not handled properly Mar 13, 2022
@trentjeff trentjeff closed this Mar 22, 2022
@trentjeff
Copy link
Member Author

replaced with a newer PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hocon configs does not support include
1 participant