Clean bazel all_files targets#15368
Conversation
|
Can one of the admins verify this patch? |
|
jart
left a comment
There was a problem hiding this comment.
I don't understand this change. //tensorflow:all_opensource_files is a remnant of our old sync process, which we haven't had time to delete. There appears to be a couple small uses of it remaining, which can easily be removed.
|
@jart The tests of PR #15166 match the lines inside some text files against the total directory structure to spot invalid paths as well as ring bells on non-existent but expected entries. To do so, I have included If you have a way at hand to access (a summary of) the directory structure (file contents not needed), I am of course all open ears. |
|
@tensorflow-jenkins test this please |
|
@jart I don't believe :all_opensource_files can be removed, or at least I don't know how. I thought that there are still rules that require data access to all files. Maybe this has changed? |
|
The way I'd go about removing it, is by changing This would bring some small benefits aside from cleanup. For example, The So if we're 100% on board with Copybara, removing should be doable with some toil. |
|
The point of the check_futures_test is that it can check files that you have not thought about. So unless we have a global target which is guaranteed to include all python files, I don't see how we can replace all_opensource_files for it. And since bazel hides anything inside a directory with a BUILD file, all BUILD files must have their own target. |
|
I now understand what you meant. As far as the For example, on the TensorBoard team, we went along with the Copybara vision of just running these sorts of tests and tools independently of Bazel, and therefore don't include |
|
That would be great solution -- we can add these tests to sanity, where we already run a bunch of unrelated test outside of bazel. |
|
Jenkins, test this please. |
|
Test failure |
|
Jenkins, test this please. |
|
@martinwicke We should make e.g. |
|
I agree. We can probably make anything currently relying on all_opensource_files into a check run in sanity. That already contains a function to get all changed python files, so running a regex over those to check for the future imports should be super-easy. I'd love a PR for that. |
|
I disagree. If @yifeif can move makefile to not use all_opensource_files, I am ok with what @martinwicke suggests. |
|
The futures check should be very fast (much faster than, say, pylint: it only check for the existence of from future import lines in all changed python files). I hadn't considered makefile -- why does that rely on all_opensource_files? |
|
It is due to the new infra. All makefile build is wrapped in a bazel target. |
|
Are we talking about wrapping makefile build output with bazel? The bazel part doesn't use all_opensource_files. |
|
I am removing the dep to |
Broken out of #15166