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

On Windows, it adds C:/Program Files/Git' and then it's an invalid Container App Environment resource ID to create my Spring App on ACA (consumption plan) #6494

Closed
SandraAhlgrimm opened this issue Jul 10, 2023 · 10 comments
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-author-feedback More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. Service Attention This issue is responsible by Azure service team. Spring Cloud Spring Cloud related issues

Comments

@SandraAhlgrimm
Copy link
Member

Describe the bug

$ az spring create --name ${AZURE_SPRING_APPS_INSTANCE} --managed-environment ${MANAGED_ENV_RESOURCE_ID} --sku standardGen2
--managed-environment C:/Program Files/Git/subscriptions/111111117/resourceGroups/mySpringApp/providers/Microsoft.App/managedEnvironments/mySpringAppDev is not a valid Container App Environment resource ID

$ echo ${MANAGED_ENV_RESOURCE_ID} /subscriptions/111111117/resourceGroups/mySpringApp/providers/Microsoft.App/managedEnvironments/mySpringAppDev

Related command

az spring create

Errors

--managed-environment C:/Program Files/Git/subscriptions/111111117/resourceGroups/mySpringApp/providers/Microsoft.App/managedEnvironments/mySpringAppDev is not a valid Container App Environment resource ID

Issue script & Debug output

$ az spring create --name ${AZURE_SPRING_APPS_INSTANCE} --managed-environment ${MANAGED_ENV_RESOURCE_ID} --sku standardGen2 --debug
cli.knack.cli: Command arguments: ['spring', 'create', '--name', 'mySpringAppInstance', '--managed-environment', 'C:/Program Files/Git/subscriptions/11111117/resourceGroups/mySpringApp/providers/Microsoft.App/managedEnvironments/mySpringAppDev', '--sku', 'standardGen2', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
Enable VT mode.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x01E6B460>, <function OutputProducer.on_global_arguments at 0x01F39BF8>, <function CLIQuery.on_global_arguments at 0x01F58850>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'spring': ['azure.cli.command_modules.serviceconnector', 'azext_spring']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: serviceconnector 0.549 16 235
cli.azure.cli.core: Total (1) 0.549 16 235
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: spring 0.473 39 180 C:\Users\My Name.azure\cliextensions\spring
cli.azure.cli.core: Total (1) 0.473 39 180
cli.azure.cli.core: Loaded 54 groups, 415 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : spring create
cli.azure.cli.core: Command table: spring create
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x042261D8>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\My Name.azure\commands\2023-07-10.11-53-04.spring_create.38840.log'.
az_command_data_logger: command args: spring create --name {} --managed-environment {} --sku {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x04251730>]
cli.knack.commands: Configured default 'mySpringApp' for arg resource_group
cli.knack.commands: Configured default 'westeurope' for arg location
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x0426D6A0>, <function register_cache_arguments..add_cache_arguments at 0x0426D898>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x01F39C40>, <function CLIQuery.handle_query_parameter at 0x01F58898>, <function register_ids_argument..parse_ids_arguments at 0x0426D850>]
az_command_data_logger: extension name: spring
az_command_data_logger: extension version: 1.14.0
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 651, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/invocation.py", line 113, in _validation
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 859, in _validate_arg_level
File "C:\Users\My Name.azure\cliextensions\spring\azext_spring_validators.py", line 754, in validate_managed_environment
raise InvalidArgumentValueError('--managed-environment {0} is not a valid Container App Environment resource ID'.format(managed_environment_id))
azure.cli.core.azclierror.InvalidArgumentValueError: --managed-environment C:/Program Files/Git/subscriptions/1111177/resourceGroups/mySpringApp/providers/Microsoft.App/managedEnvironments/mySpringAppDev is not a valid Container App Environment resource ID

cli.azure.cli.core.azclierror: --managed-environment C:/Program Files/Git/subscriptions/111117/resourceGroups/mySpringApp/providers/Microsoft.App/managedEnvironments/mySpringAppDev is not a valid Container App Environment resource ID
az_command_data_logger: --managed-environment C:/Program Files/Git/subscriptions/1111117/resourceGroups/mySpringApp/providers/Microsoft.App/managedEnvironments/mySpringAppDev is not a valid Container App Environment resource ID
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x042262F8>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 2.157 seconds (init: 0.514, invoke: 1.643)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3639 in cache
telemetry.check: Negative: The C:\Users\My Name.azure\telemetry.txt was modified at 2023-07-10 11:50:13.221615, which in less than 600.000000 s

Expected behavior

I want a new Spring App being created in the specified managed environment. (Azure Container Apps)

Environment Summary

azure-cli 2.46.0 *

core 2.46.0 *
telemetry 1.0.8

Extensions:
containerapp 0.3.35
spring 1.14.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\My Name.azure\cliextensions'

Python (Windows) 3.10.10 (tags/v3.10.10:aad5f6a, Feb 7 2023, 17:05:00) [MSC v.1929 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Additional context

I did a pair programming session with @rajata07 who is experiencing the same.

@SandraAhlgrimm SandraAhlgrimm added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jul 10, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Jul 10, 2023

Thank you for opening this issue, we will look into it.

@SandraAhlgrimm SandraAhlgrimm changed the title When on Windows, it adds C:/Program Files/Git' and then it's an invalid Container App Environment resource ID to create my Spring App on ACA (consumpot When on Windows, it adds C:/Program Files/Git' and then it's an invalid Container App Environment resource ID to create my Spring App on ACA (consumption plan) Jul 10, 2023
@SandraAhlgrimm SandraAhlgrimm changed the title When on Windows, it adds C:/Program Files/Git' and then it's an invalid Container App Environment resource ID to create my Spring App on ACA (consumption plan) On Windows, it adds C:/Program Files/Git' and then it's an invalid Container App Environment resource ID to create my Spring App on ACA (consumption plan) Jul 10, 2023
@yonzhan yonzhan added Spring Cloud Spring Cloud related issues CXP Attention This issue is handled by CXP team. labels Jul 10, 2023
@ghost
Copy link

ghost commented Jul 10, 2023

Thank you for your feedback. This has been routed to the support team for assistance.

1 similar comment
@microsoft-github-policy-service
Copy link
Contributor

Thank you for your feedback. This has been routed to the support team for assistance.

@navba-MSFT navba-MSFT added Service Attention This issue is responsible by Azure service team. needs-team-attention This issue needs attention from Azure service team or SDK team and removed CXP Attention This issue is handled by CXP team. labels Jul 12, 2023
@ghost
Copy link

ghost commented Jul 12, 2023

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ShichaoQiu, @yuwzho, @yucwan.

Issue Details

Describe the bug

$ az spring create --name ${AZURE_SPRING_APPS_INSTANCE} --managed-environment ${MANAGED_ENV_RESOURCE_ID} --sku standardGen2
--managed-environment C:/Program Files/Git/subscriptions/111111117/resourceGroups/mySpringApp/providers/Microsoft.App/managedEnvironments/mySpringAppDev is not a valid Container App Environment resource ID

$ echo ${MANAGED_ENV_RESOURCE_ID} /subscriptions/111111117/resourceGroups/mySpringApp/providers/Microsoft.App/managedEnvironments/mySpringAppDev

Related command

az spring create

Errors

--managed-environment C:/Program Files/Git/subscriptions/111111117/resourceGroups/mySpringApp/providers/Microsoft.App/managedEnvironments/mySpringAppDev is not a valid Container App Environment resource ID

Issue script & Debug output

$ az spring create --name ${AZURE_SPRING_APPS_INSTANCE} --managed-environment ${MANAGED_ENV_RESOURCE_ID} --sku standardGen2 --debug
cli.knack.cli: Command arguments: ['spring', 'create', '--name', 'mySpringAppInstance', '--managed-environment', 'C:/Program Files/Git/subscriptions/11111117/resourceGroups/mySpringApp/providers/Microsoft.App/managedEnvironments/mySpringAppDev', '--sku', 'standardGen2', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
Enable VT mode.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x01E6B460>, <function OutputProducer.on_global_arguments at 0x01F39BF8>, <function CLIQuery.on_global_arguments at 0x01F58850>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'spring': ['azure.cli.command_modules.serviceconnector', 'azext_spring']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: serviceconnector 0.549 16 235
cli.azure.cli.core: Total (1) 0.549 16 235
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: spring 0.473 39 180 C:\Users\My Name.azure\cliextensions\spring
cli.azure.cli.core: Total (1) 0.473 39 180
cli.azure.cli.core: Loaded 54 groups, 415 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : spring create
cli.azure.cli.core: Command table: spring create
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x042261D8>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\My Name.azure\commands\2023-07-10.11-53-04.spring_create.38840.log'.
az_command_data_logger: command args: spring create --name {} --managed-environment {} --sku {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x04251730>]
cli.knack.commands: Configured default 'mySpringApp' for arg resource_group
cli.knack.commands: Configured default 'westeurope' for arg location
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x0426D6A0>, <function register_cache_arguments..add_cache_arguments at 0x0426D898>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x01F39C40>, <function CLIQuery.handle_query_parameter at 0x01F58898>, <function register_ids_argument..parse_ids_arguments at 0x0426D850>]
az_command_data_logger: extension name: spring
az_command_data_logger: extension version: 1.14.0
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 651, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/invocation.py", line 113, in _validation
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 859, in _validate_arg_level
File "C:\Users\My Name.azure\cliextensions\spring\azext_spring_validators.py", line 754, in validate_managed_environment
raise InvalidArgumentValueError('--managed-environment {0} is not a valid Container App Environment resource ID'.format(managed_environment_id))
azure.cli.core.azclierror.InvalidArgumentValueError: --managed-environment C:/Program Files/Git/subscriptions/1111177/resourceGroups/mySpringApp/providers/Microsoft.App/managedEnvironments/mySpringAppDev is not a valid Container App Environment resource ID

cli.azure.cli.core.azclierror: --managed-environment C:/Program Files/Git/subscriptions/111117/resourceGroups/mySpringApp/providers/Microsoft.App/managedEnvironments/mySpringAppDev is not a valid Container App Environment resource ID
az_command_data_logger: --managed-environment C:/Program Files/Git/subscriptions/1111117/resourceGroups/mySpringApp/providers/Microsoft.App/managedEnvironments/mySpringAppDev is not a valid Container App Environment resource ID
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x042262F8>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 2.157 seconds (init: 0.514, invoke: 1.643)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3639 in cache
telemetry.check: Negative: The C:\Users\My Name.azure\telemetry.txt was modified at 2023-07-10 11:50:13.221615, which in less than 600.000000 s

Expected behavior

I want a new Spring App being created in the specified managed environment. (Azure Container Apps)

Environment Summary

azure-cli 2.46.0 *

core 2.46.0 *
telemetry 1.0.8

Extensions:
containerapp 0.3.35
spring 1.14.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\My Name.azure\cliextensions'

Python (Windows) 3.10.10 (tags/v3.10.10:aad5f6a, Feb 7 2023, 17:05:00) [MSC v.1929 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Additional context

I did a pair programming session with @rajata07 who is experiencing the same.

Author: SandraAhlgrimm
Assignees: -
Labels:

bug, Service Attention, Spring Cloud, needs-team-attention

Milestone: -

@navba-MSFT
Copy link
Contributor

Adding Service team to look into this.

@yuwzho
Copy link
Contributor

yuwzho commented Jul 12, 2023

@ShichaoQiu will look into this

@ShichaoQiu
Copy link
Contributor

Thanks @SandraAhlgrimm . Did you run the CLI command in Git Bash? What's your terminal tool? Sometimes, in Git Bash env, it will try to help you to add file prefix (e.g. C:/Program Files/Git) into your file path. Would you pls have a try by using other tool? for example, PowerShell, WSL linux or other tools, thanks a lot.

@SandraAhlgrimm
Copy link
Member Author

It works on Cloud Shell now. But I would love to see that working on Git Bash on Windows as well as it seems a common scenario for Java Developers.

@ShichaoQiu
Copy link
Contributor

ShichaoQiu commented Jul 24, 2023

Hi @SandraAhlgrimm , you can try any one of the following workaround solutions in GitBash

  • Solution 1: Use double slash, for example, // subscriptions/111111117/resourceGroups/mySpringApp/providers/Microsoft.App/managedEnvironments/mySpringAppDev
  • Solution 2: Add MSYS_NO_PATHCONV=1 before the CLI command, for example, MSYS_NO_PATHCONV=1 az spring create xxxxx
  • Solution 3: Export MSYS_NO_PATHCONV=1, for example, export MSYS_NO_PATHCONV=1, and then run CLI command.

Feel free to ping me if you hit any issue, thanks a lot.

@navba-MSFT navba-MSFT added needs-author-feedback More information is needed from author to address the issue. and removed needs-team-attention This issue needs attention from Azure service team or SDK team labels Jul 24, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the no-recent-activity There has been no recent activity on this issue. label Jul 31, 2023
@microsoft-github-policy-service
Copy link
Contributor

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-author-feedback More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. Service Attention This issue is responsible by Azure service team. Spring Cloud Spring Cloud related issues
Projects
None yet
Development

No branches or pull requests

5 participants