This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.6k
stars
2.82k
forks
source link
Raise an Error when successfully start synapse pipeline using create_pipeline_run method #36907
Operating System: Windows 11 Enterprise - Version 23H2
Python Version: 3.10.14
Describe the bug
When you create a pipeline run execution in Azure Synapse, you get an error. However, if you check the log or the error variable, you can see that the status code was 202 and in Azure Synapse the pipeline is running.
To Reproduce
Steps to reproduce the behavior:
This is the code to reproduce the error:
1 - Import libraries
from azure.synapse.artifacts import ArtifactsClient
from azure.synapse.artifacts.models import CreateRunResponse
from azure.synapse.artifacts.models import CreateRunResponse
from azure.core.exceptions import HttpResponseError
2 - Set Variables according a to azure environment and azure resources.
Expected behavior
If there are no issues or errors, the expected output will be not receive an exception error, and the response variable will be set with the correct API's answer.
Note: I checked the library code I found that the code only consider the status code of 200 and not the 202.
Screenshots
If applicable, add screenshots to help explain your problem.
Describe the bug When you create a pipeline run execution in Azure Synapse, you get an error. However, if you check the log or the error variable, you can see that the status code was 202 and in Azure Synapse the pipeline is running.
To Reproduce Steps to reproduce the behavior: This is the code to reproduce the error:
1 - Import libraries
from azure.synapse.artifacts import ArtifactsClient from azure.synapse.artifacts.models import CreateRunResponse from azure.synapse.artifacts.models import CreateRunResponse from azure.core.exceptions import HttpResponseError
2 - Set Variables according a to azure environment and azure resources.
subscription_id = 'XXXXXX' synapse_workspace_name = 'YYYYYY' pipeline_name = 'AAAAA' tenant_id = 'VVVVVVV' client_id = 'ZZZZZZ' client_secret = 'FFFFFFF'
3 - Define Main Code
def main_synapse():
Set Crendential
if name == 'main': main_synapse()
Expected behavior If there are no issues or errors, the expected output will be not receive an exception error, and the response variable will be set with the correct API's answer.
Note: I checked the library code I found that the code only consider the status code of 200 and not the 202.
Screenshots If applicable, add screenshots to help explain your problem.
Azure Library Screenshot
Evidence Error Screenshot - Terminal
Evidence Error Screenshot - Debug Console
Additional context