vscode-azurestaticwebapps icon indicating copy to clipboard operation
vscode-azurestaticwebapps copied to clipboard

[Codespaces] No error message pops up when entering the uppercase of the existing function name

Open v-mengwe opened this issue 4 years ago • 4 comments

Environment: Remote Codespaces Build Version: 20210622.6

Repro Steps:

  1. Click "Create HTTP Function..." button -> Create a HTTP Function with name "HttpTrigger1".
  2. Click "Create HTTP Function..." button -> Create a HTTP Function with name "HTTPTrigger1".
  3. Check whether pop up an error message.

Expect: Pop up an error message, like below: image

Actual: No error message pops up and create the function "HTTPTrigger1" successfully. image image

More Info: Vice versa, there is no uppercase/lowercase character validation when entering a function name on Remote codespaces.

v-mengwe avatar Jun 23 '21 10:06 v-mengwe

Both the Portal and Codespaces (Linux) seem to be case-sensitive, but when you actually hit the HTTP triggers...

image

image

image

It's not case-sensitive at all. I think this might actually be a bug on the platform as well.

@anthonychu

nturinski avatar Jun 28 '21 17:06 nturinski

I think this is a functions issue when developing on a case sensitive FS and deploying to a case sensitive FS. Probably an edge case we haven't tested for before. What's likely happening is that the functions host is loading the 2 as separate functions, but behind the scenes it's using ASP.NET and its routing is case-insensitive by default, so one route is hiding the other at runtime.

Not sure the best place to fix this, perhaps we should fix them in tooling:

  • vscode-azurefunctions should not allow the creation of the function of the same name but different case
  • check that func behaves properly. My guess is that it would need to be fixed as well.

We could look into updating the Functions host to use case sensitive routing or fail at startup when this is detected, but both are breaking changes.

My suggestion is to repro this with just Functions on Linux and filing issues in the appropriate tooling repos.

anthonychu avatar Jul 20 '21 05:07 anthonychu

Can't produce on WSL anymore, but can on Codespaces. ~~I think using the AzExtFsExtra in Functions can resolve this~~ It does not.

nturinski avatar Aug 26 '21 22:08 nturinski

This issue has become stale and is at risk of being closed. The community has 60 days to upvote the issue. If it receives 5 upvotes we will keep it open and take another look. If not, we will close it. To learn more about how we handle issues, please see our documentation.

Happy Coding!

AzCode-Bot avatar Feb 23 '22 03:02 AzCode-Bot