Skip to content

Commit

Permalink
make 'host' argument required
Browse files Browse the repository at this point in the history
Signed-off-by: Samhita Alla <[email protected]>
  • Loading branch information
samhita-alla committed Jun 28, 2022
1 parent 3167fba commit a30d2f2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flyte_provider/hooks/flyte.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ def __init__(
if not (self.project and self.domain):
raise AirflowException("Please provide a project and domain.")

if not self.flyte_conn.host:
raise AirflowException("Please provide a host.")

def execution_id(self, execution_name: str) -> WorkflowExecutionIdentifier:
"""Get the execution id."""
return WorkflowExecutionIdentifier(self.project, self.domain, execution_name)
Expand All @@ -72,7 +75,7 @@ def create_flyte_remote(self) -> FlyteRemote:
platform=PlatformConfig(
endpoint=":".join([self.flyte_conn.host, str(self.flyte_conn.port)])
if (self.flyte_conn.host and self.flyte_conn.port)
else (self.flyte_conn.host or PlatformConfig.endpoint),
else (self.flyte_conn.host),
insecure=self.flyte_conn.extra_dejson.get(
"insecure", PlatformConfig.insecure
),
Expand Down

0 comments on commit a30d2f2

Please sign in to comment.