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

Add missing fields to properly list partitioned tables #4306

Closed

Conversation

vvviiimmm
Copy link

While getting the list of tables (list endpoint) the information about partitioning and creation time is getting lost. Somewhat related to #3097.

@vvviiimmm vvviiimmm requested a review from a team as a code owner January 8, 2019 15:36
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 8, 2019
@JesseLovelace JesseLovelace added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 8, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 8, 2019
@JesseLovelace JesseLovelace added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 9, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 9, 2019
Copy link
Contributor

@JesseLovelace JesseLovelace 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 the pr! Could you add a simple test?

@JesseLovelace JesseLovelace added needs tests api: bigquery Issues related to the BigQuery API. labels Jan 9, 2019
@vvviiimmm
Copy link
Author

Added a unit test but since everything is mocked it doesn't actually call HttpBigQueryRpc.listTables (nor as any other listTables test). Please let me know if there is any other way to properly test this change.

@JesseLovelace
Copy link
Contributor

There's a non-mocked integration test for list tables in ITBigQueryTest which you could add to, or write a new IT based on it

@vvviiimmm
Copy link
Author

Thanks. I wasn't able to run the ITBigQueryTests due to ITBigQueryTest.beforeClass throws java.lang.IllegalArgumentException: A project ID is required for this service but could not be determined from the builder or the environment. Please set a project ID using the builder.. Trying things with a builder didn't help, getting null pointer exceptions. Are there any prerequisite for executing integration tests?

@JesseLovelace
Copy link
Contributor

You'll need to set the environment variables GOOGLE_CLOUD_PROJECT and GOOGLE_APPLICATION_CREDENTIALS to specify the project for the test to run on and the credentials json file for that account

@chingor13
Copy link
Contributor

The BigtableIT tests may require configuration via system properties. For CI, we set them here. We set bigtable.env, bigtable.project, bigtable.instance, and bigtable.bigtable.

@vvviiimmm
Copy link
Author

Thanks guys, I found the env variables needed but obviously I don't have credentials to access that project so the test fails on 401 Unauthorized

@JesseLovelace JesseLovelace added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 22, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 22, 2019
@JesseLovelace
Copy link
Contributor

The idea would be to use your own project instead to test, setting the values of the environment variables to be your own project and credentials

@JustinBeckwith JustinBeckwith added the 🚨 This issue needs some love. label Feb 7, 2019
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Feb 7, 2019
@sduskis
Copy link
Contributor

sduskis commented Feb 8, 2019

@vvviiimmm, please run the following command to clean up the code formatting:

mvn com.coveo:fmt-maven-plugin:format

@sduskis sduskis added status: blocked Resolving the issue is dependent on other work. and removed 🚨 This issue needs some love. labels Feb 11, 2019
@sduskis
Copy link
Contributor

sduskis commented Feb 13, 2019

@vvviiimmm, please run the following command to clean up the code formatting:

mvn com.coveo:fmt-maven-plugin:format

@pmakani pmakani added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 14, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 14, 2019
@codecov
Copy link

codecov bot commented Feb 14, 2019

Codecov Report

Merging #4306 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #4306      +/-   ##
============================================
- Coverage     49.17%   49.16%   -0.01%     
- Complexity    20988    21915     +927     
============================================
  Files          1996     2078      +82     
  Lines        194629   207084   +12455     
  Branches      21796    24084    +2288     
============================================
+ Hits          95702   101813    +6111     
- Misses        90817    97128    +6311     
- Partials       8110     8143      +33
Impacted Files Coverage Δ Complexity Δ
.../google/cloud/bigquery/spi/v2/HttpBigQueryRpc.java 6.92% <0%> (-0.71%) 2 <0> (ø)
...loud/bigtable/data/v2/internal/RequestContext.java 33.33% <0%> (-66.67%) 2% <0%> (ø)
...le/cloud/bigtable/data/v2/models/InstanceName.java 0% <0%> (-28.13%) 0% <0%> (-7%)
.../cloud/scheduler/v1beta1/CloudSchedulerClient.java 54.54% <0%> (-20.46%) 35% <0%> (+4%)
...om/google/cloud/bigtable/data/v2/models/Query.java 68.36% <0%> (-9.14%) 23% <0%> (+3%)
...om/google/cloud/grpc/BaseGrpcServiceException.java 68.42% <0%> (-9%) 3% <0%> (ø)
...ble/data/v2/stub/EnhancedBigtableStubSettings.java 93.19% <0%> (-5.94%) 15% <0%> (+2%)
...com/google/cloud/compute/v1/stub/SnapshotStub.java 11.11% <0%> (-5.56%) 1% <0%> (ø)
...le/cloud/compute/v1/stub/InstanceTemplateStub.java 11.11% <0%> (-5.56%) 1% <0%> (ø)
...src/main/java/com/google/cloud/bigquery/JobId.java 94.73% <0%> (-5.27%) 10% <0%> (+1%)
... and 1611 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 395b016...c339196. Read the comment docs.

@JustinBeckwith
Copy link
Contributor

@JesseLovelace @kolea2 is this something we should:

  • accept as is?
  • try to fix it up?
  • close it out?

@sduskis
Copy link
Contributor

sduskis commented Mar 1, 2019

@JesseLovelace, can you please finish this review?

Copy link
Contributor

@sduskis sduskis left a comment

Choose a reason for hiding this comment

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

We do need an IT request for this.

@pmakani, can you please raise a new PR with this change, and add something to the IT test to test this change?

@pmakani
Copy link

pmakani commented Mar 15, 2019

@sduskis sure, i will add that to IT test and raise a new PR.

@sduskis
Copy link
Contributor

sduskis commented Mar 20, 2019

This is replaced by #4701 which includes these changes + integration tests

@sduskis sduskis closed this Mar 20, 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. needs tests status: blocked Resolving the issue is dependent on other work.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants