microsoft / microsoft/azure-devops-python-api

[azure arm endpoint creation] too many 500 error responses

Open
#360 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
684
Forks
218
Avg merge
8d 10h
Merged PRs (30d)
1

Description

Hello,

I am trying to use service_endpoint_client to create a new azure ARM service connection, here's the code I am using:

core_client = self.__get_connection().clients_v6_0.get_service_endpoint_client()
        try:
            azure_arm = core_client.create_service_endpoint(
                {
                    "authorization": {
                        "parameters": {
                            "tenantid": "TENANT_ID",
                            "scope": "/subscriptions/SUB_ID/resourcegroups/RG_NAME"
                        },
                        "scheme": "ServicePrincipal"
                    },
                    "data": {
                        "environment": "AzureCloud",
                        "scopeLevel": "Subscription",
                        "subscriptionId": "SUB_ID",
                        "subscriptionName": "SUB_NAME",
                        "creationMode": "Automatic"
                    },
                    "name": "TEST_ME",
                    "type": "azurerm",
                    "isReady": True,
                    "url": "https://management.azure.com/",
                    "serviceEndpointProjectReferences": [
                        {
                            "name": "TEST_ME",
                            "description": "test",
                            "projectReference": {
                                "id": "AZ_DEVOPS_PROJECT_ID"
                            }
                        }
                    ]
                }
            )

The service connection was created successfully but I got this exception:

msrest.exceptions.ClientRequestError: Error occurred in request., RetryError: HTTPSConnectionPool(host='****', port=443): Max retries exceeded with url: /_apis/serviceendpoint/endpoints (Caused by ResponseError('too many 500 error responses'))

Could you please help to identify the issue?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Azure DevOps Python API's service_endpoint_client and the create_service_endpoint call shown in the report. Reproduce the request using the supplied endpoint fields and inspect the resulting 500 response; done means identifying the request or client behavior causing the exception and documenting or correcting it.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.