Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add default project domain in execute launch plan #1894

Merged
merged 3 commits into from
Oct 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions flytekit/remote/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,7 @@
version=version,
project=project,
domain=domain,
name=name,
execution_name=execution_name,
execution_name_prefix=execution_name_prefix,
options=options,
Expand Down Expand Up @@ -1426,7 +1427,6 @@
"""
resolved_identifiers = self._resolve_identifier_kwargs(entity, project, domain, name, version)
resolved_identifiers_dict = asdict(resolved_identifiers)

ss = SerializationSettings(
image_config=image_config,
project=resolved_identifiers.project,
Expand Down Expand Up @@ -1480,6 +1480,7 @@
version: str,
project: typing.Optional[str] = None,
domain: typing.Optional[str] = None,
name: typing.Optional[str] = None,
execution_name: typing.Optional[str] = None,
execution_name_prefix: typing.Optional[str] = None,
options: typing.Optional[Options] = None,
Expand All @@ -1496,6 +1497,7 @@
:param version: The version to look up/register the launch plan (if not already exists)
:param project: The same as version, but will default to the Remote object's project
:param domain: The same as version, but will default to the Remote object's domain
:param name: The same as version, but will default to the entity's name
:param execution_name: If specified, will be used as the execution name instead of randomly generating.
:param options: Options to be passed into the execution.
:param wait: If True, will wait for the execution to complete before returning.
Expand All @@ -1505,13 +1507,12 @@
:param cluster_pool: Specify cluster pool on which newly created execution should be placed.
:return: FlyteWorkflowExecution object
"""
resolved_identifiers = self._resolve_identifier_kwargs(entity, project, domain, name, version)
resolved_identifiers_dict = asdict(resolved_identifiers)
troychiu marked this conversation as resolved.
Show resolved Hide resolved
project = resolved_identifiers.project
domain = resolved_identifiers.domain

Check warning on line 1513 in flytekit/remote/remote.py

View check run for this annotation

Codecov / codecov/patch

flytekit/remote/remote.py#L1510-L1513

Added lines #L1510 - L1513 were not covered by tests
try:
flyte_launchplan: FlyteLaunchPlan = self.fetch_launch_plan(
project=project,
domain=domain,
name=entity.name,
version=version,
)
flyte_launchplan: FlyteLaunchPlan = self.fetch_launch_plan(**resolved_identifiers_dict)

Check warning on line 1515 in flytekit/remote/remote.py

View check run for this annotation

Codecov / codecov/patch

flytekit/remote/remote.py#L1515

Added line #L1515 was not covered by tests
except FlyteEntityNotExistException:
flyte_launchplan: FlyteLaunchPlan = self.register_launch_plan(
entity,
Expand Down
Loading