Skip to content

Commit

Permalink
test: Fixed kfp-runtime-tests to run on master branch (#11158)
Browse files Browse the repository at this point in the history
Signed-off-by: hbelmiro <helber.belmiro@gmail.com>
Signed-off-by: KevinGrantLee <kglee@google.com>
  • Loading branch information
hbelmiro authored and KevinGrantLee committed Sep 17, 2024
1 parent 2e7261d commit 17b55a3
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions sdk/runtime_tests/execute_commands_args_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ class RuntimeTestConfig:
)
]

PULL_NUMBER = None


def run_commands_and_args(
config: RuntimeTestConfig,
Expand All @@ -116,16 +114,8 @@ def run_commands_and_args(
# so much that it renders the test less valuable, since the
# commands/args resemble the true runtime commands/args less well
# prefer the less invasive approach of installing from a PR
global PULL_NUMBER
if PULL_NUMBER is None:
if 'PULL_NUMBER' in os.environ:
PULL_NUMBER = os.environ['PULL_NUMBER']
else:
PULL_NUMBER = input(
"Please provide the PR number for the kubeflow/pipelines PR that contains the changes you'd like to test:"
)

kfp_package_path = f'git+https://github.com/kubeflow/pipelines.git@refs/pull/{PULL_NUMBER}/merge#subdirectory=sdk/python'

kfp_package_path = 'sdk/python'
command_and_args = [
re.sub(r"'kfp==(\d+).(\d+).(\d+)(-[a-z]+.\d+)?'", kfp_package_path,
cmd) for cmd in command_and_args
Expand Down

0 comments on commit 17b55a3

Please sign in to comment.