You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
{Container App} az containerapp create --bind "my-app" throws error when service has dashes in the name "-" - #6566
Container Apps lets me create a container with dashes ("-") in the name, but then I can't reference that container in the --bind parameter.
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 663, in execute
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 718, in _run_job
File "C:\Users\charris\.azure\cliextensions\containerapp\azext_containerapp\_client_factory.py", line 28, in _polish_bad_errors
raise ex
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "C:\Users\charris\.azure\cliextensions\containerapp\azext_containerapp\custom.py", line 627, in create_containerapp
service_connectors_def_list, service_bindings_def_list = parse_service_bindings(cmd, service_bindings,
File "C:\Users\charris\.azure\cliextensions\containerapp\azext_containerapp\_utils.py", line 542, in parse_service_bindings
raise InvalidArgumentValueError("The Binding Name can only contain letters, numbers (0-9), periods ('.'), "
azure.cli.core.azclierror.InvalidArgumentValueError: The Binding Name can only contain letters, numbers (0-9), periods ('.'), and underscores ('_'). The length must not be more than 60 characters.
cli.azure.cli.core.azclierror: The Binding Name can only contain letters, numbers (0-9), periods ('.'), and underscores ('_'). The length must not be more than 60 characters.
az_command_data_logger: The Binding Name can only contain letters, numbers (0-9), periods ('.'), and underscores ('_'). The length must not be more than 60 characters.
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x048C0580>]
The error message should be fixed and made more clear to avoid the confusion.
Detailed Error that should be added here is:
The Binding Name can only contain letters, numbers (0-9), periods ('.'), and underscores ('_'). The length must not be more than 60 characters.
By default, the binding name is the same as the service name you specified [my-aca-pgaddon], but you can override the default and specify your own compliant binding name like this --bind my-aca-pgaddon[:my_aca_pgaddon]
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
Have you run python scripts/ci/test_index.py -q locally?
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.
Hi navba-MSFT (@navba-MSFT),
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.
navba-MSFT (navba-MSFT)
changed the title
Update _utils.py
{AzureContainerApp} az containerapp create --bind "my-app" throws error when service has dashes in the name "-"
Jul 27, 2023
Xing Zhou (zhoxing-ms)
changed the title
{AzureContainerApp} az containerapp create --bind "my-app" throws error when service has dashes in the name "-"
{Container App} az containerapp create --bind "my-app" throws error when service has dashes in the name "-"
Aug 18, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #6524
Container Apps lets me create a container with dashes ("-") in the name, but then I can't reference that container in the --bind parameter.
The error message should be fixed and made more clear to avoid the confusion.
Detailed Error that should be added here is:
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally?For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.