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

Fix regression in declarative config file resolution #14945

Merged
merged 1 commit into from May 6, 2019

Conversation

Projects
None yet
3 participants
@blazember
Copy link
Contributor

commented Apr 26, 2019

3.12 introduced a regression that configuration files with suffixes not
in [xml,yaml,yml] passed in system property are ignored silently and
the config resolution continues following the resolution priority, most
likely resolving the default XML configuration shipped with the jar. The
expected behavior is:

  • if the system property is set we fail fast if we can't load the config
    from the referenced resource/file
  • if the file in the system property has a suffix [yaml,yml], we treat it
    as YAML config
  • if the file in the system property has any other suffix (or don't have
    suffix), we treat it as XML config

Note that in 4.0 the fix will be different, we enforce the config files
to have suffix from the [xml,yaml,yml] list.

This commit fixes this behavior in member, client and client-failover
config resolution, with additional tests verifying the resolution logic.

Fixes #14924

Fix regression in declarative config file resolution
3.12 introduced a regression that configuration files with suffixes not
in [xml,yaml,yml] passed in system property are ignored silently and
the config resolution continues following the resolution priority, most
likely resolving the default XML configuration shipped with the jar. The
expected behavior is:
- if the system property is set we fail fast if we can't load the config
from the referenced resource/file
- if the file in the system property has a suffix [yaml,yml], we treat it
as YAML config
- if the file in the system property has any other suffix (or don't have
suffix), we treat it as XML config

Note that in 4.0 the fix will be different, we enforce the config files
to have suffix from the [xml,yaml,yml] list.

This commit fixes this behavior in member, client and client-failover
config resolution, with additional tests verifying the resolution logic.

Fixes #14924

@blazember blazember added this to the 3.12.1 milestone Apr 26, 2019

@blazember blazember self-assigned this Apr 26, 2019

@blazember

This comment has been minimized.

Copy link
Contributor Author

commented Apr 26, 2019

cc @olukas

@blazember

This comment has been minimized.

Copy link
Contributor Author

commented Apr 26, 2019

run-lab-run

@eminn

eminn approved these changes May 6, 2019

@blazember blazember merged commit a573dff into hazelcast:maintenance-3.x May 6, 2019

1 check passed

default Test PASSed.
Details

@blazember blazember deleted the blazember:3.x/fix/gh-14924 branch May 6, 2019

@blazember

This comment has been minimized.

Copy link
Contributor Author

commented May 6, 2019

Thanks for the reviews @eminn @vojtechtoman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.