IRC logs for #buildstream for Friday, 2020-06-26

*** benschubert has joined #buildstream07:22
*** tristan has quit IRC07:36
*** tristan has joined #buildstream07:41
*** ChanServ sets mode: +o tristan07:41
douglaswinshipHas anyone seen build failures like this? https://hastebin.com/aqovorafup.md07:48
douglaswinship(See the failure at the end)07:49
douglaswinshipNormally, when something fails to build, buildstream gives an interactive menu, and you get the option to view logs / drop into a shell / etc. But this time, nothing. It just finishes cleanly. I didn't even notice it was failing, at first.07:49
tristandouglaswinship, That appears to be a cached failure07:51
tristanI.e. BuildStream did not fail, it encountered a failed build element in the cache07:51
tristanI'm not sure if this is a bug or not07:51
douglaswinshipI'm a little confused. Does "a failed build element in the cache" just mean that it has a record in the cache of a build that didn't build successfully? Because that happens all the time, and doesn't look like this.07:52
tristanIt looks like this to me07:54
tristan      failed c7184f3b8c6612b9e23c99c8d16b6e21ee79b10563c23c345e067f5578e61431 bsp/raspi/linux.bst07:54
tristanLast line of the element summary, printing elements before the session starts07:54
tristandouglaswinship, I'm not completely up to speed on what is supposed to happen with failed elements, some of this happened a while ago and was redefined over time07:55
tristandouglaswinship, I have a suspicion though07:55
tristanSince I'm not seeing a "--retry-failed" or similar option, I'm guessing that the expected UX is for the build to not happen, but you end up in an interactive shell for that element07:56
tristanYes, abderrahim[m] indeed has a patch which will fix the horrible hacks which make this happen07:56
tristanI.e. it's still supposed to happen, but it was implemented in such a way that makes your skin crawl, with access violations all over the place07:56
tristandouglaswinship, So here is my suspicion: That is broken when the failed element is the ultimate target07:57
tristani.e. *perhaps*, the expected UX only kicks in when the failed element is a dependency, not the target07:57
abderrahim[m]douglaswinship: please give it a spin https://gitlab.com/BuildStream/buildstream/-/merge_requests/1970 I think it should fix your issue07:58
abderrahim[m]Unless you're running in non interactive mode07:59
abderrahim[m]Which is #133507:59
abderrahim[m]tristan: I originally set out to fix this issue, and the horrible hacks got in my way08:03
abderrahim[m]So I got rid of them08:04
douglaswinshipWill do, but I think I'm still lost on what you mean by a failed element. In normal day to day operations, if I put a bad line of code into a bst file (say.. in the build-commands), then the element won't build, and I get the list of menu options. Is that all you mean by 'failed element'?08:08
douglaswinshipbecause that gives me a different result. I get the interactive list.08:09
tristanabderrahim[m], :)08:12
benschubertdouglaswinship: if your build fails, and is pushed to the cache, BuildStream will not retry it. Since in theory everything is repeatable and you would get the same result anyways. There are two things:08:12
benschubert1) We want to allow forcing the retry, since there are cases where an operation could fail for a random reason (Like fetching from the internet might fail more than 3 times), that's abderrahim[m] MR08:12
benschubert2) If you don't have a remote cache and delete your element locally, you can then rebuild it easily08:12
tristandouglaswinship, I'll just add that the reasoning behind caching the failed build is that it could happen remotely08:14
tristandouglaswinship, So when your build fails on some CI service like gitlab or whatever, you should be able to debug the build locally without having to build anything, inspect the logs, get the `bst shell` experience of the state of the failed build08:14
tristanbenschubert, Is there a benefit to having functions not on classes with cython ?08:15
benschuberttristan: not AFAIK08:16
tristanSo if _expand_var() https://gitlab.com/BuildStream/buildstream/-/blob/master/src/buildstream/_variables.pyx#L275 were a Variables method, that in itself would not cause a performance hit08:17
douglaswinshipOh... wow. I never noticed that before. I guess I never tried rebuilding the exact same element twice, before. I suppose I always tweaked something before I tried again.08:17
tristanOk, was just curious why things were layed out that way, passing around the `content` dict when it's readily available on the Variables instance08:17
benschubertI don't *think* so, but it might be subtly different, though I don't expect a real different08:18
douglaswinshipIn that case, I guess the thing I pointed out was just normal behaviour. I just need to dig in and research the build failure08:18
tristandouglaswinship, no, it's the issue I said, and abderrahim[m] confirmed08:18
benschuberttristan: the reason is: it was like that before I converted it to Cython, and I did a 'straight' port to avoid too many problems. We can for sure refactor and make it better08:18
tristandouglaswinship, if the failed element was not the target (and one of the dependencies), then the imperative of building the target would have caused you to get a failed build UX (without actually rebuilding)08:19
tristanbenschubert, thanks for confirming :)08:19
tristanI was worried about changing that08:19
tristanI'm wondering if it's worth doing the whole _resolve() thing at instantiation also08:21
tristanIf we're going to resolve/expand variables lazily instead of all in __init__(), we could be equally lazy about populating PARSE_CACHE08:22
benschubertthat's also true, but would we need it?08:22
tristanI don't know if it would hurt mostly08:22
tristanMaybe an iteration over the initial dict is overall cheaper than multiple hash lookups08:23
benschubertthat's what I would think08:23
benschubertsince in theory we would access everything08:24
benschubert(since I don't expect users to have hundreds of unused variables)08:24
tristanWell08:29
tristanI do08:29
tristanbenschubert, The Variables instance is one per element, I would guess that each element uses a small percentage of the amount of variables in it's context08:30
benschubertah good point08:30
tristanThat said, if we do want to perform validation on unused variables, we're going to traverse them anyway08:31
benschubertYep08:31
tristanAnd of course, there is a lot of reuse in the PARSE_CACHE08:31
benschubertIf we ensure variables are resolved, there is no way we can't check all of them08:31
tristanstill hash lookups, but still a lot of reuse08:31
*** santi has joined #buildstream08:43
WSalmonI notice that people are still using the old ML list, are we not encouraging people still using the old one to use the new one? tristan Frazer08:49
tristanWSalmon, I'm going to cut it off but I was hoping for traffic to die off first, it's in the works09:00
tristanBetter not to shut it down in mid-conversation09:00
WSalmoni meant more a gental nug than a shut off09:03
tristanFeel free to nug if you wish09:12
tristanI announced that there would be a shutdown, the plan is to have a custom bounce message which indicates the new list09:12
tristanit should have happened by early this week but I'll let it slide into the weekend09:13
douglaswinshipCan't remember if I've raised this before, but does anyone know how to get around the problem that cmake can't find gRPCConfig.cmake, when installing buildbox-common?09:17
douglaswinshipI've been using a docker container for buildstream 1.93.4, to get around worrying about things like this.09:17
douglaswinshipNow i'm trying to go through the actual installation process09:18
douglaswinshipWhen I run "cmake -DBUILD_TESTING=OFF -Bbuild", i get the complaints about gRPCConfig.cmake not being found.09:19
douglaswinshiphttps://hastebin.com/alawaxikex.rb09:19
coldtomdouglaswinship, my first guess would be missing some sort of grpc-dev package from your distribution09:21
WSalmondouglaswinship,  why not look at something like https://gitlab.com/celduin/crash/docker-images/-/blob/master/dockerfiles/dockerfile.buildstream209:21
douglaswinshipWSalmon: if you mean the list of commands that's contained there, then I think i've run all of those already. (Or at least the updated versions from https://buildstream.build/buildbox_install.html).09:23
douglaswinshipI'll inspect thoroughly though to see if I've missed anything09:23
douglaswinshipcoldtom: I wouldn't be surprised. But I don't know what i'd be missing.09:24
WSalmonalso if you need a custom docker image for testing you could just tweak and build that docker image..09:24
WSalmonanyone can clone and build that locally09:25
douglaswinshipI shall definitely look into that09:26
*** tomaz has joined #buildstream09:28
tristanHmmm, we don't even have provenance in unresolved variables ??09:40
tristanOdd09:41
tristanI was sure we had that09:41
FrazerWSalmon  tristan I don't mind moving to a new ML. But in the CONTRIBUTING docs, it will need updating to whatever the new one is, and the docs seem to have broken :ref: links https://gitlab.com/BuildStream/buildstream/-/blob/master/CONTRIBUTING.rst09:41
tristanYes, it's on the TODO list, as well as wiki, bla, bla, bla... all the stuff I have to do earlier this week which is still pending09:41
tristanPart of the announcement I made last week points out that in the (short as possible, already delayed) interim one week period, I would have to go and update all the references to the list09:42
tristanOk we do have provenance, not everywhere though09:44
tristanSome errors fail to provide provenance09:44
tristan_check_variables() does it though09:44
*** tristan has quit IRC09:55
*** phildawson has joined #buildstream10:05
*** tristan has joined #buildstream11:38
*** ChanServ sets mode: +o tristan11:38
tristanMhmmm, no yield/generators in cython12:38
*** tristan has quit IRC12:52
benschuberttristan: no :) And we should generally not use those in performance-critical paths, the change of context is quite costly13:10
*** Frazer has quit IRC13:18
*** cphang has quit IRC13:18
*** Frazer has joined #buildstream13:19
douglaswinshipwhat's the bst1 version of "bst artifact delete"?14:47
WSalmonim not sure it was ever back ported14:48
douglaswinshipDamn14:48
coldtommanually deleting the reference from the cas14:48
douglaswinshipwon't it then try to fetch from the remote though?14:48
douglaswinshipI'm trying to write some updates for plugins14:49
douglaswinshipif I don't change the key, it won't rebuild14:49
douglaswinshipI guess i just answered my own question. I can change the key while testing. Then change it back.14:49
coldtomah, whenever i've done plugin dev i keep incrementing the format version to get rebuilds until i'm done14:49
douglaswinshipyeah, I think that was the advice you gave me, way back when I was first working on release_url_manifest14:50
douglaswinshipI better undertand why it works, now :)14:50
douglaswinship*worked14:50
douglaswinshipbecause the format version was included as part of the unique cache key14:50
douglaswinshipCome to think of it... I should be incrementing the version number anyway.14:54
WSalmonhow do i ask bst not to pull? --fetchers 0 seems not to effect pulling?14:59
WSalmonhow do i ask bst not to pull? `--fetchers 0` seems not to effect pulling?15:00
coldtomWSalmon, for master use `-r blah`15:05
coldtomwhere "blah" is anything that won't resolve as a url15:05
douglaswinshipin the bst 1 plugin API: get_public_data seems to return a dict, rather than a node.15:36
douglaswinshipI can't call "node_subst_vars" on a dict element.15:36
douglaswinshipDoes variable substitution happen automatically, before I get the dict element?15:36
douglaswinshipOr do I have to take care of substitutions beforehand?15:38
coldtomdouglaswinship: https://gitlab.com/BuildStream/bst-external/-/blob/master/bst_external/elements/collect_integration.py#L92 is an example of doing something similar to this15:42
douglaswinshipthanks15:42
coldtomyou can treat the dict as a node of yaml, and you can call node_subst_member for members of the dict15:42
juergbiin bst master variables are expanded implicitly beforehand15:43
douglaswinshipthanks15:48
*** tristan has joined #buildstream16:00
*** ChanServ sets mode: +o tristan16:00
*** santi has quit IRC17:46
*** xjuan_ has joined #buildstream17:57
*** tomaz has quit IRC18:59
*** phildawson has quit IRC23:00

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!