Skip to content
Permalink
Browse files

Merge pull request #1719 from PrefectHQ/docker-config-path

Fix issue with user config path being overwritten in docker storage
  • Loading branch information...
cicdw committed Nov 8, 2019
2 parents 012281f + 242345a commit ba1f7d29fa80b8c68e53ba376e4a82aedf9b1c3c
Showing with 12 additions and 2 deletions.
  1. +1 −1 CHANGELOG.md
  2. +3 −1 src/prefect/environments/storage/docker.py
  3. +8 −0 tests/environments/storage/test_docker_storage.py
@@ -18,7 +18,7 @@ These changes are available in the [master branch](https://github.com/PrefectHQ/

### Fixes

- None
- Fix issue where users could not override their user config path when deploying Docker to Cloud - [#1719](https://github.com/PrefectHQ/prefect/pull/1719)

### Deprecations

@@ -76,7 +76,9 @@ def __init__(
self.python_dependencies.append("wheel")

self.env_vars = env_vars or {}
self.env_vars["PREFECT__USER_CONFIG_PATH"] = "/root/.prefect/config.toml"
self.env_vars.setdefault(
"PREFECT__USER_CONFIG_PATH", "/root/.prefect/config.toml"
)

self.files = files or {}
self.flows = dict() # type: Dict[str, str]
@@ -111,6 +111,14 @@ def test_initialized_docker_storage():
assert storage.local_image


def test_docker_storage_allows_for_user_provided_config_locations():
storage = Docker(env_vars={"PREFECT__USER_CONFIG_PATH": "1"},)

assert storage.env_vars == {
"PREFECT__USER_CONFIG_PATH": "1",
}


def test_files_not_absolute_path():
with pytest.raises(ValueError):
storage = Docker(files={"test": "test"})

0 comments on commit ba1f7d2

Please sign in to comment.
You can’t perform that action at this time.