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

FISH-788 Support sub-directories for MPCONFIG SecretDirConfigSource. #5006 #5007

Merged
merged 23 commits into from
Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f2795e2
Support sub-directories for MPCONFIG SecretDirConfigSource. #5006
poikilotherm Nov 25, 2020
74288cb
Revert glob import from java.nio and java.util introduced in f2795e2a.
poikilotherm Nov 26, 2020
2a6f8c3
Add first draft of complete rewrite of the SecretsDirConfigSource mov…
poikilotherm Nov 30, 2020
dceb4c7
Remove SecretsDirConfigSource, replaced with DirConfigSource. #5006
poikilotherm Nov 30, 2020
0b3233a
DirConfigSource: fix imports, add equals() and hashCode() to DirPrope…
poikilotherm Nov 30, 2020
a76cdb4
DirConfigSource: move initial tree walker to anonymous declaration.
poikilotherm Nov 30, 2020
ccde673
Refactor after review by @jbee. Mostly scope and naming changes. #5006
poikilotherm Dec 7, 2020
763f400
Make DirConfigSource retrieve the executor from the global ConfigProv…
poikilotherm Dec 7, 2020
7601c8d
Add initial test DirConfigSourceTest and remove SecretDirConfigSource…
poikilotherm Dec 7, 2020
4234a68
Fix DirConfigSource.parsePropertyNameFromPath() to fix failing tests.
poikilotherm Dec 7, 2020
eb622fc
Refactor DirConfigSource.DirProperty and test longest match. #5006
poikilotherm Dec 7, 2020
8e86e89
Rename DirConfigSource.checkLongestMatchForPath() to isLongerMatchFor…
poikilotherm Dec 7, 2020
a277be5
Add more test for initial read of property files in DirConfigSource
poikilotherm Dec 7, 2020
9bda0ae
refactor(mpconfig): incorporate review comments by @jbee and @pdudits…
poikilotherm Jan 25, 2021
a50ad85
fix(mpconfig): make dirconfigsource match same pathes on update and f…
poikilotherm Jan 25, 2021
e8af024
refactor(mpconfig): Add unit tests for DirConfigSource. #5006
poikilotherm Jan 25, 2021
91a07ca
test(mpconfig): fix wrong file size test for DirSourceConfig
poikilotherm Jan 25, 2021
dc78c29
fix(mpconfig): Check for absolute pathes in DirConfigSource.findDir()
poikilotherm Jan 27, 2021
f7c2046
test(mpconfig): Have DirConfigSource.findDir() covered by tests.
poikilotherm Jan 27, 2021
784995f
refactor(mpconfig): Make DirConfigSource.isLongestMatch() more testab…
poikilotherm Jan 27, 2021
401555d
feat(mpconfig): Make DirConfigSource ignore files with certains exten…
poikilotherm Jan 27, 2021
ce30d87
revert(mpconfig): by request from @pdudits, this isn't necessary for …
poikilotherm Jan 27, 2021
45d7a33
fix(mpconfig): Do not cutoff file extensions for property names in Di…
poikilotherm Jan 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,12 @@ public PayaraConfigSource() {
configService = null;
}

/**
* Should only be used for test purposes
* @param configService Usually a mocked implementation
*/
PayaraConfigSource(ConfigProviderResolverImpl configService) {
this.domainConfiguration = null;
this.configService = configService;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
import javax.inject.Inject;
import javax.inject.Named;

import fish.payara.nucleus.executorservice.PayaraExecutorService;
import org.eclipse.microprofile.config.Config;
import org.eclipse.microprofile.config.spi.ConfigBuilder;
import org.eclipse.microprofile.config.spi.ConfigProviderResolver;
Expand Down Expand Up @@ -104,7 +105,7 @@
import fish.payara.nucleus.microprofile.config.source.PayaraExpressionConfigSource;
import fish.payara.nucleus.microprofile.config.source.PayaraServerProperties;
import fish.payara.nucleus.microprofile.config.source.PropertiesConfigSource;
import fish.payara.nucleus.microprofile.config.source.SecretsDirConfigSource;
import fish.payara.nucleus.microprofile.config.source.DirConfigSource;
import fish.payara.nucleus.microprofile.config.source.ServerConfigSource;
import fish.payara.nucleus.microprofile.config.source.SystemPropertyConfigSource;
import fish.payara.nucleus.microprofile.config.source.extension.ExtensionConfigSourceService;
Expand Down Expand Up @@ -134,6 +135,10 @@ public class ConfigProviderResolverImpl extends ConfigProviderResolver {

@Inject
private ServerContext context;

// Some sources might want to execute background tasks in a controlled fashion
@Inject
private PayaraExecutorService executorService;

// Gives access to deployed applications
@Inject
Expand Down Expand Up @@ -292,6 +297,10 @@ public ConfigBuilder getBuilder() {
return new PayaraConfigBuilder(this);
}

public PayaraExecutorService getExecutor() {
return this.executorService;
}

Config getNamedConfig(String applicationName) {
Config result = null;
ApplicationInfo info = applicationRegistry.get(applicationName);
Expand All @@ -317,7 +326,7 @@ private List<ConfigSource> getDefaultSources(String appName, String moduleName)
sources.add(new SystemPropertyConfigSource());
sources.add(new JNDIConfigSource());
sources.add(new PayaraServerProperties());
sources.add(new SecretsDirConfigSource());
sources.add(new DirConfigSource());
sources.add(new PasswordAliasConfigSource());
sources.add(new JDBCConfigSource());
if (appName != null) {
Expand Down
Loading