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

{AzureContainerapp} fixes Azure/azure-cli-extensions#5673 fix for hostname bind #5728

Merged
merged 3 commits into from
Jan 5, 2023

Conversation

navba-MSFT
Copy link
Contributor

fixes #5673

fix for hostname bind command to avoid throwing the below exception:

The command failed with an unexpected error. Here is the traceback:
'NoneType' object is not iterable
Traceback (most recent call last):
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\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\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 718, in _run_job
  File "C:\Users\stefanj\.azure\cliextensions\containerapp\azext_containerapp\_client_factory.py", line 28, in _polish_bad_errors
    raise ex
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "C:\Users\stefanj\.azure\cliextensions\containerapp\azext_containerapp\custom.py", line 2884, in bind_hostname
    new_custom_domains = list(filter(lambda c: c["name"] != hostname, custom_domains))
TypeError: 'NoneType' object is not iterable


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?

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.json automatically.
The precondition is to put your code inside this repository and upgrade the version in the pull request but do not modify src/index.json.

fixes Azure#5673 

fix for hostname bind command to avoid throwing the below exception:

```
The command failed with an unexpected error. Here is the traceback:
'NoneType' object is not iterable
Traceback (most recent call last):
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\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\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 718, in _run_job
  File "C:\Users\stefanj\.azure\cliextensions\containerapp\azext_containerapp\_client_factory.py", line 28, in _polish_bad_errors
    raise ex
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "C:\Users\stefanj\.azure\cliextensions\containerapp\azext_containerapp\custom.py", line 2884, in bind_hostname
    new_custom_domains = list(filter(lambda c: c["name"] != hostname, custom_domains))
TypeError: 'NoneType' object is not iterable

```
@ghost ghost requested a review from yonzhan January 5, 2023 04:30
@ghost ghost added the Auto-Assign Auto assign by bot label Jan 5, 2023
@ghost ghost requested a review from wangzelin007 January 5, 2023 04:30
@ghost ghost assigned zhoxing-ms Jan 5, 2023
@ghost ghost added this to the Jan 2023 (2023-02-07) milestone Jan 5, 2023
@ghost ghost added the ContainerApp label Jan 5, 2023
@ghost ghost requested review from zhoxing-ms and jsntcy January 5, 2023 04:30
@yonzhan
Copy link
Collaborator

yonzhan commented Jan 5, 2023

AzureContainerapp

@yonzhan yonzhan requested a review from yanzhudd January 5, 2023 06:04
@zhoxing-ms zhoxing-ms merged commit 3b09f94 into Azure:main Jan 5, 2023
@azclibot
Copy link
Collaborator

azclibot commented Jan 5, 2023

[Release] Update index.json for extension [ containerapp ] : https://dev.azure.com/azclitools/internal/_build/results?buildId=24174&view=results

@PramodValavala-MSFT PramodValavala-MSFT added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. ContainerApp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

az containerapp hostname bind stopped working at 2022-12-15
6 participants