Skip to content

The latest release of oauthlib broke azure-mgmt-datafactory #41635

Open
@danchengcaa

Description

@danchengcaa
  • Package Name: azure-mgmt-datafactory
  • Package Version: 0.13.0
  • Operating System:Ubuntu-22.04
  • Python Version: python 3.10

Describe the bug
We suspect today's release authlib (https://pypi.org/project/oauthlib/3.3.0/) broke DataFactoryManagementClient from azure-mgmt-datafactory
We are using azure python datafactory SDK (azure-mgmt-datafactory) to get active pipeline runs from our data factory, however it errors out and we didn't have any codebase change on our end.

To Reproduce
Let me add the traceback here which can explain the bugs in detail

File "/mnt/batch/tasks/workitems/adfv2-Linux/job-1/10e51296-39c3-4736-ab2a-ebae6958a69f/wd/start.py", line 24, in
main()
File "/mnt/batch/tasks/workitems/adfv2-Linux/job-1/10e51296-39c3-4736-ab2a-ebae6958a69f/wd/start.py", line 16, in main
if is_currently_running(runtime.pipeline_name, runtime.run_id):
File "/mnt/batch/tasks/workitems/adfv2-Linux/job-1/10e51296-39c3-4736-ab2a-ebae6958a69f/wd/common/data_factory.py", line 46, in is_currently_running
running = DataFactory().get_active_runs()
File "/mnt/batch/tasks/workitems/adfv2-Linux/job-1/10e51296-39c3-4736-ab2a-ebae6958a69f/wd/common/data_factory.py", line 127, in get_active_runs
return self.pipeline_runs(
**File "/mnt/batch/tasks/workitems/adfv2-Linux/job-1/10e51296-39c3-4736-ab2a-ebae6958a69f/wd/common/data_factory.py", line 95, in pipeline_runs
resp = self.df.pipeline_runs.query_by_factory(
File "/usr/local/lib/python3.10/dist-packages/azure/mgmt/datafactory/operations/_pipeline_runs_operations.py", line 92, in query_by_factory
response = self._client.send(request, stream=False, **operation_config)
File "/usr/local/lib/python3.10/dist-packages/msrest/service_client.py", line 336, in send
pipeline_response = self.config.pipeline.run(request, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/msrest/pipeline/init.py", line 197, in run
return first_node.send(pipeline_request, **kwargs) # type: ignore
File "/usr/local/lib/python3.10/dist-packages/msrest/pipeline/init.py", line 150, in send
response = self.next.send(request, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/msrest/pipeline/requests.py", line 65, in send
self._creds.signed_session(session)
File "/usr/local/lib/python3.10/dist-packages/msrestazure/azure_active_directory.py", line 202, in signed_session
return super(AADMixin, self).signed_session(session)
File "/usr/local/lib/python3.10/dist-packages/msrest/authentication.py", line 172, in signed_session
session.auth = oauth.OAuth2(self.id, token=self.token)
File "/usr/local/lib/python3.10/dist-packages/requests_oauthlib/oauth2_auth.py", line 20, in init
self._client = client or WebApplicationClient(client_id, token=token)
File "/usr/local/lib/python3.10/dist-packages/oauthlib/oauth2/rfc6749/clients/web_application.py", line 40, in init
super().init(client_id, kwargs)
File "/usr/local/lib/python3.10/dist-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 137, in init
self.populate_token_attributes(self.token)
File "/usr/local/lib/python3.10/dist-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 585, in populate_token_attributes
vin, vat, v_at = parse_expires(response)
File "/usr/local/lib/python3.10/dist-packages/oauthlib/oauth2/rfc6749/parameters.py", line 505, in parse_expires
raise ValueError("expires_int must be an int")
ValueError: expires_int must be an int

Expected behavior
We should be getting successfully response back when querying active pipeline runs from datafactory client

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Data FactoryMgmtThis issue is related to a management-plane library.Service AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions