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
[BEAM-11780] Use vendored cloudbuild python client. #13933
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13933 +/- ##
==========================================
+ Coverage 82.85% 82.89% +0.04%
==========================================
Files 466 469 +3
Lines 57596 58217 +621
==========================================
+ Hits 47722 48260 +538
- Misses 9874 9957 +83
Continue to review full report at Codecov.
|
It seems strange that we are modifying the external library for internal testing purposes. Can these or similar changes be done upon import instead? |
we can use
to generate the client. I think the version is only bind to the api url version, in this case we are using cloudbuild v1 beam/sdks/python/apache_beam/runners/dataflow/internal/clients/cloudbuild/cloudbuild_v1_client.py Line 40 in 875e01e
I think if they are solely dependencies for google-cloud-build they won't be needed anymore? Do we need some special handling?
It will add a lot of hacks into the importing process and I'm guessing we were avoiding that before since there are also other gcp client vendored:
I think it's desirable to use the third_party libraries, but it seems to cause a lot of frictions since the dependencies are often out of sync and have different hacks with copybara internally. |
Thanks. I thought originally that this PR checks in the google-cloud-build code. Looks like you generated client code with apitools. google-apitools is deprecated, and we were actually trying to move away from depending on google-apitools and use official google-cloud-python libraries. This may be a step in the opposite direction. cc: @aaltay - do you have any opinion here? Perhaps we should look into addressing the difficulty of managing the third_party deps for internal testing instead. |
This is just an opinion: It would be better to avoid generated clients. They do end up causing more issues than regular dependencies, they are hard to upgrade, usually stale, and apitools has been deprecated for a long time. I am fine if we want to do this in there interim and unblock some testing, but a much better solution would be to make this a proper dependency. I do not know the specific issues but this is only one of many dependencies and I assume we will have ways to address the issues with using a dependency. |
I think it should be easy to switch back to use the third_party library any time(assuming cloud build team will manage the library internally). The difficulties of using the third party google-cloud-build library are:
The third party dependency issue is a lot more chaos and hard to control than using google-apitools to generate the client at the moment. |
Sounds reasonable to me to proceed with this PR and at the same time ask cloud build team to improve the internal library story. |
Thanks all for the input. Can we
Thanks! |
Done.
This library is purely used in dataflow runner and has no io functionality, doesn't it make more sense to put it under apache_beam/runners/dataflow/internal/clients?
Created b/179919397 as a FR for cloud build team.
|
friendly ping for another look, @aaltay @tvalentyn |
Thanks, @y1chi! |
Use vendored cloud build python client so that we can avoid the pain of dealing with third_party dependencies with google internal testing.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
Post-Commit Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.