Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sdk): sanitize op name. Fix #6433 #6600

Merged
merged 3 commits into from
Sep 28, 2021

Conversation

lynnmatrix
Copy link
Member

@lynnmatrix lynnmatrix commented Sep 23, 2021

Description of your changes:
Fix #6433
Fix #6576

Fix the error that kfp v1 compiler failed to provide unique name for ops of the same component.

Checklist:

Copy link
Member

@chensun chensun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/assign @ji-yaqi is also looking into the issue, she can follow up on the review or alternative changes. Thanks!

sdk/python/kfp/dsl/_pipeline.py Show resolved Hide resolved
@ji-yaqi
Copy link
Contributor

ji-yaqi commented Sep 27, 2021

Hi @lynnmatrix, thanks for your PR!

For sanitizing, it might be more than replacing spaces with dashes etc. Could you use the sanitize_k8s_name function to sanitize self._component_spec_inputs_with_pipeline_params?

@chensun
Copy link
Member

chensun commented Sep 28, 2021

Hi @lynnmatrix, thanks for your PR!

For sanitizing, it might be more than replacing spaces with dashes etc. Could you use the sanitize_k8s_name function to sanitize self._component_spec_inputs_with_pipeline_params?

I agree this would be the ideal change. That said, it also feels silly that we know that op.name needs to be sanitized, yet still put a space in it. So I think the current change also makes sense.

Given the bug is pretty bad, and the sanitizing everywhere would likely require some more time to fix a dozen places. Maybe we can go with this change first so it would catch the release train this week, and we can do the proposed change as part of #5831.

@lynnmatrix can you please add a release note for this change?

@lynnmatrix
Copy link
Member Author

Sure, @chensun.
@ji-yaqi, I feel only sanitizing self._component_spec_inputs_with_pipeline_params is neither the ideal change, maybe we should do sanitizing as soon as possible, or make sure the name is sanitized in the constructor of PipelineParam.

Hi @lynnmatrix, thanks for your PR!
For sanitizing, it might be more than replacing spaces with dashes etc. Could you use the sanitize_k8s_name function to sanitize self._component_spec_inputs_with_pipeline_params?

I agree this would be the ideal change. That said, it also feels silly that we know that op.name needs to be sanitized, yet still put a space in it. So I think the current change also makes sense.

Given the bug is pretty bad, and the sanitizing everywhere would likely require some more time to fix a dozen places. Maybe we can go with this change first so it would catch the release train this week, and we can do the proposed change as part of #5831.

@lynnmatrix can you please add a release note for this change?

@ji-yaqi
Copy link
Contributor

ji-yaqi commented Sep 28, 2021

/retest

@ji-yaqi
Copy link
Contributor

ji-yaqi commented Sep 28, 2021

/lgtm
/approve
Thanks @lynnmatrix

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ji-yaqi

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

The pull request process is described 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-robot google-oss-robot merged commit 4e89973 into kubeflow:master Sep 28, 2021
@@ -18,7 +18,7 @@
* Support re-use of PVC with VolumeOp. [\#6582](https://github.com/kubeflow/pipelines/pull/6582)
* When namespace file is missing, remove stack trace so it doesn't look like an error [\#6590](https://github.com/kubeflow/pipelines/pull/6590)
* Local runner supports additional docker options. [\#6599](https://github.com/kubeflow/pipelines/pull/6599)

* Fix the error that kfp v1 compiler failed to provide unique name for ops of the same component. [\#6600](https://github.com/kubeflow/pipelines/pull/6600)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually affected both v1 and v2 compiler.
@ji-yaqi can you please fix this description when you do the release? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants