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

'AuthorizedSession' object has no attribute 'configure_mtls_channel' #513

Closed
keiththompson opened this issue Feb 8, 2021 · 3 comments
Closed
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. type: process A process-related concern. May include testing, release, or the like.

Comments

@keiththompson
Copy link

This error has popped up on all our health checks in the last couple of hours. I believe it may be from an upstream change, perhaps in service discovery.

Environment details

  • OS type and version: Amazon Linux 2
  • Python version: 3.7
  • pip version: 19.3.1
  • google-cloud-bigquery version: 1.22.0

Steps to reproduce

  1. Create a query job

Code example

self.client = bigquery.Client(project=project_id, credentials=credentials)
...
query_job = self.client.query(query)
result = query_job.result()
...

Stack trace

query_job = self.client.query(query)
  File "/conjura/deployments/dycj6x5x8/venv/lib64/python3.7/site-packages/google/cloud/bigquery/client.py", line 2144, in query
    query_job._begin(retry=retry)
  File "/conjura/deployments/dycj6x5x8/venv/lib64/python3.7/site-packages/google/cloud/bigquery/job.py", line 3047, in _begin
    super(QueryJob, self)._begin(client=client, retry=retry)
  File "/conjura/deployments/dycj6x5x8/venv/lib64/python3.7/site-packages/google/cloud/bigquery/job.py", line 630, in _begin
    retry, method="POST", path=path, data=self.to_api_repr()
  File "/conjura/deployments/dycj6x5x8/venv/lib64/python3.7/site-packages/google/cloud/bigquery/client.py", line 475, in _call_api
    return call()
  File "/conjura/deployments/dycj6x5x8/venv/lib64/python3.7/site-packages/google/api_core/retry.py", line 286, in retry_wrapped_func
    on_error=on_error,
  File "/conjura/deployments/dycj6x5x8/venv/lib64/python3.7/site-packages/google/api_core/retry.py", line 184, in retry_target
    return target()
  File "/conjura/deployments/dycj6x5x8/venv/lib64/python3.7/site-packages/google/cloud/_http.py", line 479, in api_request
    timeout=timeout,
  File "/conjura/deployments/dycj6x5x8/venv/lib64/python3.7/site-packages/google/cloud/_http.py", line 337, in _make_request
    method, url, headers, data, target_object, timeout=timeout
  File "/conjura/deployments/dycj6x5x8/venv/lib64/python3.7/site-packages/google/cloud/_http.py", line 374, in _do_request
    return self.http.request(
  File "/conjura/deployments/dycj6x5x8/venv/lib64/python3.7/site-packages/google/cloud/_http.py", line 157, in http
    return self._client._http
  File "/conjura/deployments/dycj6x5x8/venv/lib64/python3.7/site-packages/google/cloud/client.py", line 187, in _http
    self._http_internal.configure_mtls_channel(self._client_cert_source)
AttributeError: 'AuthorizedSession' object has no attribute 'configure_mtls_channel'
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Feb 8, 2021
@keiththompson
Copy link
Author

We solved this by pinning google-cloud-core to 1.5.0. We did not have this dependency pinned prior to this issue. Please close if you're happy with that.

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Feb 9, 2021
@plamut
Copy link
Contributor

plamut commented Feb 9, 2021

@keiththompson Thanks for the report and finding the fix.

Users should not have to pin to a higher version manually, thus we need to bump the minimum supported version of the google-cloud-core dependency. Additionally, as a sanity check, we should verify that this bug is indeed caught by the check that tests the library with the minimum supported versions.

Related: #509.

@plamut plamut added type: process A process-related concern. May include testing, release, or the like. and removed triage me I really want to be triaged. labels Feb 9, 2021
@meredithslota
Copy link
Contributor

Closing as #509 is resolved and the version of this dependency is no longer pinned. https://github.com/googleapis/python-bigquery/blob/main/setup.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

No branches or pull requests

4 participants