Skip to content

Commit

Permalink
fix bug (#1216)
Browse files Browse the repository at this point in the history
Signed-off-by: Yee Hing Tong <[email protected]>

Signed-off-by: Yee Hing Tong <[email protected]>
  • Loading branch information
wild-endeavor authored Oct 3, 2022
1 parent 63ad4fc commit 0bd3261
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flytekit/core/container_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ def execute(self, **kwargs) -> Any:
return None

def get_container(self, settings: SerializationSettings) -> _task_model.Container:
env = {**settings.env, **self.environment} if self.environment else settings.env
env = settings.env or {}
env = {**env, **self.environment} if self.environment else env
return _get_container_definition(
image=self._image,
command=self._cmd,
Expand Down
1 change: 1 addition & 0 deletions tests/flytekit/unit/core/test_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def test_serialization():
inputs=kwtypes(val=int),
outputs=kwtypes(out=int),
image="alpine",
environment={"a": "b"},
command=["sh", "-c", "echo $(( {{.Inputs.val}} * {{.Inputs.val}} )) | tee /var/outputs/out"],
)

Expand Down

0 comments on commit 0bd3261

Please sign in to comment.