Bazel checking targets excluded by test_filters?

185 views
Skip to first unread message

Martin Wicke

unread,
Apr 23, 2019, 1:36:02 PM4/23/19
to bazel-discuss, Haoyu Zhang, Dan Moldovan, tensorflow-devinfra-team
We have a test target with a tag that should be excluded from a build using --test_tag_filters (I have checked that its tag is in fact in the exclusion list, and that the command is indeed a bazel test command in the log, look for "test_tag_filters").

However, it seems that it is at least checked (which is causing trouble: https://buganizer.corp.google.com/issues/131156730), and the build fails.

I am wondering whether this is expected behavior? This is using bazel 0.19, so it may well be old news.


Günhan Gülsoy

unread,
Apr 23, 2019, 1:38:50 PM4/23/19
to Martin Wicke, bazel-discuss, Haoyu Zhang, Dan Moldovan, tensorflow-devinfra-team
I did not check the build logs, but is it possible this is a build failure?
If it is, I think we also need to set build_tag_filters.

--
You received this message because you are subscribed to the Google Groups "tensorflow-devinfra-team" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tensorflow-devinfr...@google.com.
To post to this group, send email to tensorflow-d...@google.com.
To view this discussion on the web visit https://groups.google.com/a/google.com/d/msgid/tensorflow-devinfra-team/CADtzJKMi3bkBAmU7yCNVS7uQZDLku5yYOL43LWu0hPBDfMjAqQ%40mail.gmail.com.

Martin Wicke

unread,
Apr 23, 2019, 1:42:32 PM4/23/19
to Günhan Gülsoy, bazel-discuss, Haoyu Zhang, Dan Moldovan, tensorflow-devinfra-team
It is definitely a build failure (prerequisite file not found). 

I had imagined that bazel would make a list of targets to test (which would not include this one), and then go build those it needs to build. And that would mean it would never try to build this target. 

Haoyu Zhang

unread,
Apr 23, 2019, 1:45:33 PM4/23/19
to Martin Wicke, Günhan Gülsoy, bazel-discuss, Dan Moldovan, tensorflow-devinfra-team
Hah that makes sense. It seems that we do apply the build_tag_filters to all the GPU nightly builds but not for the CPU ones, and that's probably why all the GPU builds are fine while all other builds failed...

Martin Wicke

unread,
Apr 23, 2019, 1:52:07 PM4/23/19
to Haoyu Zhang, Günhan Gülsoy, bazel-discuss, Dan Moldovan, tensorflow-devinfra-team
I think think bazel should never attempt to build this target, so I still am wondering why this happens.

Günhan Gülsoy

unread,
Apr 23, 2019, 1:54:41 PM4/23/19
to Martin Wicke, Haoyu Zhang, bazel-discuss, Dan Moldovan, tensorflow-devinfra-team
I am pretty certain bazel tries building without the build_tag_filters flag.
We ran into this problem before, and had to add it everywhere, including internal builds.
What bazel *should* do, is a discussion I will leave to the bazel team.

Martin Wicke

unread,
Apr 24, 2019, 12:10:04 PM4/24/19
to Günhan Gülsoy, Haoyu Zhang, bazel-discuss, Dan Moldovan, tensorflow-devinfra-team

Jingwen Chen

unread,
Apr 24, 2019, 12:24:04 PM4/24/19
to Martin Wicke, Günhan Gülsoy, Haoyu Zhang, bazel-discuss, Dan Moldovan, tensorflow-devinfra-team
The flag to disable building non-test targets is --build_tests_only.

You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CADtzJKPzfdUrfMA9Cupgw4sa5RTDqhAB1R9BRcdxS8mAr22nLA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Martin Wicke

unread,
Apr 24, 2019, 12:36:58 PM4/24/19
to Jingwen Chen, Günhan Gülsoy, Haoyu Zhang, bazel-discuss, Dan Moldovan, tensorflow-devinfra-team
This is a test target though -- it was a sh_test. Bazel plainly should not build it, since it won't run it.
Reply all
Reply to author
Forward
0 new messages