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 #14953

Merged
merged 4 commits into from May 14, 2019

Conversation

@blazember
Copy link
Contributor

blazember commented Apr 29, 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 file in the system property has a suffix xml, we treat is as XML config
  • if the file in the system property has a suffix [yaml,yml], we treat it as YAML config
  • if the system property is set we fail fast if we can't load the config from the referenced resource/file with the config builder selected by the suffix
  • if the file in the system property has any other suffix (or don't have suffix), we fail fast enforcing to use suffixes 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.

Fix for 3.12.1: #14945

Fixes #14924

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 fail fast enforcing to use suffixes 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 force-pushed the blazember:4.0/fix/gh-14924 branch from 22fe753 to 679d76f Apr 29, 2019
@vojtechtoman vojtechtoman self-requested a review May 3, 2019
@blazember

This comment has been minimized.

Copy link
Contributor Author

blazember commented May 6, 2019

@mmedenjak @vojtechtoman pushed another commit with mostly straightforward and one-liner changes (renaming etc). Could you please take another look?

Copy link
Contributor

vojtechtoman left a comment

Looks good to me.

@blazember

This comment has been minimized.

Copy link
Contributor Author

blazember commented May 6, 2019

run-lab-run

@blazember blazember merged commit 1ba46eb into hazelcast:master May 14, 2019
1 check passed
1 check passed
default Test PASSed.
Details
@blazember blazember deleted the blazember:4.0/fix/gh-14924 branch May 14, 2019
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.