fn icon indicating copy to clipboard operation
fn copied to clipboard

Allow for upper case letters in app and fn names

Open threejeez opened this issue 5 years ago • 3 comments

Description fnserver currently does not allow upper case letters in app and fn names. While this isn't really a problem for developers, it isn't the friendliest visually and isn't easy to read for folks who aren't developers. As an example, our use case of fn is an open system where anyone calls anything. This requires us to have search, listing and filtering functionality with good readability so users of our system know how to look for things and find it easy to grok what they find once the run a search.

Steps to reproduce the issue:

  1. Try creating a function with an upper case letter

Describe the results you received: The fn cli fails

Describe the results you expected: I'd expect fnserver to allow for the set of characters normal functions allow for.

threejeez avatar Apr 03 '19 01:04 threejeez

I think the underlying reason for this is because docker image names cannot contain upper-case characters.

I wonder if a possible work around for this is to make it case insensitive i.e. convert anything the users send to lower case behind the scenes

vzDevelopment avatar Apr 04 '19 09:04 vzDevelopment

Indeed, image name/tag is what concerns all of us.

denismakogon avatar Apr 04 '19 09:04 denismakogon

yep, discussed this the other day. a possible path forward here is allowing upper case chars in the name, and in deploy create the image name from the function name after lower casing it. the only nitty bugs I can think of is if a user has a function named bar and a function named Bar then when they go to deploy a function as user foo they'll end up with foo/bar for either one, and if the func.yaml are at different versions then it can inadvertently make the versions hop around in a not contiguous fashion while pointing to the same base image, which wouldn't be a great ux. kind of a 'have to assume the user is dumb' thing but anyway, throwing it out there. I'm not sure it's a deal breaker, either, this is basically already the case for directories that are named in the aforementioned fashion (which translates to the name).

rdallman avatar Apr 04 '19 21:04 rdallman