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

[SDK] Relax k8s sanitization #2634

Merged
merged 8 commits into from
Nov 26, 2019
Merged

Conversation

numerology
Copy link

@numerology numerology commented Nov 20, 2019

Let k8s sanitization allows capital letters and under score in the names of parameters/outputs. This change will allow users to refer to self-defined attributes of a complex structure in a more Pythonic way.

One implication of this change would be, we have to delegate to users the responsibility of ensuring the argo naming convention when they create any k8s object within the pipeline. For example, in the volume ops example, a user should specify name='create-pvc' instead of name='create_pvc' to comply with argo naming convention.

Fixes #2570
Fixes #2629


This change is Reviewable

@numerology
Copy link
Author

/assign @Ark-kun
/assign @hongye-sun

@numerology
Copy link
Author

/hold need fine-grained control over sanitization

@numerology
Copy link
Author

/retest

@numerology
Copy link
Author

/test kubeflow-pipeline-sample-test

@numerology
Copy link
Author

/hold cancel
Seems to be okay for now.

@@ -42,7 +53,7 @@ def match_serialized_pipelineparam(payload: str):
for match in matches:
pattern = '{{pipelineparam:op=%s;name=%s}}' % (match[0], match[1])
param_tuples.append(PipelineParamTuple(
name=sanitize_k8s_name(match[1]),
name=sanitize_k8s_name(match[1], True),
op=sanitize_k8s_name(match[0]),
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure this is a proper place for sanitization. The names should probably be converted in the compiler:

param_tuples = dsl.match_serialized_pipelineparam(obj)

Copy link
Author

Choose a reason for hiding this comment

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

Agreed. I was curious why there are two sanitize functions as well.

@Ark-kun
Copy link
Contributor

Ark-kun commented Nov 22, 2019

/lgtm

@Ark-kun
Copy link
Contributor

Ark-kun commented Nov 25, 2019

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Ark-kun

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

@numerology
Copy link
Author

It seems like @k8s-ci-robot forgot this one.

@IronPan IronPan merged commit 790fe99 into kubeflow:master Nov 26, 2019
@numerology numerology deleted the fix-par-loop branch December 3, 2019 22:35
magdalenakuhn17 pushed a commit to magdalenakuhn17/pipelines that referenced this pull request Oct 22, 2023
* Use kubectl -k instead of kustomize

Signed-off-by: Dan Sun <dsun20@bloomberg.net>

* Pin fastapi to 0.88.0

Signed-off-by: Dan Sun <dsun20@bloomberg.net>

* Update make deploy-ci

Signed-off-by: Dan Sun <dsun20@bloomberg.net>

* Update make deploy-ci

Signed-off-by: Dan Sun <dsun20@bloomberg.net>

Signed-off-by: Dan Sun <dsun20@bloomberg.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants