From 72da0d08a7a3d65b6476fe671bf9b3c55ba496b5 Mon Sep 17 00:00:00 2001 From: Yee Hing Tong Date: Fri, 2 Aug 2024 05:47:28 -0700 Subject: [PATCH] Don't call remote when --help in remote-X (#2642) * don't call remote Signed-off-by: Yee Hing Tong * nit Signed-off-by: Yee Hing Tong --------- Signed-off-by: Yee Hing Tong --- flytekit/clis/sdk_in_container/run.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flytekit/clis/sdk_in_container/run.py b/flytekit/clis/sdk_in_container/run.py index 122a739265..9919d857d3 100644 --- a/flytekit/clis/sdk_in_container/run.py +++ b/flytekit/clis/sdk_in_container/run.py @@ -4,6 +4,7 @@ import json import os import pathlib +import sys import tempfile import typing from dataclasses import dataclass, field, fields @@ -741,6 +742,8 @@ def _get_entities(self, r: FlyteRemote, project: str, domain: str, limit: int) - return [] def list_commands(self, ctx): + if "--help" in sys.argv: + return [] if self._entities or ctx.obj is None: return self._entities