Skip to content

Commit

Permalink
added env to the serialize commands through the context object
Browse files Browse the repository at this point in the history
Signed-off-by: Minura Punchihewa <[email protected]>
  • Loading branch information
MinuraPunchihewa committed Oct 9, 2023
1 parent d44f4ae commit 8d7c269
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flytekit/clis/sdk_in_container/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
CTX_LOCAL_SRC_ROOT = "local_source_root"
CTX_FLYTEKIT_VIRTUALENV_ROOT = "flytekit_virtualenv_root"
CTX_PYTHON_INTERPRETER = "python_interpreter"
CTX_ENV = "env"


class SerializationMode(_Enum):
Expand Down Expand Up @@ -131,6 +132,7 @@ def serialize(
"""
ctx.obj[CTX_IMAGE] = image_config
ctx.obj[CTX_LOCAL_SRC_ROOT] = local_source_root
ctx.obj[CTX_ENV] = env
click.echo(f"Serializing Flyte elements with image {image_config}")

if in_container_virtualenv_root:
Expand Down Expand Up @@ -167,6 +169,7 @@ def workflows(ctx, folder=None):
flytekit_virtualenv_root=ctx.obj[CTX_FLYTEKIT_VIRTUALENV_ROOT],
python_interpreter=ctx.obj[CTX_PYTHON_INTERPRETER],
config_file=ctx.obj.get(constants.CTX_CONFIG_FILE, None),
env=ctx.obj.get(CTX_ENV, None),
)


Expand Down Expand Up @@ -206,6 +209,7 @@ def fast_workflows(ctx, folder=None, deref_symlinks=False):
flytekit_virtualenv_root=ctx.obj[CTX_FLYTEKIT_VIRTUALENV_ROOT],
python_interpreter=ctx.obj[CTX_PYTHON_INTERPRETER],
config_file=ctx.obj.get(constants.CTX_CONFIG_FILE, None),
env=ctx.obj.get(CTX_ENV, None),
)


Expand Down

0 comments on commit 8d7c269

Please sign in to comment.