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
Fix downloading protobuf dependency #23400
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
CLAs look good, thanks! |
Conflict has been resolved. The PR is ready for review. |
@therc Can I proceed with next steps to merge this PR ? I don't see "approved" check and so want to get clarified on proceeding. Please keep me posted. |
I'm not a tensorflow project member, I only added a drive-by comment. :) |
Hi @Harshini-Gadige , it would be great to see this PR merged. I have been using this for a while, without any issues. Is there anything I can do to help? |
@dcirne Waiting for the reviewer approval. |
Resolved a conflict that appeared since our last contact. |
@Harshini-Gadige with the news that 1.13 will be branching on Dec 13th, is there any chance this PR gets merged before that, in time to make the cut? |
@petewarden @wolffg - Please review and approve this PR. If you are not the right person, please assign to the respective person. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm so sorry for our delay! I've requested a review from @angersson who knows more about this than I do. In the meanwhile, your PR failed a couple of our tests. Could you please help take a look? Below are some quick links to the error log.
Android Demo App
Ubuntu Makefile
Please ignore the Windows Bazel GPU
failure. It's not related to this PR.
Hi @penpornk , thank you for the links, they helped in debugging. It seems that the tests failing was not related to the content of the PR itself, but to the version of flatbuffer, which seems somehow dependent on protobuf version 3.6.1.2. Since This PR originally used protobuf version 3.6.1, the file couldn't be found. (See snippet from the tests below.) downloading https://github.com/google/flatbuffers/archive/1f5eae5d6a135ff6811724f6c57f911d1f46bb15.tar.gz
650
Cloning into 'tensorflow/contrib/makefile/downloads/protobuf'...
651
error: pathspec 'v3.6.1.2.tar.gz' did not match any file(s) known to git.
652
================================================================================
653
//tensorflow/tools/ci_build/builds:gen_makefile_out FAILED in 0.1s I updated the PR to use protobuf version 3.6.1.2. I hope this will fix the tests. |
@penpornk apologies for an earlier mistake. The commit I pushed about half an hour ago had an error in the URL to download version 3.6.1.2 of protobuf. I have just corrected it and pushed a new commit. All the tests I could run on my side worked. |
Protobuf has been failing due to its repository having dependencies. Downloading the .tar.gz form GitHub doesn't work because it does not bring its dependencies with it. This PR introduces a function to clone a repository, initializa and update its submodules. The function is used to download protobuf as a repository dependency, rather than just a file. The function is also implemented in a generic way, so if in the future other dependencies fall into the same situation, it can be reused. With these changes, `tensorflow/workspace.bzl` goes back to using the commit sha in `PROTOBUF_URLS` and `PROTOBUF_STRIP_PREFIX`, rather than the tag of a release. A command at the end of the `download_dependencies.sh` script was commented out. The comment says for it to be removed once protobug is fixed. Perhaps no longer necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dcirne Thank you for your fast response! I think the problem is the setting of PROTOBUF_SHA
itself. I tried the command on both Linux and Mac, both gave me PROTOBUF_SHA=v3.6.1.2.tar.gz
instead of an actual commit hash.
As for why 3.6.1.2, it turns out your tensorflow.bzl
was out of date. The latest tensorflow.bzl
is already using protobuf 3.6.1.2. Please sync to the latest commit. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to highlight this line in my earlier review.
@dcirne I just saw your new comment after submitting my review. Sorry for not addressing your comment earlier! I'm rerunning the tests. |
`PROTOBUF_SHA` renamed to `PROTOBUF_TAG`. The variable is used to checkout to a specific tag after cloning the protobuf repository. The value is obtained by parsing the protobuf URL in the `workspace.bzl` file.
@penpornk thank you for the feedback. I have just pushed a new commit addressing all the points from your review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fixes! The changes look good to me. I'll go ahead and approve it. Hope the tests pass this time. :)
Only |
PiperOrigin-RevId: 224416833
Protobuf has been failing due to its repository having dependencies. Downloading the .tar.gz form GitHub doesn't work because it does not bring its dependencies with it.
This PR introduces a function to clone a repository, initializa and update its submodules. The function is used to download protobuf as a repository dependency, rather than just a file.
The function is also implemented in a generic way, so if in the future other dependencies fall into the same situation, it can be reused.
With these changes,
tensorflow/workspace.bzl
goes back to using the commit sha inPROTOBUF_URLS
andPROTOBUF_STRIP_PREFIX
, rather than the tag of a release.A command at the end of the
download_dependencies.sh
script was commented out. The comment says for it to be removed once protobug is fixed. Perhaps no longer necessary.