-
Notifications
You must be signed in to change notification settings - Fork 459
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] improve PVC creation name error #2496
Merged
google-oss-prow
merged 8 commits into
kubeflow:master
from
mahdikhashan:improve-pvc-error-message
Jan 28, 2025
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ff3de2b
improve pvc name error message by failing early and clear message wit…
mahdikhashan eea6de6
fix lint
mahdikhashan 33028c1
fix lint
mahdikhashan 516b4b5
raise value error for wrong name format by reconciliation
mahdikhashan 651b231
revert created utils
mahdikhashan 86a1841
improve test case name
mahdikhashan d6c7319
improve value error message
mahdikhashan 7a03bce
improve code flow
mahdikhashan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking we should move this check after this line since the error belongs to that scenario:
katib/sdk/python/v1beta1/kubeflow/katib/api/katib_client.py
Line 582 in 40e1e65
Additionally, to make the error easier to understand, we could tweak the error message a bit. How about this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the ValueError message (with a bit of change), with combining it with else, not really - since then we need to wait for this steps first:
so my idea is the function fails fast when the name is invalid then if its valid, continues with the check for the existence of the name. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense.