Uh oh!
There was an error while loading. Please reload this page.
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 325
feat: add mtls feature#492
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e716ea6
feat: add mtls feature
arithmetic1728 935b431
update
arithmetic1728 dc255b4
Update google/cloud/bigquery/_http.py
arithmetic1728 0008d75
Update google/cloud/bigquery/client.py
arithmetic1728 9df7a92
Update google/cloud/bigquery/client.py
arithmetic1728 d28042c
Update tests/unit/test__http.py
arithmetic1728 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -78,10 +78,7 @@ | ||
| _DEFAULT_CHUNKSIZE = 1048576 # 1024 * 1024 B = 1 MB | ||
| _MAX_MULTIPART_SIZE = 5 * 1024 * 1024 | ||
| _DEFAULT_NUM_RETRIES = 6 | ||
| _BASE_UPLOAD_TEMPLATE = ( | ||
| "https://bigquery.googleapis.com/upload/bigquery/v2/projects/" | ||
| "{project}/jobs?uploadType=" | ||
| ) | ||
| _BASE_UPLOAD_TEMPLATE = "{host}/upload/bigquery/v2/projects/{project}/jobs?uploadType=" | ||
| _MULTIPART_URL_TEMPLATE = _BASE_UPLOAD_TEMPLATE + "multipart" | ||
| _RESUMABLE_URL_TEMPLATE = _BASE_UPLOAD_TEMPLATE + "resumable" | ||
| _GENERIC_CONTENT_TYPE = "*/*" | ||
| @@ -2547,7 +2544,15 @@ def _initiate_resumable_upload( | ||
| if project is None: | ||
| project = self.project | ||
| upload_url = _RESUMABLE_URL_TEMPLATE.format(project=project) | ||
| # TODO: Increase the minimum version of google-cloud-core to 1.6.0 | ||
| # and remove this logic. See: | ||
| # https://github.com/googleapis/python-bigquery/issues/509 | ||
| hostname = ( | ||
arithmetic1728 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| self._connection.API_BASE_URL | ||
| if not hasattr(self._connection, "get_api_base_url_for_mtls") | ||
| else self._connection.get_api_base_url_for_mtls() | ||
| ) | ||
| upload_url = _RESUMABLE_URL_TEMPLATE.format(host=hostname, project=project) | ||
| # TODO: modify ResumableUpload to take a retry.Retry object | ||
| # that it can use for the initial RPC. | ||
| @@ -2616,7 +2621,15 @@ def _do_multipart_upload( | ||
| if project is None: | ||
| project = self.project | ||
| upload_url = _MULTIPART_URL_TEMPLATE.format(project=project) | ||
| # TODO: Increase the minimum version of google-cloud-core to 1.6.0 | ||
| # and remove this logic. See: | ||
| # https://github.com/googleapis/python-bigquery/issues/509 | ||
| hostname = ( | ||
arithmetic1728 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| self._connection.API_BASE_URL | ||
| if not hasattr(self._connection, "get_api_base_url_for_mtls") | ||
| else self._connection.get_api_base_url_for_mtls() | ||
| ) | ||
| upload_url = _MULTIPART_URL_TEMPLATE.format(host=hostname, project=project) | ||
| upload = MultipartUpload(upload_url, headers=headers) | ||
| if num_retries is not None: | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.