You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/10/11 10:20:22 UTC
[GitHub] [beam] ricardograca-scratch opened a new pull request, #23569: Add drive scope to GCP Auth
ricardograca-scratch opened a new pull request, #23569:
URL: https://github.com/apache/beam/pull/23569
This adds the ability to access Google Drive backed BigQuery tables in the Python and Java SDKs, closing #23290.
Note: I couldn't find the GCP Auth in the TypeScript and Go SDKs.
------------------------
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] [**Choose reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and mention them in a comment (`R: @username`).
- [x] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
- [x] Update `CHANGES.md` with noteworthy changes.
- [x] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://beam.apache.org/contribute/get-started-contributing/#make-the-reviewers-job-easier).
To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
GitHub Actions Tests Status (on master branch)
------------------------------------------------------------------------------------------------
[](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] commented on pull request #23569: Add drive scope to GCP Auth
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #23569:
URL: https://github.com/apache/beam/pull/23569#issuecomment-1274526173
# [Codecov](https://codecov.io/gh/apache/beam/pull/23569?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#23569](https://codecov.io/gh/apache/beam/pull/23569?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (72d3dd2) into [master](https://codecov.io/gh/apache/beam/commit/d2b0a26503c722db9c3a04a434de21c20fbae353?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d2b0a26) will **decrease** coverage by `0.01%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #23569 +/- ##
==========================================
- Coverage 73.46% 73.45% -0.02%
==========================================
Files 718 718
Lines 95935 95935
==========================================
- Hits 70481 70468 -13
- Misses 24143 24156 +13
Partials 1311 1311
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.20% <ø> (-0.02%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/23569?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/python/apache\_beam/internal/gcp/auth.py](https://codecov.io/gh/apache/beam/pull/23569/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vaW50ZXJuYWwvZ2NwL2F1dGgucHk=) | `73.33% <ø> (-5.34%)` | :arrow_down: |
| [.../python/apache\_beam/testing/test\_stream\_service.py](https://codecov.io/gh/apache/beam/pull/23569/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdGVzdGluZy90ZXN0X3N0cmVhbV9zZXJ2aWNlLnB5) | `88.09% <0.00%> (-4.77%)` | :arrow_down: |
| [...che\_beam/runners/interactive/interactive\_runner.py](https://codecov.io/gh/apache/beam/pull/23569/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9pbnRlcmFjdGl2ZS9pbnRlcmFjdGl2ZV9ydW5uZXIucHk=) | `90.50% <0.00%> (-1.27%)` | :arrow_down: |
| [sdks/python/apache\_beam/transforms/combiners.py](https://codecov.io/gh/apache/beam/pull/23569/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy9jb21iaW5lcnMucHk=) | `93.05% <0.00%> (-0.39%)` | :arrow_down: |
| [...hon/apache\_beam/runners/worker/bundle\_processor.py](https://codecov.io/gh/apache/beam/pull/23569/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy93b3JrZXIvYnVuZGxlX3Byb2Nlc3Nvci5weQ==) | `93.30% <0.00%> (-0.25%)` | :arrow_down: |
| [...ks/python/apache\_beam/runners/worker/sdk\_worker.py](https://codecov.io/gh/apache/beam/pull/23569/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy93b3JrZXIvc2RrX3dvcmtlci5weQ==) | `89.08% <0.00%> (-0.17%)` | :arrow_down: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] kennknowles commented on pull request #23569: Add drive scope to GCP Auth
Posted by GitBox <gi...@apache.org>.
kennknowles commented on PR #23569:
URL: https://github.com/apache/beam/pull/23569#issuecomment-1274803899
R: @tvalentyn
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23569: Add drive scope to GCP Auth
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23569:
URL: https://github.com/apache/beam/pull/23569#issuecomment-1279613818
This was superseded by https://github.com/apache/beam/pull/23644, feel free to reopen PR if you want to continue with this change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] github-actions[bot] commented on pull request #23569: Add drive scope to GCP Auth
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #23569:
URL: https://github.com/apache/beam/pull/23569#issuecomment-1274857817
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] ricardograca-scratch commented on pull request #23569: Add drive scope to GCP Auth
Posted by GitBox <gi...@apache.org>.
ricardograca-scratch commented on PR #23569:
URL: https://github.com/apache/beam/pull/23569#issuecomment-1278658453
@lukecwik @tvalentyn I can certainly add the `parser.add_argument()` part, I think, but how do I specify what kind of value it accepts? And do I then just merge that value with `CLIENT_SCOPES`, or is there a more involved process that's required?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23569: Add drive scope to GCP Auth
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23569:
URL: https://github.com/apache/beam/pull/23569#issuecomment-1278147465
I think we want to minimize the number of scopes that are requested on behalf of a user. Users can already set their own credential factory in Beam Java and configure it to request any scopes when creating the credential object. We could use something similar for Beam Python.
For a simple improvement, we could make a pipeline option that each user can configure with the existing scopes being the default?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] ricardograca-scratch commented on pull request #23569: Add drive scope to GCP Auth
Posted by GitBox <gi...@apache.org>.
ricardograca-scratch commented on PR #23569:
URL: https://github.com/apache/beam/pull/23569#issuecomment-1274465171
Can you review this @kennknowles?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn commented on pull request #23569: Add drive scope to GCP Auth
Posted by GitBox <gi...@apache.org>.
tvalentyn commented on PR #23569:
URL: https://github.com/apache/beam/pull/23569#issuecomment-1278242221
> For a simple improvement, we could make a pipeline option that each user can configure with the existing scopes being the default?
FWIW this is straightforward. `pipeline_options` are available in both places `CLIENT_SCOPES` is currently used. we can add, for example an option `--custom_oauth_scopes` , that will store semicolon-separated strings here:
https://github.com/apache/beam/blob/2d84233009ffe7488649efbb0acdfb9fea7fdf31/sdks/python/apache_beam/options/pipeline_options.py#L767
We can add the contents of that option the the default scopes currently hardcoded.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik closed pull request #23569: Add drive scope to GCP Auth
Posted by GitBox <gi...@apache.org>.
lukecwik closed pull request #23569: Add drive scope to GCP Auth
URL: https://github.com/apache/beam/pull/23569
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] github-actions[bot] commented on pull request #23569: Add drive scope to GCP Auth
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #23569:
URL: https://github.com/apache/beam/pull/23569#issuecomment-1274504060
Assigning reviewers. If you would like to opt out of this review, comment `assign to next reviewer`:
R: @yeandy for label python.
R: @lukecwik for label java.
Available commands:
- `stop reviewer notifications` - opt out of the automated review tooling
- `remind me after tests pass` - tag the comment author after tests pass
- `waiting on author` - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)
The PR bot will only process comments in the main thread (not review comments).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn commented on pull request #23569: Add drive scope to GCP Auth
Posted by GitBox <gi...@apache.org>.
tvalentyn commented on PR #23569:
URL: https://github.com/apache/beam/pull/23569#issuecomment-1279268274
@lukecwik good point.
@ricardograca-scratch you can mirror the implementation of dataflow_service_options. See:
https://github.com/apache/beam/blob/2d84233009ffe7488649efbb0acdfb9fea7fdf31/sdks/python/apache_beam/options/pipeline_options.py#L742-L753
https://github.com/apache/beam/blob/2d84233009ffe7488649efbb0acdfb9fea7fdf31/sdks/python/apache_beam/options/pipeline_options.py#L814
https://github.com/apache/beam/blob/45cc0854be553b5138753cf649fa863a80ff2b04/sdks/python/apache_beam/options/pipeline_options_test.py#L624
a repeatable option : ` --oauth_scopes + --oauth_scope (alias)` sounds good.
you can then combine the content with the `CLIENT_SCOPES` wherever scopes are consumed. `CLIENT_SCOPES` can be renamed into `REQUIRED_OAUTH_SCOPES` to disambiguate required + additional.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] lukecwik commented on pull request #23569: Add drive scope to GCP Auth
Posted by GitBox <gi...@apache.org>.
lukecwik commented on PR #23569:
URL: https://github.com/apache/beam/pull/23569#issuecomment-1278277488
> > For a simple improvement, we could make a pipeline option that each user can configure with the existing scopes being the default?
>
> FWIW this is straightforward. `pipeline_options` are available in both places `CLIENT_SCOPES` is currently used. we can add, for example an option `--custom_oauth_scopes` , that will store semicolon-separated strings here:
>
> https://github.com/apache/beam/blob/2d84233009ffe7488649efbb0acdfb9fea7fdf31/sdks/python/apache_beam/options/pipeline_options.py#L767
>
> We can add the contents of that option the the default scopes currently hardcoded.
>
> Note: it is sufficient to do this just for Python, Java already has a capability to create and supply custom credentials.
Can we use a list type instead of using semi-colons as pipeline_options.py supports lists already?
Having an equivalent in Java is convenient so that the user experience is the same. This will also help with xlang so that those additional scopes can be specified for IO reasons.
Also suggest `--oauth_scopes` instead of `--custom_oauth_scopes`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org