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/DSL: Fix PipelineVolume name length #2739

Merged
merged 2 commits into from
Dec 18, 2019

Conversation

elikatsis
Copy link
Member

@elikatsis elikatsis commented Dec 16, 2019

Volume name must be no more than 63 characters

Signed-off-by: Ilias Katsakioris elikatsis@arrikto.com


Example of faulty behavior mentioned in kubeflow-kale/kale#30:

This step is in Error state with this message: Pod "rwx-test2-et0i4-tkphz-2706597555" is invalid: [spec.volumes[2].name: Invalid value: "pvolume-ca6c4cec0854efe7746ed49b8661abc2a924aef77f23218ad5c43fc8258b0dfe": must be no more than 63 characters, spec.containers[0].volumeMounts[2].name: Not found: "pvolume-ca6c4cec0854efe7746ed49b8661abc2a924aef77f23218ad5c43fc8258b0dfe", spec.containers[1].volumeMounts[0].name: Not found: "pvolume-ca6c4cec0854efe7746ed49b8661abc2a924aef77f23218ad5c43fc8258b0dfe"]

This change is Reviewable

Volume name must be no more than 63 characters

Signed-off-by: Ilias Katsakioris <elikatsis@arrikto.com>
@elikatsis elikatsis force-pushed the fix-pvolume-name-length branch from d62659b to f3f1c8f Compare December 17, 2019 13:12
@elikatsis
Copy link
Member Author

The errors seem unrelated to the change. I rebased on top of master and we'll see how it goes 🤞

@elikatsis elikatsis force-pushed the fix-pvolume-name-length branch 3 times, most recently from 2ec5305 to f9bf52a Compare December 17, 2019 15:41
Signed-off-by: Ilias Katsakioris <elikatsis@arrikto.com>
@elikatsis elikatsis force-pushed the fix-pvolume-name-length branch from f9bf52a to fd34e47 Compare December 17, 2019 16:27
sort_keys=True),
"utf-8")).hexdigest()
name = "pvolume-{}".format(hash_value)
self.name = name[0:63] if len(name) > 63 else name
Copy link
Contributor

Choose a reason for hiding this comment

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

JFYI: name[0:63] works fine even when length is less than 63 characters.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, didn't know, thanks! Should I change and push it?

@Ark-kun
Copy link
Contributor

Ark-kun commented Dec 17, 2019

/lgtm

@Ark-kun
Copy link
Contributor

Ark-kun commented Dec 18, 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

@k8s-ci-robot k8s-ci-robot merged commit 4624ac8 into kubeflow:master Dec 18, 2019
@elikatsis elikatsis deleted the fix-pvolume-name-length branch January 7, 2020 10:01
Jeffwan pushed a commit to Jeffwan/pipelines that referenced this pull request Dec 9, 2020
* SDK/DSL: Fix PipelineVolume name length

Volume name must be no more than 63 characters

Signed-off-by: Ilias Katsakioris <elikatsis@arrikto.com>

* Change which part of the hash value we make use of

Signed-off-by: Ilias Katsakioris <elikatsis@arrikto.com>
magdalenakuhn17 pushed a commit to magdalenakuhn17/pipelines that referenced this pull request Oct 22, 2023
Signed-off-by: rachitchauhan43 <rachitchauhan43@gmail.com>
Signed-off-by: Dan Sun <dsun20@bloomberg.net>
Co-authored-by: Rachit Chauhan <rachitchauhan43@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants