Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WebToolsE2E][Aspire][GB18030] An error occurs when deploying an Aspire project that uses Chinese characters as the project name. #4360

Open
v-reinawang opened this issue Sep 20, 2024 · 6 comments
Labels
aspire bug Something isn't working customer-reported identify a customer issue question
Milestone

Comments

@v-reinawang
Copy link

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install SDK 8.0.401
  3. Install Aspire 8.2.0
  4. Install azd[1.10.1] and git[2.46.1]

REPRO STEPS

  1. Open CMD, create an Aspire Starter App using following commands:
    dotnet new aspire-starter -o Aspire应用1
    I will encounter #5782, this issue does not affect running the project
  2. Use the following commands to build and run the project, can run successfully without any error
    cd Aspire应用1/Aspire应用1.AppHost
    dotnet build
    dotnet run
    
  3. Runing 'azd init', select 'Use code in the current directory' > Confirm and continue initializing my app > select frontend as deployment service > type a new environment name, press enter
  4. Running 'azd up'

ACTUAL
Failed to deploy the project using azd up.
image

Deploying services (azd deploy)

(x) Failed: Deploying service apiservice

ERROR: error executing step command 'deploy --all': failed deploying service 'apiservice': updating container app service: polling for container app update completion: GET https://management.azure.com/subscriptions/07268dd7-4c50-434b-b1ff-67b8164edb41/providers/Microsoft.App/locations/eastus2/containerappOperationStatuses/fb895b23-1d1c-42cf-b842-5a0e90d15fc3

RESPONSE 200: 200 OK
ERROR CODE: ContainerAppOperationError
{

"id": "/subscriptions/07268dd7-4c50-434b-b1ff-67b8164edb41/providers/Microsoft.App/locations/eastus2/containerappOperationStatuses/7f914c6f-824a-45e0-ab73-bf6db5e1c7ed",
"name": "7f914c6f-824a-45e0-ab73-bf6db5e1c7ed",
"status": "Failed",
"error": {
"code": "ContainerAppOperationError",
"message": "Failed to provision revision for container app 'apiservice'. Error details: The following field(s) are either invalid or missing. Field 'template.containers.apiservice.image' is invalid with details: 'Invalid value: "acr7f2zartj34zpu.azurecr.io/aspire应用1/apiservice-aspire20:azd-deploy-1726820428": could not parse reference: acr7f2zartj34zpu.azurecr.io/aspire应用1/apiservice-aspire20:azd-deploy-1726820428';.."
},
"startTime": "2024-09-20T08:20:37.3781706"
}

EXPECTED:
Can be published successfully.

@rajeshkamal5050 rajeshkamal5050 added bug Something isn't working aspire labels Oct 10, 2024
@rajeshkamal5050
Copy link
Contributor

@vhvb1989 @weikanglim @wbreza is it an ACA service issue failing to parse value with Chinese characters?

@rajeshkamal5050 rajeshkamal5050 added this to the On Deck milestone Oct 10, 2024
@weikanglim
Copy link
Contributor

Most Azure names don't allow non-ASCII characters.

@vhvb1989
Copy link
Member

@weikanglim , can we extend the names package -> LabelName() to handle non-ASCII chars and replace it with something else? or is it already doing it (and this issue is maybe fixed?)

@vhvb1989
Copy link
Member

Just try it and we do not handle non-ASCII when handling the name

Image

Extending the LabelName() should fix this for any azd ACA project (not only Aspire)

@weikanglim
Copy link
Contributor

LabelName works on my end: Aspire应用1 -> aspire1

@weikanglim
Copy link
Contributor

but this can also open up a whole can of worms. I really do feel that long term we need to have a prompt with the default name listed, and have the user confirm it. Then we would also perform naming validation.

I have some ideas of how we can unify and streamline in-code schema validation with our JSONSchema spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aspire bug Something isn't working customer-reported identify a customer issue question
Projects
None yet
Development

No branches or pull requests

4 participants