Skip to content

Commit f455c53

Browse files
committed
Ignore empty PULL_NUMBER environment variables in SDK tests (kubeflow#11714)
On pushes to the master branch, PULL_NUMBER was an empty string. Signed-off-by: mprahl <[email protected]> (cherry picked from commit a7ec34f)
1 parent 4f466b3 commit f455c53

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/kfp-kubernetes-execution-tests/sdk_execution_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def run(test_case: TestCase) -> Tuple[str, client.client.RunPipelineResult]:
111111

112112
def get_kfp_package_path() -> str:
113113
repo_name = os.environ.get('REPO_NAME', 'kubeflow/pipelines')
114-
if os.environ.get('PULL_NUMBER') is not None:
114+
if os.environ.get('PULL_NUMBER'):
115115
path = f'git+https://github.com/{repo_name}.git@refs/pull/{os.environ["PULL_NUMBER"]}/merge#subdirectory=sdk/python'
116116
else:
117117
path = f'git+https://github.com/{repo_name}.git@master#subdirectory=sdk/python'

test/sdk-execution-tests/sdk_execution_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def run(test_case: TestCase) -> Tuple[str, client.client.RunPipelineResult]:
100100

101101
def get_kfp_package_path() -> str:
102102
repo_name = os.environ.get('REPO_NAME', 'kubeflow/pipelines')
103-
if os.environ.get('PULL_NUMBER') is not None:
103+
if os.environ.get('PULL_NUMBER'):
104104
path = f'git+https://github.com/{repo_name}.git@refs/pull/{os.environ["PULL_NUMBER"]}/merge#subdirectory=sdk/python'
105105
else:
106106
path = f'git+https://github.com/{repo_name}.git@master#subdirectory=sdk/python'

0 commit comments

Comments
 (0)