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

docs(samples): add auth user flow and query #478

Merged
merged 6 commits into from Jul 17, 2020

Conversation

pmakani
Copy link
Contributor

@pmakani pmakani commented Jun 23, 2020

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

@pmakani pmakani requested a review from stephaniewang526 Jun 23, 2020
@googlebot googlebot added the cla: yes label Jun 23, 2020
@codecov
Copy link

@codecov codecov bot commented Jun 23, 2020

Codecov Report

Merging #478 into master will decrease coverage by 0.14%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #478      +/-   ##
============================================
- Coverage     81.49%   81.35%   -0.15%     
  Complexity     1226     1226              
============================================
  Files            77       77              
  Lines          6220     6220              
  Branches        691      685       -6     
============================================
- Hits           5069     5060       -9     
- Misses          792      797       +5     
- Partials        359      363       +4     
Impacted Files Coverage Δ Complexity Δ
...n/java/com/google/cloud/bigquery/BigQueryImpl.java 82.54% <0.00%> (-1.05%) 74.00% <0.00%> (ø%)
...ogle/cloud/bigquery/WriteChannelConfiguration.java 86.36% <0.00%> (-0.46%) 46.00% <0.00%> (ø%)
...om/google/cloud/bigquery/LoadJobConfiguration.java 92.83% <0.00%> (-0.38%) 56.00% <0.00%> (ø%)
...m/google/cloud/bigquery/QueryJobConfiguration.java 89.80% <0.00%> (-0.28%) 66.00% <0.00%> (ø%)

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 82341cb...315cbb5. Read the comment docs.

@Test
public void testAuthUserFlow() {
// TODO(stephaniewang526): Replace client_secret.json
/*File credentialsPath = new File(""path/to/your/client_secret.json");
Copy link
Member

@stephaniewang526 stephaniewang526 Jul 3, 2020

Choose a reason for hiding this comment

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

we cannot upload any files that contains secrets -- have to use GCS
String sourceUri = "gs://cloud-devrel-kokoro-resources/java-docs-samples/service-acct.json"; so we have to figure out how to generate File from gcs path.

@stephaniewang526 stephaniewang526 added the kokoro:force-run label Jul 6, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run label Jul 6, 2020
selectedScopes)
.setDataStoreFactory(new FileDataStoreFactory(DATA_STORE_DIR))
.setAccessType("offline")
.setApprovalPrompt("force")
Copy link
Member

@stephaniewang526 stephaniewang526 Jul 6, 2020

Choose a reason for hiding this comment

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

change to "auto" so user does not need to manually confirm

@stephaniewang526 stephaniewang526 added the kokoro:force-run label Jul 6, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run label Jul 6, 2020
@pmakani pmakani added kokoro:force-run and removed kokoro:force-run labels Jul 7, 2020
@stephaniewang526 stephaniewang526 added the kokoro:force-run label Jul 7, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run label Jul 7, 2020
@stephaniewang526
Copy link
Member

@stephaniewang526 stephaniewang526 commented Jul 7, 2020

since we cannot manually approve approval prompt, we should try to do mock testing instead here.

@pmakani pmakani requested a review from Jul 17, 2020
@stephaniewang526 stephaniewang526 merged commit 65dffac into googleapis:master Jul 17, 2020
15 of 16 checks passed
@pmakani pmakani deleted the auth-user-flow branch Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants