-
Notifications
You must be signed in to change notification settings - Fork 116
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
Is the return value of Config#getConfigSources() specified to be immutable and unchanging? #371
Comments
The specification describes all the setup and discovery which happens at startup. And that's it. |
Well, the specification doesn't actually say anything about how Also, the specification has a section on dynamic |
Indeed that might be good to clarify. |
@struberg and I talked this a bit more in today's hangout. We think it is best left unspecified so that implementations can have freedom to decide whether they want to support dynamically reloaded config sources. |
Thanks; in that case, I suppose that it must be specified that the return value must be safe for concurrent use by multiple threads? What must I synchronize on when iterating over it? Itself? |
@ljnelson it is best for you to join our MP Config weekly hangout to discuss your use case. Can you join next week? Please let me know on gitter if you need help with the meeting calendar. |
I'll try to make it. (For background, this isn't really connected with a use case: this is me simply trying to understand how I should iterate through the return value returned by |
I'll note that it's always possible to provide a That said, it should definitely be specified that the config sources iterable returned from |
As today's hangout, the spec will not enforce whether the list is immutable or not. However, we would like to clarify the method |
@carlosdlr I'll take this one and add one line on the javadoc so that it can be in the release of Config 1.4. |
Thank you @Emily-Jiang |
Signed-off-by: Emily Jiang <[email protected]>
…ckstyle error introduced be a previous PR Signed-off-by: Emily Jiang <[email protected]>
#371 improve javadoc on getConfigSources(), also fixed the checkstyle…
Why was this issue closed? There was a lengthy discussion on the merged PR with @ljnelson and @radcortez that I believe impacts the closure of this issue |
I would like to kindly request that this issue be reopened as (a) it was not resolved and (b) no reason was given for its closing. |
At the risk of derailing this thread, can someone point me to any background on why config sources are exposed by |
In #370 @struberg notes that "Config infra is basically immutable". Is there a note somewhere in the specification that indicates that, for example,
Config#getConfigSources()
must return an unchangingSet
ofConfigSource
s when invoked? Should there be?Similarly, what is the contract for
ConfigSourceProvider#getConfigSources(ClassLoader)
? Is it required or prohibited or undefined for aConfigSourceProvider
implementation to return a dynamicSet
?The text was updated successfully, but these errors were encountered: