IRC logs for #buildstream for Tuesday, 2019-03-19

*** swick has quit IRC01:06
*** swick has joined #buildstream01:09
*** nimish2711 has quit IRC02:17
*** swick has quit IRC02:18
*** swick has joined #buildstream02:22
*** nimish2711 has joined #buildstream03:05
*** nimish2711 has quit IRC03:11
*** tristan has joined #buildstream04:55
*** benschubert has quit IRC05:17
*** tristan has quit IRC07:28
*** tristan has joined #buildstream08:43
*** toscalix has joined #buildstream09:09
*** benschubert has joined #buildstream09:19
gitlab-br-botjennis opened MR !1235 (jennis/track_is_overworking->master: Don't track unchanged refs) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/123509:19
*** rdale has joined #buildstream09:20
*** alatiera has joined #buildstream09:26
benschuberttristan: concerning https://gitlab.com/BuildStream/buildstream/merge_requests/1222#note_151827563 my only ocncern is that for people not familiar with the tests, creating a new file and seeing a warning about "cli" not being imported my throw them off :) I'm happy to change to disabling locally though :)09:30
*** raoul has joined #buildstream09:35
*** tpollard has joined #buildstream09:36
*** jonathanmaw has joined #buildstream09:41
*** swick has quit IRC09:48
juergbiKinnison: I think you're misreading the table. you're commenting on a January/February difference09:48
juergbior am I confused?09:49
Kinnisonjuergbi: oh am I?09:49
Kinnisondoh09:49
* Kinnison notifies the list of his incompetence09:50
raoulI also was thinking that09:50
* Kinnison sighs09:51
KinnisonFor some reason I was reading it as a twitter-style most-recent-at-the-top and entirely misread the date column as a result09:51
* Kinnison is going to blame the fact that his magic is currently leaking out of a hole in his left arm09:51
*** ChanServ sets mode: +o tristan10:17
tristanbenschubert, I understand, I think that a new developer writing a new test will hit the linter, and will see that other tests have disabled these - and that this (possibly frequent) experience will be less evil than the (possibly infrequent) experience of scratching your head and wondering why behavior is different, for instance asking yourself why the linter is not catching the unused imports which you think it should be catching10:17
tristanbenschubert, i.e. silent success feels more evil than loud false positives10:18
tristanif these were equal in weight, using the standard comments still saves us from having to carry the linter plugin at all, and having a simpler, more predictable setup also has value10:19
benschuberttristan: sure, I will remove the linter, and add the comments10:20
lchlanjonathanmaw: Hi, will you have some time today to do some reviews of benchmarking changes?10:31
jonathanmawlchlan: probably, how urgently do they need looking at?10:32
jonathanmawah, this is a hypothetical, not a "right now"10:32
lchlanjonathanmaw: Not  immediately urgent - but one of them is now of reasonable importance.10:34
lchlanhttps://gitlab.com/BuildStream/benchmarks/commits/lachlanmackenzie/AddTagToCleanupStage10:35
jennisWe have the --option option, which takes OPTION VALUE, should we expect this to be able to override aliases defined in the project.conf?10:57
tpollardcli has precedence over .conf10:58
tpollardnot sure about aliases specifically though10:58
jennisAhh Kinnison, has suggested a string option, set this as your alias value and then you can override that10:58
tpollardsounds sensible11:00
*** phildawson_ has joined #buildstream11:00
*** phildawson has quit IRC11:02
csorianohey all, I'm trying to build and generate a tarball for a gnome library called gnome-autoar11:05
csorianofor that, I did bst build, then entered a shell11:05
csorianoa build shell with bst shell --build core-deps/gnome-autoar.bst11:05
csorianohere, I expect make and make install to work as expected11:05
csorianohowever with make install I get a "read-only" file system11:05
csorianowhat's the expected workflow there?11:05
tpollardcsoriano: do you just want a tarball of the built output?11:06
csorianotpollard: for now yes, but I would also be interested in trying it for development of the library itself11:07
tpollardcsoriano: bst artifact checkout has a --tar option :)11:10
jennisYou can't define a string option, hmrf11:12
csorianotpollard: ah, so it would be bst build --tar?11:12
jenniscsoriano, `bst build core-deps/gnome-autoar.bst` and then, once it's built, `bst artifact checkout --tar sometarball.tar.gz core-deps/gnome-autoar.bst`11:14
csorianogotcha, thanks!11:14
csorianohow about if I want to develop it?11:14
jennisbst workspace open core-deps/gnome-autoar.bst11:15
csorianothe make install fails, that was my main issue11:15
jennisthen repeat the built and tarball checkout11:15
csorianosince it's a read-only system11:15
jennisso you've not been able to `bst build` it at all yet, I'd assume?11:16
csorianoI did11:16
csorianofwiw I'm following https://wiki.gnome.org/Newcomers/BuildSystemComponent11:16
jennisSo it just failed in the build shell?11:16
csorianoit says "To speed up development, you might wish to manually build your project rather than relying on bst build to do it for you. You may enter a build shell inside the build directory:"11:17
csorianobst shell --build sdk/gtk+-3.bst11:17
csoriano(in my case it will be gnome-autoar)11:17
csorianothen there I do the regular make; make install;11:17
csorianomake install fails because it tries to install in a read-only filesystem11:17
tristancsoriano, I dont think make install with an empty DESTDIR ever worked11:18
csorianowhat's the expected workflow there?11:19
tristanedit/compile/test with bst shell is still painfully slow11:19
tristanand mcatanzaro worked around this by playing inside a build shell11:19
tristancsoriano, the expected thing would be `bst workspace open`... and then `bst build` + `bst shell` after the build completes11:20
csorianoalright, so I guess that wiki documentation is slightly wrong11:20
tristanthen the shell has it installed11:20
csorianoright, I tried "bst build" after the first build too, but it took around 10 minutes since seems it fetches all deps again right?11:21
tristanIt's a bad example to do that with GTK+ :-S11:21
tristanI mean, something that you need not install, you might launch many times within the same shell11:21
tristanOr, you might use LD_LIBRARY_PATH tricks in there11:21
csorianoI see... that can be changed from the wiki too11:21
csorianowait, I'm talking about libraries, you need to install those11:22
csorianognome-autoar is a library for example11:22
csorianoit expects to be installed where things can use it11:22
tristancsoriano, Well, `bst build` need not do "--track-all" every time; so you shouldn't techinically need to refetch things until you want new versions of them11:22
*** nimish2711 has joined #buildstream11:22
csorianoah, that should work indeed11:22
tristanIt's mostly the large amount of seconds it takes to launch a shell which is quite annoying for an edit/compile/test cycle11:23
csorianoyou need to "bst shell" every time you build?11:23
tristan(can maybe be minutes if there are a lot of integration commands after staging too)11:23
tristanYes, the new shell will stage the new combination of outputs, including the workspaced build11:24
tristanit's painfully slow to do, though11:24
jonathanmawlchlan: reviewed benchmarks MR 2711:24
csorianoI see...11:24
tristanWe need to make integration commands only run when needed (that is a hard problem); staging is rather fast enough11:25
tristanCaching should be part of the solution11:25
* csoriano wonders whether this is a good fit for currently contributing to GNOME libraries11:26
gitlab-br-botraoul.hidalgocharman opened MR !1238 (raoul/source-key-fix->master: Source key fix) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/123811:27
csorianoand the trick with "bst shell" that you talked about kinda works?11:27
csorianoI wonder if we could document that better, and use that until caching and such is in place11:28
tristanI'm trying to think if we could have a read/write slash in that shell; that might help, but also slows things down11:30
tristanthe thing about read-write slash is we need a fuse layer there11:30
*** phildawson_ has quit IRC11:34
*** phildawson_ has joined #buildstream11:35
csorianolet me try a few bst builds + bst shell, maybe it's not as slow11:42
csorianoin general I think it's better a slow process and a half-time broken process (as we had with jhbuild)11:42
tristancsoriano, I tend to agree and hope you have a better experience; mcatanzaro was developing webkit after all, which is really one of the highest bars to pass12:01
tristaneven with incremental builds, its damn expensive and time consuming :-S12:02
WSalmonfor developing a libary i thought the best way to go was to make a workspace then build some app that depends on it with weak cache keys set, then make the change in workspace and rebuild then run the app you are testing your lib with with bst shell ?12:02
tristanBut I do suspect that we have too many integration commands inherited from freedesktop-sdk12:02
tristanWSalmon, yeah (that's called non-strict mode)12:03
*** raoul_ has joined #buildstream12:03
tristanWSalmon, if you were at the last GUADEC you would recall that Michael Catanzaro pointed out that it was just too slow12:04
tristanWSalmon, and he's right, when it comes to developing Epiphany web browser and hacking on WebKit builds... it does as you would expect, but launching the shell can take minutes12:04
*** raoul has quit IRC12:04
tristanWhich... is damn annoying when you just added a printf() statement and want to know why something broke "right now"12:05
tristanI guess it's more similar to "Go rebuild your module on this build server which targets the right architecture, and then telnet over to the test hardware on your desk and put the binary on the machine, and restart the service"12:06
tristanrather than edit/compile/test on your host (in terms of speed)12:06
tristanWSalmon, I believe that with the optimizations done in master... and maybe some other effort to reduce how many integration commands we run... we will never be *as fast* as edit/compile/test on your host... BUT the features and security that we add will make it attractive enough for people to not mind that it takes a bunch of seconds more12:08
tristanThats the bar to aim for I think12:08
* tristan thinks that WSalmon was indeed at GUADEC now that he thinks of it :D12:09
WSalmontristan, you were righ the first time12:09
WSalmonwere we talking about caching the intergration in a similar way to how we cache the sources? so if you put the dep you are going to mess with last it can cache up to that point? we do some funny stuff with source's order. did that work just get pushed back or is there a issue with it?12:11
WSalmon*not cached source, but the way we stage them is order dependent i think12:12
tristanWSalmon, I have an idea that we could have a test session active, and we could keep that sysroot up to date "as we build", so we would not have to run integration commands and stage things again when running `bst shell`, we would just get the last cached thing12:13
tristanbut there are a lot of wholes in that plan12:13
tristanOne idea was to run integration commands *after* a build instead of before, which can actually improve performance when say, many things depend on the same stack12:14
WSalmondose the first fall under clever fuse magic we should do in the future?12:14
tristanHowever, whenever something depends on anything different, then integration would still have to happen before the build *also*, making things all around slower12:14
tristanWSalmon, Well... I think/hope that staging is not the bottleneck - running the integration commands is the heaviest12:15
tristanI suspect that with all the optimizations, even with full on fuse/BuildBox in master; staging will be faster than with 1.2.x12:16
juergbistaging is definitely faster when using buildbox-fuse as backend. however, build time will be slightly worse due to the FUSE overhead12:17
tristanWSalmon, So maybe we don't even need to cache an actual filesystem tree; but caching the results of integration commands (in whatever form) is rather what I was hoping could improve things12:17
juergbiintegration should be a lot faster, though, due to faster FUSE implementation12:17
tristanIt might be wise to have a cross-junction feature which says "This is my junction point" and take an integrated sysroot to depend on, only re-running the cross-junctioned integration commands at a later, explicit point in time12:18
tristanI don't know12:19
tristan(idea is not really junction related if you think about it, but still it's not a good idea)12:20
tristanBecause `bst shell` wants to "run" things, while many of the integration commands are not necessary for a build environment, they become important for running12:20
*** nimish2711 has quit IRC12:34
*** lachlan has joined #buildstream12:45
*** nimish2711 has joined #buildstream12:51
gitlab-br-botaevri opened (was WIP) MR !1236 (aevri/str_e->master: app.py: str(e) instead of "{}".format(e)) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/123612:55
*** nimish2711 has quit IRC13:01
*** nimish2711 has joined #buildstream13:02
*** raoul_ has quit IRC13:16
jonathanmawlchlan: thumbs-up for merge request 27, but I can't add an approval, and pushing the merge button won't work until merge conflicts are resolved13:20
tristanaevri, any reason to not just pass the provenance through _get_loader() as I did with _load_file() and friends ?13:33
aevriIt generates a bunch of fuss - have you seen my patch for that?13:34
* tristan looks :)13:34
aevri:)13:34
aevriI've done it both ways, for your viewing convenience13:34
tristanerr, same MR ?13:35
aevriyeah, earlier commit reverted13:35
tristanah yes13:35
aevriI said that in the MR too :D13:35
aevriAlso, I think in most other places folks seem to have re-raised - I found them when trying to replace with the context manager.13:36
tristanaevri, it's a bit wordy I admit13:36
tristanaevri, Is there not any chance that we screw things up with this context manager ?13:36
tristanI mean, what if we have recursed more than once here ?13:37
aevriYou'd get multiple things added to the context in that case, as it unwound the stack13:37
aevriI imagine that would be closer what we actually want13:37
tristanYeah obviously we'd want to protect against that ever happening13:38
aevriMy objection to my own MR would be that it introduces some mystery13:38
*** lachlan has quit IRC13:38
tristandon't know if you saw my last comment https://gitlab.com/BuildStream/buildstream/merge_requests/1233#note_151985984 yet13:38
aevriI'm not sure - if you are including something that includes something that includes something, I'd like the full stack to make it in there13:38
tristanI don't think so, and I doubt that the compiler is a shining example of the most human readable and user friendly error messages :)13:39
tristanaevri, i.e. I think that we know for sure that regardless of how you included something; the error of including that thing would happen anyway13:40
tristanif that is the case, then I would hope that I only get the information about the error13:41
aevriFor this context manager, I'm thinking you should only use it when you would otherwise have fed something down to be formatted into the error13:41
aevriI agree with your counter-examples - that's probably not the sort of thing we'd want13:41
tristanI think that passing down something else to be formatted into the error is an anti pattern, not something to encourage - well, in the case of the Loader it's all internal knowledge so that seems okay13:42
tristanaevri, i.e. I specifically only think it's not okay when you are giving a module information it shouldnt need to know about, or have access to13:42
aevri+1 I think we agree about not passing things down13:42
tristancan break encapsulation13:42
WSalmonjuergbi, tristan, if i soft reset a workspace, and then build the element then I  think it should do a build rather than just saying that its cached and only doing the full rebuild (inc configuration commands) the next time bst notices you have made a change in the workspace. i think the reset should act as a file change would, as you have done the reset for a reason, maybe your getting funny results and realised you should have soft reset for a13:43
WSalmonold change, etc....13:43
WSalmonhave i missed something?13:44
aevriYeah that would be a hard break, I think a softer kind of breakage happens when things start growing parameters to raise information upwards13:44
laurencereminder: the monthly team meeting is starting in 15 minutes over on #buildstream-meetings13:45
tristanaevri, so I actually think that for the stop-gap fix, I prefer the more wordy/noisy commit - it is explicit and we see what is going on (perhaps some different formatting could make it less messy but that's not such a concern for formatting a nice error)13:45
tristanaevri, my earlier question about recursion more than we need to, was actually specifically about this _get_loader() patch13:45
tristanaevri, I think it is actually possible that you get multiple provenances from different levels of junctions with this re-raise thing13:45
aevritristan, yeah I did see the recursion there too13:46
aevriIs it not better that you get nested provenance in the error?13:46
tristanNo13:46
tristanaevri, not unless you are explicitly catching it in some way and making the error better, I think13:46
aevriSo if it was somehow nested 10 deep, we'd only get the last bit of provenance - that seems less useful to me13:47
tristanIn this case, you would have foo.bst [line 1 column 10]: junction.bst:bar.bst [line 4 column 4]: something about the sub-sub project baz.bst not having a project.conf13:47
aevrihttps://www.irccloud.com/pastebin/EtKvUA7L/13:49
tristanaevri, we want to know where the error originated, and what the project.conf-less project is13:49
aevriDamn, wrong button - not sure how that shows in your client13:49
tristanaevri, I feel like in that specific case where if it is hard to find, it would be better for the code to know about it and provide a stack in the detail13:50
aevriYeah, we could do that13:50
tristanaevri, but prepended provenances into an error string is really bad form13:50
aevriAn alternative I considered would have used __cause__ to figure that stuff out.13:51
tristansounds like a fancy pythonic thing :)13:51
aevritristan, I think the formatting might be bad, but surely the extra information is good?13:51
tristaninteresting question13:52
aevriYeah, basically whenever you 'raise Blah from e' then your new exception gets 'e' as the __cause__13:52
tristanaevri, there is also the question of whether the sub-sub project is coaleased with an existing junction in the toplevel project13:52
aevriYou can follow that chain all the way back if you want. I didn't find a guarantee that we're "allowed" to do that by the standard yet though.13:53
aevritristan, not quite sure what you mean there by coaleased13:53
tristanaevri, i.e. when you depend on a project "foo" and your subproject depends on the same project "foo", you use a junction of the same name to ensure that they are the same version of the same project13:54
tristanaevri, in that case, the toplevel knows what that sub-sub-project is, even if it was indirectly reached13:54
aevriAh, a bit like the dreaded diamond dependency.13:54
tristanbut that is rather unimportant13:54
tristanWell, not really, I think the diamond is only dreaded in OO inheritance models :)13:55
tristanin software they occur everywhere13:55
tristan(I mean in build graphs)13:55
aevriI think there's always the philosophical question of whether it's the same base thingy though, and fun ensues if it isn't :)13:56
tristanaevri, So to cut this short: I agree that it can be useful information, I do think though that mechanical prepending of provenance through the stack does not really speak to the user13:56
tristanit would be nicer to always format errors which speak to the user directly13:56
aevriCool, I agree with that if we talking about applying it wider than I have in the MR.13:57
aevriI 'fixed' all the occurrences I found, so I'm not sure it would go much wider.13:57
aevriI agree about speaking to the user directly.13:58
aevriIf there were only some way to tack on useful things as it bubbles up. Perhaps I'll propose something that surely looks nice to the user, i.e. we don't get a long chain of 'a: b: c: d: thing'. Does that sound agreeable?13:59
laurencemeeting starting now14:00
laurenceover on #buildstream-meetings14:00
laurencenb all ^14:00
*** nimish2711 has quit IRC14:02
*** nimish2711 has joined #buildstream14:02
tristanaevri, As a side note, I think you might be stepping on how provenance was changed14:02
tristanaevri, note that provenance now *also* includes the junction through which it was included14:02
tristanaevri, maybe *that* can be extended so that there is a single provenance that is recursion friendly14:03
aevriI'm thinking:14:03
aevrisomething about the sub-sub project baz.bst not having a project.conf14:03
aevriThis was loaded from (most recent last):14:03
aevri     junction.bst:bar.bst [line 4 column 4]14:03
aevri     foo.bst [line 1 column 10]14:03
aevritristan: Yeah maybe, will add that to the list14:03
aevritristan: thanks14:04
*** raoul_ has joined #buildstream14:04
*** nimish2711 has quit IRC14:07
*** nimish2711 has joined #buildstream14:07
*** lachlan has joined #buildstream14:12
*** nimish2711 has quit IRC14:22
*** nimish2711 has joined #buildstream14:23
*** nimish2711 has quit IRC14:28
*** nimish2711 has joined #buildstream14:28
*** cs-shadow has joined #buildstream14:34
*** nimish2711 has quit IRC14:38
*** nimish2711 has joined #buildstream14:38
*** nimish2711 has quit IRC14:43
*** nimish2711 has joined #buildstream14:44
benschuberttristan: looking at https://gitlab.com/BuildStream/buildstream/merge_requests/1070#note_151834877, while I agree that reusing things is much better, in that case this mixes things up and puts a constraint here that has no meaning / wrong meaning for other stuff likes Sources.14:48
*** nimish2711 has quit IRC14:49
tristanbenschubert, You are adding 4 bytes on every instantiated element, while a counter already exists - I think it makes sense to use the existing counter unless we have a reason for it to be incompatible15:02
tristanbenschubert, I do see your point, but if clarity is all that is called for, we could also add a separate internal function on Element which just returns self._get_unique_id()15:02
tristanthe implementation could change at some further point if needed ?15:03
benschubert- 4 bytes + an indefinite number of bytes, ints are not 4 bytes in python :)15:03
benschubertMmh I would rather not add a new function, function calls have a cost :) But yeah ok, i'll make a good comment on top of Plugin to say it's used in elements so the ordering matters. Good for you?15:03
tristanHas the same drawbacks too afaics; if you run multiple pipelines instantiated in the same session, the second pipeline will not start at "1" or "0" either :)15:04
tristanbenschubert, yeah it *definitely* needs a big comment in plugin.py making it very clear that it is relied upon in this way15:04
* tristan thinks that was part of his comment on the issue15:04
benschubertok, so if you're fine with this I'll go for this. I'll rework it slightly too first15:05
* tristan has not caught up with the dozens of other comments15:05
juergbibenschubert: regarding the first commit, that does include indirect runtime dependencies (due to using the default recurse=True)15:05
juergbimaybe it still breaks something, though15:05
benschubertjuergbi: ah right15:05
benschubertjuergbi: the PR is quite complex already and there's a lot of stuff moving. Would be simpler to just merge the two commits, otherwise It's tricky to know where to put the stuff15:06
tristanI would definitely not like to include the pivot in mainline history15:07
tristanThe history that something else was tried doesnt need to land in mainline15:07
juergbiI don't see it as pivot but as incremental step15:07
* tristan has to go15:07
juergbiwhich means the two commits are each simpler than the combined one15:07
tristanjuergbi, Perhaps, if you like15:07
juergbibut I won't fight this. not such a big deal15:07
tristanMe neither actually - I do see it as a pivot15:08
benschubertjuergbi: tristan I'll see what's simpler for me to handle while addressing the comments then15:08
benschubertand merge or not at the end15:08
* tristan has been trying to make sure that we only do single level recursion though one simple function and we dont store recursive lists15:08
tristanI.e. we want a graph we can recurse in both ways over, then we can build on that for other reasons15:08
juergbihave you two had a chance to look at my suggested simplification?15:08
* tristan late... gotta go...15:09
benschubertI'll add fixups commits for every comment as it's simpler than modifying commits. Will squash at the end15:09
juergbitristan: true, saving the recursive deps is somewhat of a pivotal point15:09
benschubertjuergbi: for the no weak_cache_key?15:09
juergbibenschubert: I mean https://gitlab.com/BuildStream/buildstream/merge_requests/1070#note_15186240415:09
benschubertjuergbi: ah15:11
benschubertso15:11
*** tristan has quit IRC15:12
benschubertjuergbi: why do you have a "__reverse_key_updated" ?15:13
benschubert__reverse_deps_updated sorry15:13
juergbito only trigger it when the ready state actually changed15:13
benschubertwell, this can only happen once15:14
benschubertso why do we need to check?15:14
*** nimish2711 has joined #buildstream15:15
juergbithe change in readiness can only happen once but the same element might be in the priority queue multiple times over a whole session, afaict15:15
benschubertjuergbi: but then, we know if something has changed by checking the key before and after _update_state()15:15
benschubertalso "rdep.__remaining_runtime_deps_cache_keys_to_discover -= 1" needs to happen in _update_state15:16
juergbithat won't detect the case where the key is known for a while already but remaining runtime drops just dropped to 015:16
benschubertsince we are calling update_state in the pipeline, not recursively15:16
*** swick has joined #buildstream15:16
juergbiwell, the tests pass for my branch15:16
juergbido you have a scenario in mind that would break, or suspect where it would be slower?15:17
benschubertthen we have a bug in the tests15:17
juergbiwith the pipeline call, do you mean the initial update state?15:18
benschubertyes15:18
juergbibut that will anyway go over all elements15:18
benschuberttests/frontend/workspace.py::test_build_all, if we opened a workspace on elem2.bst, I think that would break15:18
juergbiah, I see what you mean15:18
benschubertjuergbi: basically, we need to tell our rdeps we are ready as soon as the cache_key is discovered15:18
csorianoonce a workspace is open, is it needed to close it and open again after a build?15:19
juergbicsoriano: no, incremental build is supposed to work15:19
csorianojuergbi: however, bst build needs to be executed outside that shell right?15:19
*** nimish2711 has quit IRC15:19
juergbiyes, you need to exit the bst shell but not close the workspace15:20
csorianoso you would have two terminals, one with the workspace open inside a bst shell, other doing the bst build15:20
csorianoI see, thanks15:20
*** nimish2711 has joined #buildstream15:20
juergbithe open shell will not be updated15:20
csorianoah wait, the workspace open is done only once right?15:21
csorianoso it downloads the git repo and sets somewhere in a config file that instead of the module frm buildstream it should use the local one15:22
juergbiyes, you normally open the workspace only once15:22
csorianook, thanks15:22
juergbiand you can keep it open as long as you want to work on that element15:22
benschubertjuergbi: do you see my point? I'm not sure how to test it though15:23
juergbiI'm not sure it really breaks anything, but maybe it would block some jobs longer than necessary15:24
juergbiwondering whether it would make sense to trigger the recursive update state during pipeline initialization instead15:25
benschubertjuergbi: if you try the test before and open a workspace on elem2, I think it blocks everything15:25
benschubertthe update_state will go through everything, I would not call it recursively here15:25
benschubertin addition, I think it would make splitting update_state after harder15:25
*** lachlan has quit IRC15:26
juergbibenschubert: hm, but the equivalent of update_state_recursively with the priority queue prefilled with the pipeline elements would work, wouldn't it?15:26
benschubertjuergbi: that would be slower, as we would try to add everything everytime to the queue15:26
juergbino, not everytime, only during pipeline init15:27
csorianojuergbi: but I need to close and open a bst shell everytime I build right?15:27
benschubertI mean for every iteration, every reverse dep would try to be added15:27
juergbibenschubert: we could split the function in two parts, one for the loop body and one for the rest15:27
juergbithe latter we could make a static method and add a parameter for the initial priority queue contents15:28
juergbiwell, don't even have to split the method for that15:28
juergbianyway, for pipeline init we call the method with all pipeline elements15:28
benschubertjuergbi: we would still need to check everytime we need to add something and we would fail15:28
juergbiotherwise we only call it with the relevant element as starting point15:28
juergbiwhat do you mean with "everytime we need to add something"?15:30
benschubertthe update_recursively adds every element that could be updated to the list15:30
benschubertso for each element, for each rdep, we would try adding it during the first run15:30
benschubertand I don't want that15:30
juergbii.e., you expect significant overhead due to that?15:31
juergbior would it conflict with future work?15:31
benschubertyep15:31
benschubertboth15:31
juergbihm :/15:32
*** raoul_ has quit IRC15:32
benschubertbecause for all non-build operations, we are doing this anyways and this will slow down every invocation of "show" for instance15:32
benschubertand I'd rather not do that15:32
benschuberthaving buildstream awefully slow for build is one thing, having it slower for any user interaction is worse15:32
benschubertso I would take the complexity hit there, rather than slow down stuff15:33
benschuberthowever, we can actually do it non recursively in _update_state i think15:33
juergbiit's just that the branch makes the already complex thing even more complex :/15:35
benschubertjuergbi: but allows for simpler simplification15:35
benschubertby having clearly defined change points15:35
benschubertmeaning we can remove update_state and update-state_recursively with less effort AND gradually15:35
juergbiwell, given that remaining deps is relevant in two places, I'm not so convinced about that yet15:35
juergbiand first adding more complexity makes it even harder to reason about further changes15:36
benschubertI disagree that the code is more complex with the changes, because we now have clearly defined boundaries15:36
benschubertand we can know what changes where15:36
benschubertand thus which action to take15:36
benschubertwhich is not the case when we are calling _update_state in every queue15:37
juergbiyes, I'm definitely in favor of that15:37
juergbican we maybe measure the performance hit of what I suggested above?15:38
juergbiI think not having unclear different invocations of update_state_recursively and non-recursive would help15:38
*** nimish2711 has quit IRC15:40
*** nimish2711 has joined #buildstream15:40
benschubertjuergbi: what I don't like with your change is that calling _update_state would result in a different behavior than update_state_recursively15:41
benschubertwhich it shouldn't15:42
benschubertand there are cases where we still need to not call it recursively (fetch_done)15:42
juergbibenschubert: that's the case with your branch as well, isn't it?15:42
benschubertjuergbi: the behavior is the same on my branch15:42
juergbiupdate_state() doesn't trigger update_state() on reverse deps15:42
benschubertjuergbi: yes15:42
juergbiwhile update_state_recursively() does15:42
juergbino15:43
benschubertbut calling update_state only will not break the counting15:43
benschubertwhich it would with your change15:43
juergbimy current patch might not decrement the counter early enough (still not sure whether it's an issue)15:44
juergbihowever, with the suggested change above, the idea would be that pipeline also calls update_state_recursively15:44
benschubertand I don't think that should be done, because looping over elements and updating the states is the behavior that we need there15:46
benschubertI understand it would be simpler15:47
benschubertbut it would add some overhead15:47
benschubertjuergbi: however, we can actually remove the recursion15:49
benschubertgah no we can't15:50
*** tristan has joined #buildstream15:50
benschubertmy concern in joining both at the same place is that they have different triggering mechanisms and different effects15:50
benschubertthey are conceptually different15:51
*** ChanServ sets mode: +o tristan15:59
tristanCoffee shop closed and went and obtained some dinner, I see there is a big conversation here15:59
juergbibenschubert: I'd be happy with two separate recursions if they were indeed orthogonal. but right now in the MR remaining deps counter is used in both recursions15:59
csorianoapart from build, can I run the tests? For example, I would check whether my tests are good with the changes I did16:00
csorianobasically, I'm not sure how to go from "bst build" to do more commong things like parameters to the build, tests, etc.16:01
tristancsoriano, For that you can use a --build shell (or you could add a `make check` to the element .bst file)16:01
tristancsoriano, make check commands were not added as a default in the hopes that we can parallelize this kind of test with reverse dependency builds16:02
csorianogotcha, thanks16:05
tristanActually, looking at __update_state_recursively(), it looks like again we are deviating from a simple function which handles one level at a time, I thought the point of the PQ was to order which deps get recursed into first; not to move the whole problem of building this list from one place to another16:07
benschuberttristan: not sure I get your point16:08
tristanbenschubert, enqueue_skiplevel() is building a queue which builds a list of what it's going to iterate into, and it appears to be recursive itself16:09
tristanI mean, wasnt the whole point of this pivot, to move the code towards something where we have a comprehensive one-level recursion which walks the tree ?16:09
tristanor graph rather16:10
*** nimish2711 has quit IRC16:10
benschuberttristan: yes16:10
*** nimish2711 has joined #buildstream16:11
benschuberthowever, we have a skip level iteration to do when runtime_only deps are involved16:11
benschubertand they can involve more stuff16:11
tristanbenschubert, So how come __update_state_recursively() doesnt call __update_state_recursively() ?16:11
benschubertbecause we can flatten and avoid recursive update16:11
benschubertwhich is more efficient16:12
tristan:-S16:12
benschubert?16:12
* tristan thought the point of this PQ was just to decide the order of which direct rdep to recurse into, not to build the whole list16:13
benschuberttristan: recursion is just a loop16:13
benschubertusing the PQ, we ensure we update elements only once16:13
*** raoul_ has joined #buildstream16:14
tristanI see what you're doing, it's not terrible; but I'm not sure how well this scales for other operations we might want to do reverse recursively either; also it's late and I dont have the energy16:15
tristanI just worry (a lot) that we are sacrificing simplicity too much16:15
benschubert" how well this scales for other operations we might want to do reverse recursively" what do you mean?16:15
tristanbenschubert, I mean it's a *lot* of code for the custom specific case of doing reverse dependency recursion for discovering the cache key16:16
benschuberttristan: how would you do it otherwise?16:17
tristanbenschubert, in the abstract, this is just a graph, now we are adding recursion in both directions, maybe there are other cases, will every case need this much code ?16:17
benschuberttristan: the other way around should just not exist, but that requires major rework. we need to take intermediate step or we won't be able to end up in a sane position16:17
*** nimish2711 has quit IRC16:18
tristanThere are two directions, iteration from target to leafs will always have relevance, now we add reverse iteration16:19
benschuberttristan: yes, reverse iteration is the only thing that should matter after building the pipeline anyways correct?16:21
tristanNope16:21
benschubertIn an ideal pipeline, not speaking about what we have now16:21
tristanA plugin has various reasons to iterate over its dependencies16:21
tristanLike observing public data exposed by those16:21
tristanStaging16:21
tristanEtc16:21
tristanThat is always going to be relevant16:22
benschubertfair enough16:22
benschubertthen we need both16:22
benschuberttristan: I'm not sure why you are opposed to us keeping the reverse dependencies and iterating over those16:24
tristanOk so, with regular target -> leaf iteration, we already ensure that we only traverse every node once, this is rather straight forward already16:24
tristanIn reverse we cannot do that without a list16:24
tristanI should accept that I suppose16:24
benschubertexact16:24
csorianotristan: you sure it's "bst artifact checkout --tar sometarball.tar.gz core-deps/gnome-autoar.bst"? It says bst artifact doesn't exists16:25
csoriano(opening a shell and then make dist or ninja dist also work fwiw)16:25
tristanbenschubert, Is there a way that we can condense this into a generic loop which takes a callable which returns true/false depending on whether it's branches should be followed ?16:25
tristanOr would it not make sense ?16:25
tristancsoriano, use `bst checkout --tar` instead16:26
tristancsoriano, people are working on BuildStream2 now, where we have changed some APIs around16:26
tristanwith master it is `bst artifact checkout`16:27
benschuberttristan: I think this would be sub optimal for multiple reasons:16:27
benschubert1) for what we are doing currently, we would need to run twice, once with build_rdeps once with run_rdeps, which is less flexible than doing manually16:27
benschubert2) once we manage to split the _update_state, the logic will also be different for every entry16:27
benschubert3) the only other place where I see reverse deps useful is for a push-based pipeline, which would only require direct rdeps16:27
benschubertDoes that make sense?16:27
tristancsoriano, I don't recall if the filename works for .tar.gz, I think it does automatically because python16:27
tristancsoriano, anyway I think it does, but we explicitly support `-` for streamed output if that's useful16:28
* tristan hopes we can get ostree to commit from tarball over stdin one day...16:29
csorianonot sure I understood that, you mean that the filename might not work with .tar.gz?16:29
tristanbenschubert, fair enough, I'll stop interrupting the conversation you had at this point because I honestly cannot meaningfully contribute16:30
tristancsoriano, Right, I mean maybe it will still give you a tarball, not a gzipped tarball16:30
benschuberttristan: thanks for the insights16:30
benschuberttristan: I'm just not sure in which direction to head anymore x) will take a break and re-read all the discussions16:30
csorianooh16:30
* tristan has been at it for like 12hours today due to the late night meeting16:30
tristanso I'm a bit numb sorry16:30
csorianooh :D16:31
csorianohttps://www.irccloud.com/pastebin/KC27O8lN/16:31
csorianoso I guess this is the issue you meant?16:31
tristanno that looks much worse :'(16:31
* tristan cries16:32
benschubertcsoriano: what command did you run? And what version of buildstream?16:32
*** raoul_ has quit IRC16:32
*** phil has joined #buildstream16:32
csorianobst checkout --tar core-deps/gnome-autoar.bst gnome-autoar-0.2.4.tar.gz16:32
csoriano[csoriano@localhost gnome-build-meta]$ bst --version16:32
csoriano1.2.416:32
*** phildawson_ has quit IRC16:33
tristanyeah that looks right, I will have to add a test and fix it16:33
tristanmissing artifacts are the worst16:33
csorianowanna me to report an issue?16:33
tristancsoriano, Actually, it is very possible that this bug is fixed by the branch we are discussing right now16:33
csorianoand this is upstream buildstream, not gnome-build-meta right?16:33
tristanvery very possible16:33
csorianoah ok16:33
tristancsoriano, Do you run bst from git ?16:34
tristanor via pip/package manager ?16:34
benschuberttristan: 1.2.4 should be pip/package manager, otherwise we would have the sha no?16:35
csorianotristan: fedora16:35
tristanbenschubert, if you checkout a tag it will be the same16:35
tristansha is only if it is not exactly at the tag16:35
csoriano+ bst-external from pip316:35
csorianoI followed the guide basically16:35
tristancsoriano, Ah right, I was going to suggest trying it with https://gitlab.com/BuildStream/buildstream/tree/tristan/fix-workspace-build-all16:35
tristanYeah, I am fairly certain you are hitting https://gitlab.com/BuildStream/buildstream/issues/91916:36
tristandifferent symptom of the same problem16:36
benschubertgah, my PR really touches many things x)16:36
tristanI have a patch that works, but benschubert's is better16:37
tristancsoriano, I bet that if you close the workspace, and point the element to a committed change, it will work around the problem16:38
tristanI know, it's not ideal :-/16:39
csorianoI will go with the shell make dist for now, I was checking wheter I should put the bst checkout stuff in the wiki, but looks like better wait for builstream 216:39
tristancsoriano, bst checkout --tar will work with 1.2.5 which will drop in like, a week16:40
tristancsoriano, bst 2 has not release date, not a rewrite, but a huge development effort16:40
tristancsoriano, explanation here: https://blogs.gnome.org/tvb/2019/03/04/buildstream-news-and-2-0-planning/16:41
csorianoI see16:41
csorianoanyway, I reworked most of https://wiki.gnome.org/Newcomers/BuildSystemComponent if someone here could do a look there and try to follow it and do further corrections that would be nice16:41
csorianospecially for the expected workflow for common things16:41
* tristan will check tomorrow :)16:42
csorianonice, cheers16:42
tristancsoriano, Really thanks for taking a look at the wiki and trying it out - I'm going to be spending my time making GNOME VM images with gnome-build-meta so will update wiki more once I get something half decent16:42
csorianonp!16:43
*** tchaik[m] has joined #buildstream16:49
benschubertjuergbi: I might have a simpler solution without having to count16:54
benschubertmight be a tad slower16:54
* juergbi likes simple :)16:55
*** alatiera has quit IRC17:05
*** phil has quit IRC17:06
*** raoul_ has joined #buildstream17:06
benschubertjuergbi: juergbi https://gitlab.com/BuildStream/buildstream/merge_requests/1070/diffs?commit_id=54b60ad2030a42b6186866d85f2ae4f99e5aa477 what do you think?17:06
benschubertall tests pass17:06
benschuberttad slower17:06
benschubertbut much simopler17:07
benschubertand only slower when running workspaces stuff17:07
benschubertand still easy to rework17:07
*** alatiera has joined #buildstream17:09
juergbibenschubert: I definitely like the reduced complexity17:13
juergbibut still thinking whether it will always work17:13
juergbithe case where a workspace is a runtime-only dependency of a build-only dependency17:13
juergbibuilding the workspace will trigger update state in the runtime reverse dependency17:14
juergbihowever, that would not bubble up to the build-only reverse dependency because the cache key of that middle element wouldn't be newly discovered17:14
juergbishould probably create a test case for this17:16
juergbibut I thought that was already covered17:16
juergbimaybe I'm just confused ;)17:16
benschubertthat will be tests/frontend/workspace.py::test_build_all17:16
gitlab-br-botmartinblanchard opened (was WIP) MR !1239 (mablanch/629-remote-execution-test->master: Add remote execution tests to the CI pipeline) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/123917:19
benschubertjuergbi: with the second parameter17:21
benschubertDoes that seem good or am I missing something?17:21
juergbiit's not quite that test due to the stack in the middle17:25
juergbitrying to modify and test17:27
benschubertsure!17:27
benschubertIf you can find a test case that fail, please send a commit !17:27
juergbiwill do17:28
gitlab-br-botraoul.hidalgocharman opened issue #965 (Artifact as a Proto: protos and service) on buildstream https://gitlab.com/BuildStream/buildstream/issues/96517:34
gitlab-br-botaevri opened MR !1240 (aevri/element_loaderror_detail->master: element: keep original 'detail' when re-raising) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/124017:37
gitlab-br-botaevri opened (was WIP) MR !1237 (aevri/junction_load_provenance->master: loader: re-raise _get_loader LoadError with prefix) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/123717:39
juergbibenschubert: https://gitlab.com/BuildStream/buildstream/commit/9bcbc2bbb6fb4aabf50e22807cda74b5fc114f6517:44
juergbifails with your simplification but passes on master, your previous version, and my branch17:44
benschubertgah ok thanks!17:45
juergbimaybe it should be a different test case, not sure17:45
benschubertjuergbi: it seems like it might be better17:45
benschubertbut that's already good I'll get that in my branch and try fixing17:45
juergbita17:46
benschubertthanks!17:46
benschubertjuergbi: fixed version at !1070, your opinion?17:51
gitlab-br-botMR !1070: WIP: Refactor _update_state() to be called only when needed https://gitlab.com/BuildStream/buildstream/merge_requests/107017:51
juergbithat was quick17:52
gitlab-br-botjonathanmaw opened MR !1241 (jonathan/wsl-tests-manual->master: gitlab-ci: Make WSL tests only run on master) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/124117:52
benschubertjuergbi: it's a "simple fix" will do too much work, but not too much and maximum one level too deep17:54
juergbibenschubert: hm, what about going a bit more into the direction of my simplification with a single trigger17:55
juergbii.e., what if we change ready_for_runtime to also cover the availability of the cache key17:56
juergbiand thus make it that 1-bit hash we discussed last week17:56
benschubertjuergbi: afaik it already is since it will only be populated is __cache_key is not None :)17:57
juergbitrue17:57
*** lachlan has joined #buildstream17:57
juergbiso couldn't we use this as the only trigger?17:57
juergbielement.__ready_for_runtime != old_ready_for_runtime:17:57
juergbidrop the cache key change check?17:57
benschubertjuergbi: my only question is: for "weak_cache_key". We _can_ discover stuff before right? So we might be able to unblock weak_cache_keys earlier with my current version. Correct?17:58
juergbiyes, it's possible that we would unblock reverse dependencies later in non-strict mode in certain cases17:59
benschubertwhich cases?17:59
juergbiactually, maybe none18:00
juergbias you can't build reverse dependencies anyway before the strong cache key is available18:00
juergbiyou could calculate the weak cache key earlier but that doesn't gain you much18:01
juergbitbh, overall I'm also less worried about slightly suboptimal scheduling for non-strict build plans18:01
*** jonathanmaw has quit IRC18:02
benschubertbecause they are not the default and, that would only be kicking in in addition to a workspace, correct?18:02
juergbiyes. it's difficult to estimate whether there would be any significant impact18:03
juergbithe combination of workspace and non-strict build plan is definitely not an odd use case, though18:04
juergbianother aspect is that we can hopefully get rid of the workspace cache key recalculation after build anyway long term18:04
benschubertjuergbi: ok, then let's try the single trigger, I benchmark tonight and if our "normal" use case is not badly affected we go for this, ok?18:05
juergbisounds good to me18:06
benschubertjuergbi: however, __cache_key does change sometime right?18:08
benschubertit can be weak or strict or strong, right?18:08
juergbino, I don't think so18:09
juergbiit's always a 'strong' cache key18:09
juergbiin strict mode, it is always equivalent to the strict cache key18:09
juergbitechnically, it can change, but it should not be observable18:09
benschubertSo techinically:18:10
benschubert        while queue:18:10
benschubert            element = queue.pop()18:10
benschubert            if not element.__ready_for_runtime:18:10
benschubert                element._update_state()18:10
benschubert                if element.__ready_for_runtime:18:10
benschubert                    for rdep in element.__reverse_dependencies_for_build:18:10
benschubert                        queue.push(rdep.__node_id, rdep)18:10
benschubert                    for rdep in element.__reverse_dependencies_for_runtime:18:10
benschubert                        queue.push(rdep.__node_id, rdep)18:10
benschubertShould work right? It does not :/18:10
juergbican't have the conditional on update_state18:10
juergbie.g., cached state update etc. needs to be run also if cache key is already available18:10
juergbiwould be nice to split out 'cached' state update. maybe this would make the above work18:11
juergbibut that's something for another branch18:11
*** lachlan has quit IRC18:11
benschubertmmh I'm not sure how I should fix it then18:11
juergbidoesn't this check work?18:12
juergbielement.__ready_for_runtime != old_ready_for_runtime:18:12
* juergbi has to run out to buy some food18:13
benschubertjuergbi: and removing the first shortcut?18:15
*** lachlan has joined #buildstream18:15
juergbiyes, we can't make update_state conditional on this18:17
juergbiwe could make the queue.push for runtime reverse deps conditional on cache key being available18:18
benschubertpushed a new version where test pass18:20
benschubertlet me know if that's good for you and i'll cleanup and benchmark18:20
*** pointswaves_ has joined #buildstream18:22
*** pointswaves_ has quit IRC18:23
*** pointswaves has joined #buildstream18:23
*** raoul_ has quit IRC18:25
*** nimish2711 has joined #buildstream18:26
pointswavesTristan juergbi i have been doing some doc stuff in my own time and i cant get the pipe line to pass on the free runners, can you add my personal account to developers so i can run the pipelines with the fancy runners? https://gitlab.com/pointswaves/buildstream/pipelines18:32
*** lachlan has quit IRC18:32
*** pointswaves has quit IRC18:36
*** pointswaves has joined #buildstream18:37
*** pointswaves_ has joined #buildstream18:38
*** pointswaves has quit IRC18:40
*** toscalix has quit IRC18:41
*** pointswaves_ has quit IRC18:43
*** pointswaves_ has joined #buildstream18:43
*** nimish2711 has quit IRC18:48
*** pointswaves has joined #buildstream18:50
juergbipointswaves: done18:51
*** pointswaves_ has quit IRC18:51
pointswavesjuergbi, thanks18:54
*** pointswaves has quit IRC18:57
*** alatiera has quit IRC19:03
*** pointswaves has joined #buildstream19:15
benschuberttristan: !1222 is ready normally, can you have a (hopefully) last look?19:34
gitlab-br-botMR !1222: Enable pylint on the tests https://gitlab.com/BuildStream/buildstream/merge_requests/122219:34
*** pointswaves has quit IRC20:31
*** rdale has quit IRC20:40
*** slaf_ has joined #buildstream22:00
*** slaf_ has joined #buildstream22:00
*** slaf has quit IRC22:02
*** slaf_ is now known as slaf22:02
*** swick_ has joined #buildstream23:16
*** swick has quit IRC23:17
*** swick_ is now known as swick23:17

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