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

When using bicepparam file for params, always getting error: "Error while attempting to retrieve the latest Bicep version" #30625

Open
PiotrWachulec opened this issue Jan 8, 2025 · 4 comments
Assignees
Labels
Auto-Assign Auto assign by bot Azure Deployments az deployment/bicep/stack/deployment-scripts/ts/group export bug This issue requires a change to an existing behavior in the product in order to be resolved. Configure az configure/config customer-reported Issues that are reported by GitHub users external to the Azure organization. Possible-Solution Service Attention This issue is responsible by Azure service team. Similar-Issue

Comments

@PiotrWachulec
Copy link

Describe the bug

When I'm using the .bicepparam file and I want to do the deployment with Azure CLI, then I'm getting the error: Error while attempting to retrieve the latest Bicep version: HTTPSConnectionPool(host='downloads.bicep.azure.com', port=443): Max retries exceeded with url: /releases/latest (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)'))).

The az config set bicep.check_version=False and az config set bicep.use_binary_from_path=True don't work. I'm getting still the same behavior.

When I will migrate params to JSON file, works properly. Also, when I'm doing the deployment with Azure Powershell and .bicepparam file works well.

Related command

az deployment sub what-if \
    --location <redacted> \
    --name <redacted> \
    --template-file <redacted> \
    --parameters <redacted>

Errors

Error while attempting to retrieve the latest Bicep version: HTTPSConnectionPool(host='downloads.bicep.azure.com', port=443): Max retries exceeded with url: /releases/latest (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)'))).

Issue script & Debug output


                                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/command_modules/resource/custom.py", line 1073, in _parse_bicepparam_file
    ensure_bicep_installation(cmd.cli_ctx, stdout=False)
  File "/opt/az/lib/python3.12/site-packages/azure/cli/command_modules/resource/_bicep.py", line 129, in ensure_bicep_installation
    release_tag = release_tag if release_tag else get_bicep_latest_release_tag()
                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/command_modules/resource/_bicep.py", line 204, in get_bicep_latest_release_tag
    raise ClientRequestError(f"Error while attempting to retrieve the latest Bicep version: {err}.")
azure.cli.core.azclierror.ClientRequestError: Error while attempting to retrieve the latest Bicep version: HTTPSConnectionPool(host='downloads.bicep.azure.com', port=443): Max retries exceeded with url: /releases/latest (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)'))).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/arm.py", line 109, in handle_template_based_exception
    raise CLIError(ex.inner_exception.error.message)
                   ^^^^^^^^^^^^^^^^^^
AttributeError: 'ClientRequestError' object has no attribute 'inner_exception'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 725, in _run_job
    return cmd_copy.exception_handler(ex)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/arm.py", line 114, in handle_template_based_exception
    raise CLIError(ex)
knack.util.CLIError: Error while attempting to retrieve the latest Bicep version: HTTPSConnectionPool(host='downloads.bicep.azure.com', port=443): Max retries exceeded with url: /releases/latest (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)'))).

ERROR: cli.azure.cli.core.azclierror: Error while attempting to retrieve the latest Bicep version: HTTPSConnectionPool(host='downloads.bicep.azure.com', port=443): Max retries exceeded with url: /releases/latest (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)'))).
ERROR: az_command_data_logger: Error while attempting to retrieve the latest Bicep version: HTTPSConnectionPool(host='downloads.bicep.azure.com', port=443): Max retries exceeded with url: /releases/latest (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)'))).
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f6d30ed6e80>]
INFO: az_command_data_logger: exit code: 1
INFO: cli.__main__: Command ran in 5.498 seconds (init: 0.114, invoke: 5.384)
INFO: telemetry.main: Begin splitting cli events and extra events, total events: 1
INFO: telemetry.client: Accumulated 0 events. Flush the clients.
INFO: telemetry.main: Finish splitting cli events and extra events, cli events: 1
INFO: telemetry.save: Save telemetry record of length 4128 in cache file under /azp/_work/_temp/.azclitask/telemetry/20250103130742614
INFO: telemetry.main: Begin creating telemetry upload process.
INFO: telemetry.process: Creating upload process: "/opt/az/bin/python3 /opt/az/lib/python3.12/site-packages/azure/cli/telemetry/__init__.py /azp/_work/_temp/.azclitask /azp/_work/_temp/.azclitask/telemetry/20250103130742614"
INFO: telemetry.process: Return from creating process 294
INFO: telemetry.main: Finish creating telemetry upload process.

Expected behavior

The command runs successfully and deploy the Bicep template without any errors. Additionally, when I enforce omiting Bicep update via az config then this step is omitted.

Environment Summary

azure-cli 2.67.0

core 2.67.0
telemetry 1.1.0

Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1

Python location '/opt/az/bin/python3'
Extensions directory '/home/nn-admin/.azure/cliextensions'

Additional context

Those issues looks similar/related:

@PiotrWachulec PiotrWachulec added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jan 8, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Jan 8, 2025
@yonzhan
Copy link
Collaborator

yonzhan commented Jan 8, 2025

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

@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot Configure az configure/config labels Jan 8, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Azure Deployments az deployment/bicep/stack/deployment-scripts/ts/group export Service Attention This issue is responsible by Azure service team. labels Jan 8, 2025
Copy link

github-actions bot commented Jan 8, 2025

Here are some similar issues that might help you. Please check if they can solve your problem.


Possible solution (Extracted from existing issue, might be incorrect; please verify carefully)

Solution 1:

We plan to host bicep on a CDN in the near future to avoid hitting the rate limit: Azure/bicep#3689

Reference:

Solution 2:

Until they find a solution to their rate limit issues in the Bicep project, I guess we will just resort to using a custom Docker image for our pipeline.

Reference:

Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/deployments-owners.

@yonzhan yonzhan added bug This issue requires a change to an existing behavior in the product in order to be resolved. and removed Azure CLI Team The command of the issue is owned by Azure CLI team bug This issue requires a change to an existing behavior in the product in order to be resolved. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 8, 2025
Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/deployments-owners.

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 Azure Deployments az deployment/bicep/stack/deployment-scripts/ts/group export bug This issue requires a change to an existing behavior in the product in order to be resolved. Configure az configure/config customer-reported Issues that are reported by GitHub users external to the Azure organization. Possible-Solution Service Attention This issue is responsible by Azure service team. Similar-Issue
Projects
None yet
Development

No branches or pull requests

3 participants