DO NOT MERGE: tests: add some questionable but valid platform names - #117
Open
lengau wants to merge 1 commit into
Open
DO NOT MERGE: tests: add some questionable but valid platform names#117lengau wants to merge 1 commit into
lengau wants to merge 1 commit into
Conversation
lengau
force-pushed
the
work/valid-platform-names
branch
from
March 31, 2025 21:44
1c5e938 to
f02ffee
Compare
mr-cal
reviewed
Apr 1, 2025
Contributor
There was a problem hiding this comment.
Some thoughts:
- Platform names are used for the container name. Craft-providers sanitizes platform names before creating a container, so this isn't a concern.
- Platform names are used in the resulting artifact. So it may be prudent to only allow characters allowed in file paths. We could add a few extra characters and replace them. I think we are already doing this with
@or:symbols in Charmcraft. - For usability, we could set a maximum limit. The artifact filename should be less than 255 characters (a common max), so this could drive the maximum limit.
- We could set a reasonable ruleset. Unless there is a real need to support the platform names in this PR, I'd be fine for something along the lines of:
Can contain alphanumerics,
:,@,-and_, must start and end with an alphanumeric, max length is 64 characters.
Contributor
Author
There was a problem hiding this comment.
I want 🇿🇦 to be a valid platform name.
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.
make lint && make test?This is for discussion about what, if any, limits we want to provide for platform names.