diff --git a/CHANGELOG.md b/CHANGELOG.md index 02f0233..17d4a60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org). + +## [0.1.1] - 2021-04-29 + +### Added +### Changed +### Deprecated +### Removed +### Fixed +- Better handling for config types (extract params more carefully). + +### Security + + ## [0.1.0] - 2021-04-20 ### Added diff --git a/fromconfig_yarn/launcher.py b/fromconfig_yarn/launcher.py index 465d0d7..c79de53 100644 --- a/fromconfig_yarn/launcher.py +++ b/fromconfig_yarn/launcher.py @@ -31,7 +31,7 @@ def __init__(self, launcher: fromconfig.launcher.Launcher = None): def __call__(self, config: Any, command: str = ""): """Run code on yarn.""" # Extract params from the yarn entry of the config - params = config.get("yarn", {}) + params = (config.get("yarn") or {}) if fromconfig.utils.is_mapping(config) else {} # type: ignore env_vars = params.get("env_vars", _DEFAULT_ENV_VARS) hadoop_file_systems = params.get("hadoop_file_systems", ()) ignored_packages = params.get("ignored_packages", ()) diff --git a/fromconfig_yarn/version.py b/fromconfig_yarn/version.py index 48c9948..07d1830 100644 --- a/fromconfig_yarn/version.py +++ b/fromconfig_yarn/version.py @@ -1,6 +1,6 @@ # pylint: disable=all -__version__ = "0.1.0" +__version__ = "0.1.1" __author__ = "Criteo" diff --git a/tests/unit/test_launcher.py b/tests/unit/test_launcher.py index 3a9fda4..879f923 100644 --- a/tests/unit/test_launcher.py +++ b/tests/unit/test_launcher.py @@ -54,6 +54,6 @@ def _monkey_submit_func(func, args, **kwargs): monkeypatch.setattr(skein_launcher, "submit_func", _monkey_submit_func) config = {"run": None, "launcher": {"run": "yarn"}, "yarn": yarn} - launcher = fromconfig.launcher.Launcher.fromconfig(config["launcher"]) + launcher = fromconfig.launcher.DefaultLauncher.fromconfig(config["launcher"]) launcher(config, "run") assert got["ran"]