pipelines icon indicating copy to clipboard operation
pipelines copied to clipboard

fix(sdk): Fixed missing export that's used in some code paths

Open Ark-kun opened this issue 1 year ago • 15 comments

The export is used in create_graph_component_from_pipeline_func

Description of your changes:

Checklist:

Ark-kun avatar Aug 30 '22 22:08 Ark-kun

/assign @connor-mccarthy

Ark-kun avatar Aug 31 '22 21:08 Ark-kun

Thanks, @Ark-kun. Where is MetadataSpec used by pipeline authors? I'm not familiar with this v1 object.

connor-mccarthy avatar Aug 31 '22 21:08 connor-mccarthy

Thanks, @Ark-kun. Where is MetadataSpec used by pipeline authors? I'm not familiar with this v1 object.

MetadataSpec is a structure that is similar to Kubernetes' metadata structure (not related to MLMD) - it contains component labels and annotations (not Python function parameter annotations). It's directly used in create_graph_component_from_pipeline_func (when specifying annotations), so the method fails (create_graph_component_from_pipeline_func(pipeline_func, annotations={...})).

This is a simple case of forgetting to export a structure.

In _python_op.py we've used from . import _structures as structures import code, and the structures.MetadataSpec code worked. https://github.com/kubeflow/pipelines/blob/c11c2beef9984df6f4020a88e4b18e73b3a16b7d/sdk/python/kfp/components/_python_op.py#L937 In _python_to_graph_component.py we've used from . import structures import code, and the same structures.MetadataSpec code fails since MetadataSpec is not properly exported. https://github.com/kubeflow/pipelines/blob/c11c2beef9984df6f4020a88e4b18e73b3a16b7d/sdk/python/kfp/components/_python_to_graph_component.py#L79

Ark-kun avatar Aug 31 '22 23:08 Ark-kun

/retest

Ark-kun avatar Aug 31 '22 23:08 Ark-kun

@Ark-kun I think you want to merge into sdk/release-1.8 instead. That's where we release sdk 1.8.* versions.

chensun avatar Sep 01 '22 00:09 chensun

/retest

connor-mccarthy avatar Sep 01 '22 22:09 connor-mccarthy

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign chensun for approval by writing /assign @chensun in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

google-oss-prow[bot] avatar Sep 02 '22 08:09 google-oss-prow[bot]

/retest

Ark-kun avatar Sep 02 '22 08:09 Ark-kun

@Ark-kun I think you want to merge into sdk/release-1.8 instead. That's where we release sdk 1.8.* versions.

Thank you. I did not know that. I've changed the base branch.

Ark-kun avatar Sep 02 '22 08:09 Ark-kun

/test kubeflow-pipelines-samples-v2

Ark-kun avatar Sep 02 '22 08:09 Ark-kun

@Ark-kun: The specified target(s) for /test were not found. The following commands are available to trigger required jobs:

  • /test kubeflow-pipeline-backend-test
  • /test kubeflow-pipeline-e2e-test
  • /test kubeflow-pipeline-frontend-test
  • /test kubeflow-pipeline-mkp-snapshot-test
  • /test kubeflow-pipeline-mkp-test
  • /test kubeflow-pipeline-upgrade-test
  • /test kubeflow-pipelines-backend-visualization
  • /test kubeflow-pipelines-component-yaml
  • /test kubeflow-pipelines-components-gcp-python37
  • /test kubeflow-pipelines-components-google-cloud-python38
  • /test kubeflow-pipelines-integration-v2
  • /test kubeflow-pipelines-manifests
  • /test kubeflow-pipelines-sdk-python37
  • /test kubeflow-pipelines-sdk-python38
  • /test kubeflow-pipelines-sdk-python39
  • /test kubeflow-pipelines-tfx-python37

The following commands are available to trigger optional jobs:

  • /test kubeflow-pipelines-sdk-python310

Use /test all to run the following jobs that were automatically triggered:

  • kubeflow-pipelines-sdk-python310
  • kubeflow-pipelines-sdk-python37
  • kubeflow-pipelines-sdk-python38
  • kubeflow-pipelines-sdk-python39
  • kubeflow-pipelines-tfx-python37

In response to this:

/test kubeflow-pipelines-samples-v2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

google-oss-prow[bot] avatar Sep 02 '22 08:09 google-oss-prow[bot]

/retest

Ark-kun avatar Sep 07 '22 19:09 Ark-kun

@Ark-kun: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
kubeflow-pipelines-integration-v2 fd8ff8cc916a3a0196389f76a6b0f4b642089298 link true /test kubeflow-pipelines-integration-v2
kubeflow-pipeline-mkp-snapshot-test fd8ff8cc916a3a0196389f76a6b0f4b642089298 link true /test kubeflow-pipeline-mkp-snapshot-test
kubeflow-pipelines-components-google-cloud-python38 fd8ff8cc916a3a0196389f76a6b0f4b642089298 link true /test kubeflow-pipelines-components-google-cloud-python38
kubeflow-pipelines-backend-visualization fd8ff8cc916a3a0196389f76a6b0f4b642089298 link true /test kubeflow-pipelines-backend-visualization
kubeflow-pipeline-mkp-test fd8ff8cc916a3a0196389f76a6b0f4b642089298 link true /test kubeflow-pipeline-mkp-test
kubeflow-pipelines-samples-v2 9eed64219e0b1475d55be7b34ba2bd2b66dd464d link true /test kubeflow-pipelines-samples-v2
kubeflow-pipeline-e2e-test 9eed64219e0b1475d55be7b34ba2bd2b66dd464d link true /test kubeflow-pipeline-e2e-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

google-oss-prow[bot] avatar Sep 07 '22 19:09 google-oss-prow[bot]

@chensun The failures seem to be unrelated to the change.

Ark-kun avatar Sep 07 '22 21:09 Ark-kun

@Ark-kun, can you re-issue this as a new PR against sdk/release-1.8? I suspect some of the tests are being executed and failing because of the incorrect initial base branch against which this PR was issued -- prow has issues with this sort of thing.

connor-mccarthy avatar Sep 08 '22 15:09 connor-mccarthy