--
You received this message because you are subscribed to the Google Groups "infra-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to infra-dev+...@chromium.org.
To post to this group, send email to infr...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/infra-dev/CAATLsPbQqamS64RFihz-yD22QfAN_h3zb6hiYhcGxumrtPOxiw%40mail.gmail.com.
`ninja all` builds all targets, while just `ninja` builds the default target. The default target currently happens to be 'all' for all platforms, but that wasn't always the case (it used to be less than 'all' on the Android bots for a while, for example.)The correct thing for bots that want to build everything is to invoke ninja without an explicit target. Maybe some branch in the recipes code thinks that "no explicit build targets" means "no build targets" instead of "default list of build targets" and early exits?
Somewhat in the same vein, I noticed that a compile bot failed to identify a compile problem I introduced, because it only compiled all test targets instead of the default target on a change that affected all code: http://crbug.com/544571 It feels like if analyze hits an exclusion, it should build the default target too (see that bug). That would probably resolve both these bugs?
On Sat, Oct 17, 2015 at 10:12 PM, Nico Weber <tha...@chromium.org> wrote:`ninja all` builds all targets, while just `ninja` builds the default target. The default target currently happens to be 'all' for all platforms, but that wasn't always the case (it used to be less than 'all' on the Android bots for a while, for example.)The correct thing for bots that want to build everything is to invoke ninja without an explicit target. Maybe some branch in the recipes code thinks that "no explicit build targets" means "no build targets" instead of "default list of build targets" and early exits?Why do you think running 'ninja' is preferable to 'ninja all'? Do you want to make sure we don't break the 'default' == 'all' logic, or do you think the extra four characters are redundant, or something else?
(My general inclination is that 'ninja all' is slightly clearer, but I don't feel super-strongly about this).Somewhat in the same vein, I noticed that a compile bot failed to identify a compile problem I introduced, because it only compiled all test targets instead of the default target on a change that affected all code: http://crbug.com/544571 It feels like if analyze hits an exclusion, it should build the default target too (see that bug). That would probably resolve both these bugs?I'm not sure I agree with suggestion in that bug. You could just as easily say that we should always build every target affected by a change, not just the test targets, but we don't do that now. Would you change that as well?
On Mon, Oct 19, 2015 at 12:00 PM, Dirk Pranke <dpr...@chromium.org> wrote:On Sat, Oct 17, 2015 at 10:12 PM, Nico Weber <tha...@chromium.org> wrote:`ninja all` builds all targets, while just `ninja` builds the default target. The default target currently happens to be 'all' for all platforms, but that wasn't always the case (it used to be less than 'all' on the Android bots for a while, for example.)The correct thing for bots that want to build everything is to invoke ninja without an explicit target. Maybe some branch in the recipes code thinks that "no explicit build targets" means "no build targets" instead of "default list of build targets" and early exits?Why do you think running 'ninja' is preferable to 'ninja all'? Do you want to make sure we don't break the 'default' == 'all' logic, or do you think the extra four characters are redundant, or something else?Yup, those two.(Also, 'all' currently isn't all targets in gyp, but neither is the default target, so that's mostly an independent discussion: https://code.google.com/p/chromium/issues/detail?id=503241)
(My general inclination is that 'ninja all' is slightly clearer, but I don't feel super-strongly about this).Somewhat in the same vein, I noticed that a compile bot failed to identify a compile problem I introduced, because it only compiled all test targets instead of the default target on a change that affected all code: http://crbug.com/544571 It feels like if analyze hits an exclusion, it should build the default target too (see that bug). That would probably resolve both these bugs?I'm not sure I agree with suggestion in that bug. You could just as easily say that we should always build every target affected by a change, not just the test targets, but we don't do that now. Would you change that as well?There should be some try bot that makes sure that all targets build fine. On the main waterfall, the clobber bots do this, but those don't do debug builds. So having the compile_dbg builds do this on the main waterfall would make sense to me.
Thanks for commenting, Nico.Based on your rationale, it's still unclear to me why you decided to revert https://codereview.chromium.org/1370213002 .
I can see "extra four characters that are redundant" as a legitimate preference, but I don't see it as severe enough to revert otherwise good CLs.I was not aware of the second reason, i.e. to keep "default == all" behavior working. It seems a separate issue for me though (and is handled in a separate bug as mentioned above, https://code.google.com/p/chromium/issues/detail?id=503241). We can consider various solutions for that, possibly adding a separate recipe just for that case (arguably it doesn't fit well in existing chromium/chromium_tests design). I don't see any reason to conflate testing for that behavior with FYI clang bots.
On Tue, Oct 20, 2015 at 5:40 AM, Paweł Hajdan, Jr. <phajd...@chromium.org> wrote:Thanks for commenting, Nico.Based on your rationale, it's still unclear to me why you decided to revert https://codereview.chromium.org/1370213002 .It didn't help, our bots were still red even with that change. So I wanted to revert https://codereview.chromium.org/1376453002/ (which added "Misconfigured bot: no compile targets" to almost 50 bot json files – I'm still baffled how this could land in the first place) via the web interface, and that was a prerequisite. (Reverting via web interface ended up not working for the second CL.)I can see "extra four characters that are redundant" as a legitimate preference, but I don't see it as severe enough to revert otherwise good CLs.I was not aware of the second reason, i.e. to keep "default == all" behavior working. It seems a separate issue for me though (and is handled in a separate bug as mentioned above, https://code.google.com/p/chromium/issues/detail?id=503241). We can consider various solutions for that, possibly adding a separate recipe just for that case (arguably it doesn't fit well in existing chromium/chromium_tests design). I don't see any reason to conflate testing for that behavior with FYI clang bots.`ninja -C out/Release` is how the project has built all targets for years, so that's what these bots do.
I'm glad we're having this discussion. You brought up some facts I was not aware of. Let me comment on them.1. I didn't know compiling "all" didn't work on the clang builders. Could you point me to an example failing build? What I could find is http://build.chromium.org/p/chromium.fyi/builders/ClangToTLinux/builds/2961 was the last build on that builder failing with "Misconfigured bot: no compile targets" error, while the next one - http://build.chromium.org/p/chromium.fyi/builders/ClangToTLinux/builds/2962 - compiled "all" and passed.1a. There seems to have been an unrelated breakage very close in time, see e.g. http://build.chromium.org/p/chromium.fyi/builders/ClangToTLinux/builds/2965 . However, at that point the bot was no longer passing any targets to ninja, and the compile error was "ninja: error: '../../content/telemetry_gpu_unittests.isolate', needed by 'telemetry_gpu_unittests.isolated.gen.json', missing and no known rule to make it".2. Looks like your comment about people not replying to your questions refers to me. Sorry about that. Unfortunately I'm behind on bugmail, and because of overload I also ignore comments on closed CLs, especially in cases where I'm not reviewer. I don't want to blame you - just wanted to say I'd happily help you say on infra-dev thread or on my @google.com email - or an IM ping.Finally, I'd like to check - can we give it a try to make FYI clang builders build "all"? There's no way to test such a change before committing as far as I know, but I could do that e.g. early Europe working hours (~midnight PST) and watch the bots to minimize disruption. I'd obviously seek your sign-off on the CL before making any changes to your bots.
As I said, I don't consider bots that build the default target to be misconfigured.
I'd strongly prefer if you could find a way to do what you want to do that didn't require breaking the way these bots have worked for years.
I usually look at http://build.chromium.org/p/chromium.fyi/console?category=win%20clang
http://build.chromium.org/p/chromium.fyi/builders/CrWinClang/builds/4278/steps/compile/logs/stdio seems to build both "all" and "crash_service" – do you know where "crash_service" comes from? I'm guessing that's from https://code.google.com/p/chromium/codesearch#chromium/build/scripts/slave/recipe_modules/chromium_tests/api.py&l=329 which seems to be not in line with the "we don't want special cases in the recipes code" philosophy.
But since that's already there, can we please not add crash_service as an explicit build target if either a) one of the build targets is already 'all' or b) add_tests_as_compile_targets is set?
-- Dirk
On Mon, Nov 16, 2015 at 11:05 AM, Dirk Pranke <dpr...@chromium.org> wrote:On Mon, Nov 16, 2015 at 10:44 AM, Nico Weber <tha...@chromium.org> wrote:I usually look at http://build.chromium.org/p/chromium.fyi/console?category=win%20clang
http://build.chromium.org/p/chromium.fyi/builders/CrWinClang/builds/4278/steps/compile/logs/stdio seems to build both "all" and "crash_service" – do you know where "crash_service" comes from? I'm guessing that's from https://code.google.com/p/chromium/codesearch#chromium/build/scripts/slave/recipe_modules/chromium_tests/api.py&l=329 which seems to be not in line with the "we don't want special cases in the recipes code" philosophy.Correct, that's where it comes from. Unfortunately, there's no good other way at this time to get the behavior we want,which is to make sure that 'crash_service' is always built if we need to run tests.So, yeah, we don't like special cases, but I haven't thought of a good way to not have one for this.But since that's already there, can we please not add crash_service as an explicit build target if either a) one of the build targets is already 'all' or b) add_tests_as_compile_targets is set?We could probably not add crash_service if 'all' is in compile_targets.add_tests_as_compile_targets should probably go away; it would be better to have the bots that want that pass 'all' inas part of additional_compile_targets. Or, have a separate 'build_all' flag to be explicit (maybe that's the intent of'add_tests_as_compile_targets': False, but if so it seems like 'build_all' would be a clearer name).Pawel added an explicit "all" to the clang/win bots. Previously, this had the side effect of adding "all" to the build line but also so adding the 50 explicit targets added for tests, which makes it very easy to miss the "all" in there, and it also seems like bad UI to me.
What Pawel and I agreed on medium-term was that eventually we'd give a long list of targets to analyze and analyze then hands back what needs to be built, and since analyze knows about The Build, it would be in a good position to hand back just "all" if that's among the inputs. But until that's done, add_tests_as_compile_targets is what's supposed to prevent these very long build lines.
I don't care much about how that flag is called, but I do care that the ninja invocation doesn't pass anything but "all" (or possibly even nothing, but "all" seems ok).
doesn't seem to have any explicit compile target yet either, so that bot and probably all iOS bots (since that bot just uses the normal iOS recipe) will likely die when you reland this. So maybe check the iOS bots first.
Other than that, sounds good. Thanks for your patience!
On Mon, Nov 23, 2015 at 4:43 PM, Nico Weber <tha...@chromium.org> wrote:doesn't seem to have any explicit compile target yet either, so that bot and probably all iOS bots (since that bot just uses the normal iOS recipe) will likely die when you reland this. So maybe check the iOS bots first.That bot uses a different recipe, ios/unified_builder_tester .Also, since src-side JSON files can only add compile targets, my reasoning is that if a bot is not flagged by test expectations for above CL, we can be sure it's not affected.Other than that, sounds good. Thanks for your patience!Cool.Do you consider the comments on https://codereview.chromium.org/1472893002 blocking?
On Mon, Nov 23, 2015 at 11:27 AM, Paweł Hajdan, Jr. <phajd...@chromium.org> wrote:On Mon, Nov 23, 2015 at 4:43 PM, Nico Weber <tha...@chromium.org> wrote:doesn't seem to have any explicit compile target yet either, so that bot and probably all iOS bots (since that bot just uses the normal iOS recipe) will likely die when you reland this. So maybe check the iOS bots first.That bot uses a different recipe, ios/unified_builder_tester .Also, since src-side JSON files can only add compile targets, my reasoning is that if a bot is not flagged by test expectations for above CL, we can be sure it's not affected.Other than that, sounds good. Thanks for your patience!Cool.Do you consider the comments on https://codereview.chromium.org/1472893002 blocking?Not having expectations files that say "This bot is broken!" for production bots seems like a good thing. If the recipes move will take a long time, maybe we could have a whitelist of bots with mock testing/buildbot entries in the recipes test code?