twilio-professional-services / flex-project-template

A starting point for Twilio Flex projects, providing management strategies for various types of artifacts and distributed development
https://twilio-professional-services.github.io/flex-project-template/
Apache License 2.0
64 stars 71 forks source link

Make special characters in environment name work #542

Closed dremin closed 5 months ago

dremin commented 6 months ago

Summary

Now any character that GitHub supports in the environment name can be used, except for slashes. Also enhanced the validation script to check for bad characters (slashes) before attempting deployment.

Didn't modify the documentation as I don't think we should necessarily promote the usage of special characters.

Checklist

dremin commented 5 months ago

@dremin The code changes look good. Is there any concern about OS specific differences for handling of files with special characters? Was this tested on Mac OS only, or also on Windows?

This was tested on Linux and macOS only, which only restrict the / character. Windows has a much longer list of restricted characters: " * / : < > ? \ |. Do you think that we should restrict these for everyone? Restricting them only for Windows users wouldn't really work out since CI, which performs the validation, runs in Linux.

trogers-twilio commented 5 months ago

This was tested on Linux and macOS only, which only restrict the / character. Windows has a much longer list of restricted characters: " * / : < > ? \ |. Do you think that we should restrict these for everyone? Restricting them only for Windows users wouldn't really work out since CI, which performs the validation, runs in Linux.

I'm thinking we should be OK. A developer using Windows will be restricted by the OS anyway from creating an environment file with any of these restricted characters, so our script shouldn't need to account for it. Does that sound correct to you as well?

dremin commented 5 months ago

@dremin The code changes look good. Is there any concern about OS specific differences for handling of files with special characters? Was this tested on Mac OS only, or also on Windows?

This was tested on Linux and macOS only, which only restrict the / character. Windows has a much longer list of restricted characters: " * / : < > ? \ |. Do you think that we should restrict these for everyone? Restricting them only for Windows users wouldn't really work out since CI, which performs the validation, runs in Linux.

This was tested on Linux and macOS only, which only restrict the / character. Windows has a much longer list of restricted characters: " * / : < > ? \ |. Do you think that we should restrict these for everyone? Restricting them only for Windows users wouldn't really work out since CI, which performs the validation, runs in Linux.

I'm thinking we should be OK. A developer using Windows will be restricted by the OS anyway from creating an environment file with any of these restricted characters, so our script shouldn't need to account for it. Does that sound correct to you as well?

That's correct!