Skip to content

Commit 9c52f5e

Browse files
committed
define the default task config in the task config
Signed-off-by: Nelson Chen <asd3431090@gmail.com>
1 parent ed4584e commit 9c52f5e

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

flytekit/clis/sdk_in_container/run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,8 @@ def run_remote(
585585
execution = remote.execute(
586586
entity,
587587
inputs=inputs,
588-
project=remote.default_project or project,
589-
domain=remote.default_domain or domain,
588+
project=project or remote.default_project,
589+
domain=domain or remote.default_domain,
590590
execution_name=run_level_params.name,
591591
options=options_from_run_params(run_level_params),
592592
type_hints=type_hints,

flytekit/clis/sdk_in_container/utils.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
param_decls=["-p", "--project"],
2222
required=False,
2323
type=str,
24-
default=os.getenv("FLYTE_DEFAULT_PROJECT", "flytesnacks"),
2524
show_default=True,
2625
help="Project to register and run this workflow in. Can also be set through envvar " "``FLYTE_DEFAULT_PROJECT``",
2726
)
@@ -30,7 +29,6 @@
3029
param_decls=["-d", "--domain"],
3130
required=False,
3231
type=str,
33-
default=os.getenv("FLYTE_DEFAULT_DOMAIN", "development"),
3432
show_default=True,
3533
help="Domain to register and run this workflow in, can also be set through envvar " "``FLYTE_DEFAULT_DOMAIN``",
3634
)
@@ -40,7 +38,6 @@
4038
"--project",
4139
required=False,
4240
type=str,
43-
default=os.getenv("FLYTE_DEFAULT_PROJECT", "flytesnacks"),
4441
show_default=True,
4542
help="Project for workflow/launchplan. Can also be set through envvar " "``FLYTE_DEFAULT_PROJECT``",
4643
)
@@ -50,7 +47,6 @@
5047
"--domain",
5148
required=False,
5249
type=str,
53-
default=os.getenv("FLYTE_DEFAULT_DOMAIN", "development"),
5450
show_default=True,
5551
help="Domain for workflow/launchplan, can also be set through envvar " "``FLYTE_DEFAULT_DOMAIN``",
5652
)

flytekit/configuration/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,8 @@ class TaskConfig(object):
669669
Any Project/Domain/Org configuration.
670670
"""
671671

672-
project: Optional[str] = None
673-
domain: Optional[str] = None
672+
project: Optional[str] = "flytesnacks"
673+
domain: Optional[str] = "development"
674674
org: Optional[str] = None
675675

676676
@classmethod

0 commit comments

Comments
 (0)