Skip to content

Commit

Permalink
Fixing failing SDK test
Browse files Browse the repository at this point in the history
Signed-off-by: ddalvi <[email protected]>
  • Loading branch information
DharmitD committed Oct 11, 2024
1 parent 753a2f1 commit c4653bd
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions sdk/python/kfp/cli/component_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,27 +579,28 @@ def test_existing_dockerfile_can_be_overwritten(self):
COPY . .
'''))

@unittest.skip(
"Skipping this test as it's failing. Refer to https://github.com/kubeflow/pipelines/issues/11038"
)
def test_dockerfile_can_contain_custom_kfp_package(self):
component = _make_component(
func_name='train', target_image='custom-image')
_write_components('components.py', component)
package_dir = os.path.dirname(os.path.dirname(self.current_dir))

# suppresses large stdout from subprocess that builds kfp package
with mock.patch.object(
subprocess,
'run',
new=functools.partial(subprocess.run, capture_output=True)):
result = self.runner.invoke(
self.cli,
[
'build',
str(self._working_dir), f'--kfp-package-path={package_dir}'
],
)
try:
subprocess.run(
['python3', 'setup.py', 'bdist_wheel'],
cwd=package_dir,
check=True, capture_output=True)
except subprocess.CalledProcessError as e:
print(f"Failed to build KFP package: {e.stderr.decode()}")
raise

result = self.runner.invoke(
self.cli,
[
'build',
str(self._working_dir), f'--kfp-package-path={package_dir}'
],
)
self.assertEqual(result.exit_code, 0)
self._docker_client.api.build.assert_called_once()
self.assert_file_exists('Dockerfile')
Expand Down

0 comments on commit c4653bd

Please sign in to comment.