Repository navigation
fix: improve invalid slice name error - #240
Merged
niemeyer merged 1 commit intoAug 29, 2025
Merged
Conversation
|
letFunny
self-requested a review
August 21, 2025 07:58
letFunny
suggested changes
Aug 21, 2025
letFunny
left a comment
Collaborator
There was a problem hiding this comment.
Hi! Thank you for taking the time to work on this. I agree that we should improve the error messages to some extent to improve the UX. At the same time, writing prose to describe the regular expression might not be ideal, it will always be less precise and too verbose.
Let's see if we can create a message that is short and simple.
gajeshbhat
force-pushed
the
fix-slice-name-error-message-158
branch
from
August 23, 2025 08:54
ac9f29a to
62e6572
Compare
- Add improved error message - Add unit test to verify the improved error message Fixes #158
gajeshbhat
force-pushed
the
fix-slice-name-error-message-158
branch
from
August 27, 2025 19:25
62e6572 to
b3d87b3
Compare
letFunny
approved these changes
Aug 28, 2025
letFunny
left a comment
Collaborator
There was a problem hiding this comment.
Thank you for looking into improving the UX @gajeshbhat! LGTM
Contributor
Author
Thank you for the review @niemeyer . Appreciate you taking the time. |
niemeyer
approved these changes
Aug 29, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR improves the error message for invalid slice names to provide clearer guidance to users about the validation requirements, as requested in #158.
Changes
internal/setup/yaml.goto clarify that slice names must be at least 3 characters longBefore
error: invalid slice name cc in
slices/base-distroless.yamlAfter
error: invalid slice name cc in
slices/base-distroless.yaml(slice names must be at least 3 characters long, start with a lowercase letter, and contain only lowercase letters, digits, and hyphens)Testing
Fixes #158