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

BigQuery: Add client_options to constructors for manual clients. #8999

Conversation

emar-kar
Copy link
Contributor

@emar-kar emar-kar commented Aug 9, 2019

Toward #8475

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 9, 2019
@emar-kar emar-kar changed the title Add client options to bigquery constructor BigQuery: Add client_options to constructors for manual clients. Aug 9, 2019
@IlyaFaer IlyaFaer added api: bigquery Issues related to the BigQuery API. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Aug 9, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 9, 2019
@IlyaFaer IlyaFaer marked this pull request as ready for review August 9, 2019 09:48
@IlyaFaer IlyaFaer requested review from a team, tseaver and tswast August 9, 2019 09:48
project=self.PROJECT,
credentials=creds,
_http=http,
client_options={"api_endpoint": Connection.DEFAULT_API_ENDPOINT},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this test is for default Client constructor arguments, let's omit client_options from this test, but still check that API_BASE_URL has the expected value.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that we need a different test where we set client_options as a dictionary. Let's add such a test and set a value for api_endpoint to something other than the default value.


creds = _make_credentials()
http = object()
client_options = ClientOptions(Connection.DEFAULT_API_ENDPOINT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check with an alternative value for the api_endpoint, since we are trying to test for non-default values in this test.

bigquery/tests/unit/test_client.py Outdated Show resolved Hide resolved
bigquery/tests/unit/test_client.py Outdated Show resolved Hide resolved
* added new test to check 'client_options' as a dict
* deleted extra asserts
* chged object at 'test_ctor_w_client_options_object' to an alternative value
@IlyaFaer IlyaFaer added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 15, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 15, 2019
* fixed lint issues
@IlyaFaer IlyaFaer added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 16, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 16, 2019
Copy link
Contributor

@tswast tswast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the tests, just one question.

bigquery/setup.py Show resolved Hide resolved
@busunkim96 busunkim96 requested a review from tswast August 27, 2019 17:59
@busunkim96 busunkim96 merged commit 814bd26 into googleapis:master Aug 27, 2019
@emar-kar emar-kar deleted the add-client_options-to-bigquery-constructor branch August 28, 2019 07:59
HemangChothani pushed a commit to HemangChothani/google-cloud-python that referenced this pull request Aug 29, 2019
emar-kar added a commit to MaxxleLLC/google-cloud-python that referenced this pull request Sep 18, 2019
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 BigQuery API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants