IRC logs for #buildstream for Wednesday, 2019-02-27

*** nimish has quit IRC02:18
*** nimish has joined #buildstream02:21
*** nimish has quit IRC02:27
*** nimish has joined #buildstream02:31
*** nimish has quit IRC06:43
*** alatiera has joined #buildstream06:43
gitlab-br-botjuergbi opened (was WIP) MR !1183 (juerg/directory-import->master: Directory.import_files() improvements) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/118307:08
*** mohan43u has quit IRC07:17
*** mohan43u has joined #buildstream07:17
*** nimish has joined #buildstream08:04
*** tristan has joined #buildstream09:19
*** raoul_ has joined #buildstream09:48
*** jonathanmaw has joined #buildstream10:02
*** kapil___ has joined #buildstream10:02
*** lachlan has joined #buildstream10:32
*** ChanServ sets mode: +o tristan11:02
tristanjonathanmaw, last night you asked an interesting question about _update_state() and https://gitlab.com/BuildStream/buildstream/merge_requests/1070#note_14500741111:03
tristanLet me try to put it into different words to be more clear: Arbitrary code changes without consideration of maintainability are not really ever okay11:04
tristanWhether it is to fix a bug in functionality, or to optimize a codepath, it doesnt really matter11:04
tristanThere is always a way to express a more optimized (or more functionally correct) code base intelligibly11:05
tristanjonathanmaw, for the specific case at hand, this is actually probably the single most complex part of BuildStream11:06
tristanNow, there are multiple ways to make it maintainable and not unbearable, currently _update_state() is obviously slated for refactor anyway11:07
tristanAs I mentioned in the issue, juergbi and I differed initially on the approach - perhaps the event based approach would be better suited to doing less work less often, and still be able to handle state transition more or less centrally11:09
tristanjonathanmaw, That said, I think that in the mid-term, the forced state updates on reverse dependencies when a cache key is discovered is intelligible and safe if it works well11:10
tristannot an ultimate solution, but still not immensely complex11:10
jonathanmawtristan: ok. I'll see how the state updates on reverse dependencies affects performance, and see where I can take it from there. Was there any logged discussion about your event-based approach?11:16
*** lachlan has quit IRC11:22
*** lachlan has joined #buildstream11:24
tristanOnly on IRC afaik11:25
tristanjonathanmaw, it was quite a while back, but I suppose we could track it down do weeks before the appearance of _update_state() :)11:26
tristanjonathanmaw, just to be clear, my comment was not meant to block the branch - but rather as a warning that we should be especially careful to not make optimizations arbitrarily especially around _update_state()11:27
jonathanmawtristan: okie doke11:27
tristanjonathanmaw, For more ideas... what this revolves around is reducing the amount of work which needs to happen to the minimal amount of times, while keeping cognitive complexity to a minimum11:28
tristanSo11:28
tristanI was thinking that if we have some events which cause things to change, we should have strong assertions of invariants in place11:29
tristanSuch that the logical transitions from one state to another always make sense11:29
tristanAnother approach is to involve implicit invokation mechanisms11:30
tristanI'm not particularly a fan of implicit invocation because it can make things hard to debug when something goes wrong11:30
tristanjonathanmaw, I.e. what I mean by implicit invocation is that... When an event occurs on an Element, not only does the Element react to that by adjusting internal state, but state changes can fire notifications11:31
tristanOther elements, like reverse dependencies, might have interests registered to those notifications11:31
tristanAgain, an approach which is straight forward and readable... EXCEPT when it comes to observing lines of code and considering what side effects it will cause and what code paths will run in which order11:32
tristanAnecdotal: There was a time when Glade had a signal called "update-ui", this was horribly inefficient for similar reasons, solution being to remove that and only ever do fine grained updates to any onscreen widgets11:34
tristanAs a side note, *if* we refactored to use threads instead of forks; we could also eliminate any external callers informing the data model that something changed11:37
tristanI.e. the BuildQueue would never need to tell the element that "it's been assembled"11:37
*** lachlan has quit IRC11:39
*** lachlan has joined #buildstream11:43
benschuberttristan: "As a side note, *if* we refactored to use threads instead of forks; we could also eliminate any external callers informing the data model that something changed" -> not sure what you mean about that, but my guess is, it would be blocked by the GIL11:43
benschuberttristan: also, apprently, tracking only __cache_key changes is not enough, we need both __cache_key (or __strict_cache_key) and __weak_cache_key. Why bother with the 3 then? Couldn't we use only weak and strict for example?11:44
tristanThe f**king GIL11:54
tristanWe have to get around that11:54
tristanbenschubert, What I mean by that is that the datamodel already knows when something is assembled or fetched, it's the one which exposes the function that does the work11:55
tristanbenschubert, You have to ask juergbi more about why we have so many copies of the keys11:56
tristanI think that __cache_key is the active/chosen key and could possibly be replaced by a function, but I'm unsure at this point11:56
tristanAlso I'm not sure why we distinguish between strong/strict key; I *think* it has to do with distinguishing the strong key which was downloaded in a pulled artifact11:57
tristanBut I *suspect* that this could equally be implemented as a mutation of the "strong key" once an artifact is pulled, rather than having two separate variables11:58
tristanI can be wrong about that11:58
juergbiyes, the separate strict key is needed for attempting to pull the strict artifact from the remote CAS11:59
juergbiwe do this even if we already have a locally cached artifact matching the weak key11:59
juergbithat locally cached artifact may have a different strong key, though11:59
juergbiI'm not really happy with this complexity either11:59
tristanI suppose we need it in order to influence the strong keys of reverse dependencies, when an artifact is pulled by its weak key12:00
juergbiyes. and we don't want to set the strong cache key field to the strict cache key just for the pull attempt12:01
tristanI'm not immensely bothered by the complexity in recognition that it serves a good purpose, but would probably prefer to have it implemented with more lines of code in a separate module (Artifact object abstraction candidate ?)12:01
juergbiotherwise reverse dependencies will already use that, and if it's not in the remote, it will be wrong12:01
tristanYeah I get it, it's just really hard to remember :)12:01
juergbithe WIP Artifact class will likely help to some extent in this regard12:01
benschubertah so we need __strong_key, strict_key and weak_key, and the update_state will pick the right one there12:02
benschubertok, makes more sense now12:02
benschubertthanks!12:02
gitlab-br-botBenjaminSchubert approved MR !1164 (danielsilverstone-ct/gc-play->master: _stream.py, _project.py: Manage GC during pipeline load) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/116412:06
benschubertjuergbi: and the strong/strict cache key of an element is dependent on the strong key of it's dependencies correct? not the strict one nor any other thing from its dependencies?12:11
juergbibenschubert: correct, the strict cache key is mainly relevant for pulling in non-strict mode12:12
juergbiin strict mode, strict and strong cache keys are always the same12:12
benschubertthanks!12:18
tpollardjuergbi: do you have any ideas of what I could call a new exception class for the artifact abstraction class? We already have ArtifactError and ArtifactElementError12:24
*** raoul_ is now known as raoul12:27
raoulMaybe it's worth renaming ArtifactError to ArtifactCacheError and then using ArtifactError?12:29
tpollardI wouldn't be against that12:30
tristanraoul++12:30
tpollardwill roll with that then12:39
jennisDoes ruamel.yaml always load dict values as strings, or is this something we're enforcing?12:40
juergbiraoul, tpollard: sounds fine to me, or possibly using ArtifactError for both?12:46
juergbinot sure whether we need to differentiate12:46
juergbijennis: we do it in node_get()12:47
*** raoul has quit IRC12:51
Kinnisonjennis: We enforce it12:58
Kinnisonjennis: consider lines 32-34 of _yaml.py fr.ex.12:58
jennisahh, looks like for {'a': 1}, ruamelyaml would load this as a string, pyyaml as an int12:58
jennisoh, because of those lines12:59
jennisthanks Kinnison12:59
*** adds68 has joined #buildstream13:01
gitlab-br-botmarge-bot123 merged MR !1164 (danielsilverstone-ct/gc-play->master: _stream.py, _project.py: Manage GC during pipeline load) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/116413:18
tristanbenschubert, What was the use case finally for making the coverage commands optional ?13:33
tristanbenschubert, Ohhh you explicitly wanted to override the behavior by passing `tox -- --no-cov`13:33
tristanI remember now13:33
benschuberttristan: being able to run the code without coverage yup13:33
tristanI have a patch almost, which implements the separation, seems this person also had exactly the same use case https://github.com/tox-dev/tox/issues/89913:34
tristan(a fixed bug, thought I was hitting it and then figured out how to use tox properly)13:35
*** raoul has joined #buildstream13:37
tristanOh, I just realized I can do a simpler patch than teaching tox to do it, as the requirements for #916 are only for `python3 setup.py test` invocations (explicitly testing against installed dependencies)13:46
gitlab-br-botIssue #916: loosen dev dependencies https://gitlab.com/BuildStream/buildstream/issues/91613:46
tristanbenschubert, The relevant parts of the resulting tox.ini looks like this: https://bpaste.net/show/e2db26cffe3a, and results in the ability to run `tox -e py35-nocover` (or any python env + -nocover)13:48
tristanbenschubert, Do you think it's worth anything ?13:48
tristanOtherwise, I will just go for a simpler approach which simply removes coverage integration from the base setup.py layer13:49
mablanchAny change someone could have a look at this (remote-execution configuration): https://gitlab.com/BuildStream/buildstream/merge_requests/118613:49
benschuberttristan: just  wondering if py* instead of {35,36,37} would work? it would make everything much nicer, otherwise it can be nicer indeed. I also think you don't need to protect lines 16-18 by "!nocover" not sure though :)13:52
tristanbenschubert, I'm pretty sure it is required, from reading: https://tox.readthedocs.io/en/latest/config.html#complex-factor-conditions13:59
tristani.e. positive factors (presence of py36) does not explicitly mean an absence another factor (indicated by !nocover)14:00
tristanit's a bit unintuitive to me but seems to work this way14:00
tristanAnd no, the wildcard doesnt work (just tried)14:02
tristanbenschubert, But that doesnt answer the question really... I mean do we want these py*-nocover envs ? or are we happy with passing --no-cov ?14:03
tristanI'm pretty ambivalent now that I have a working patch, but it's technically not *really* needed14:04
tristanI'll throw up an MR first, I can split it in such a way that we can discard the last patch or not14:05
benschubertYeah I'm not sure it's really needed and I'm happy with the --no-cov, let's see what others think14:18
gitlab-br-bottristanvb opened MR !1189 (tristan/optional-coverage->master: Make coverage optional) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/118914:22
tristanbenschubert, I pinged cs-shadow on it as he has been in the loop for dependency pinning discussions too14:27
benschubertthanks14:27
tristanbenschubert, ... can you take a look at #869, as laurence asked ?14:39
gitlab-br-botIssue #869: Local cache size calculation is wrong https://gitlab.com/BuildStream/buildstream/issues/86914:39
* tristan is closing stale browser tabs14:39
tristanbenschubert, i.e. I believe !1106 fixed this14:39
gitlab-br-botMR !1106: _artifactcache.py: Don't require the quota to be available on disk. https://gitlab.com/BuildStream/buildstream/merge_requests/110614:39
benschuberttristan: I still have dependencies to sort out before being able to do so :/14:40
benschubertI'm not forgetting14:40
tristanheh, ok14:40
tristanActually, #864 is arguably a duplicate of #66014:43
gitlab-br-botIssue #864: Local cache doesn't cleanup properly https://gitlab.com/BuildStream/buildstream/issues/86414:43
gitlab-br-botIssue #660: Stack traces when running out of disk space https://gitlab.com/BuildStream/buildstream/issues/66014:43
tristanAnd now we start a cleanup job at startup if one is called for, so whatever part of #864 is not a duplicate, is also solved14:44
tristanbenschubert, Would you agree with that ? And maybe close that one too ?14:44
* tristan comments on issue14:44
benschuberttristan: I'd argue that this one is likely not solved, since I'm pretty sure that still could be triggered :) But I'm happy to monitor our builds for a few days/weeks and close this if we don't trigger it anymore14:45
tristanbenschubert, I am not saying we dont have crashes when we run out of physical disk space14:47
tristanbenschubert, I am saying that that is what #660 is for14:47
benschubertoh right14:47
benschubertso basically saying that 864 is a duplicate and close it once the first part is handled. good to me!14:47
tristanbenschubert, Right, so I believe that is the case, and have summarized it here: https://gitlab.com/BuildStream/buildstream/issues/864#note_14559835314:51
tristanWould you care to just look over the comment and close 864 unless there is something you think I missed ?14:52
* tristan is unsure if #737 is still relevant either14:55
benschuberttristan: 737 seems good though :)14:58
*** lachlan has quit IRC15:00
tristanbenschubert, "If the disk is full, buildstream should automatically cleanup, similar to what what happen when you set a quota" Doesnt that happen though ?15:01
tristanLemme give it a quick look see again15:01
tristanOtherwise we are back in the territory of creating plenty of issues just because #660 is not yet fixed15:01
*** lachlan has joined #buildstream15:02
tristanYes verified, raoul's 5e10e2e81 changed things around a bit15:06
tristanBut ArtifactCache.full() still reports true when the remaining disk space is less than the headroom (now via CasQuota)15:07
tristanjjardon, Please check my last comment on #737 and contest or close :)15:14
gitlab-br-botIssue #737: Buildstream local cache doesn't get cleanup automatically when the disk is full https://gitlab.com/BuildStream/buildstream/issues/73715:14
*** tristan has quit IRC15:18
*** tristan has joined #buildstream15:49
*** ChanServ sets mode: +o tristan15:49
lachlanjonathanmaw: A priority merge request has been made in benchmarking (https://gitlab.com/BuildStream/benchmarks/merge_requests/30). Do you think you will have some time to review please?16:05
jonathanmawlachlan: reviewed16:16
lachlanjonathanmaw: Thanks16:25
aevriAnyone know if we meant to support workspaces+remote builds? Am getting 'SandboxRemote does not support callbacks in command batches' - will open an issue if that's not expected, I can improve the error at least :)16:25
juergbiaevri: that's known to be broken16:26
juergbihowever, a better error message or fallback to local build would definitely be better until this can be fixed up completely16:26
juergbi(incremental workspace builds via remote execution will require a solution for CAS missing timestamps)16:27
aevriaha yes16:27
aevrithanks, I might see about a better message for now; do you know of a super-issue that's tracking this? Perhaps I should open one explicitly for workspace+remote?16:28
juergbiI'm not aware of one. would be good, though16:29
jmacHow do I test bst-external locally? I can't see any instructions in the readme.16:47
jmacI guessed at './setup.py test' as per the CI, but it throws lots of errors with current BuildStream17:02
gitlab-br-botaevri opened issue #932 (Time spent in integration is only partially captured in logging) on buildstream https://gitlab.com/BuildStream/buildstream/issues/93217:31
gitlab-br-botaevri opened issue #933 (Support workspaces with remote execution (not incremental)) on buildstream https://gitlab.com/BuildStream/buildstream/issues/93317:36
tristanbenschubert, I just made a comment but scratch that, I think I overlooked something17:51
gitlab-br-botaevri opened issue #934 (Support incremental builds with workspaces + remote execution) on buildstream https://gitlab.com/BuildStream/buildstream/issues/93417:52
benschuberttristan: ok!17:54
tristanbenschubert, updated comment17:57
tristan(or rather commented again)17:57
benschubertthanks!17:57
tristanbenschubert, I think what threw me off is that the new recursive routine was not private; what I want to avoid is having external callers need to understand the internals, and have to choose what to do17:58
benschubertOh right. What about having both private and have the element handle all the state itself?17:59
*** alatiera has quit IRC18:00
tristanI'm not sure it's currently feasible with what we do at load time until we do split it up18:00
tristanOr that it makes perfect sense yet18:00
benschubertIt think doing it at initialisation would work18:01
tristanbenschubert, i.e. if it means that we add some kind of function that currently exists in stream.py or pipeline.py as a part of the already complex loading process, I'm not sure we win anything by it18:01
tristanI am sure that doing _update_state() in Element.__init__() will cause things to break horribly, though18:02
tristanbenschubert, Before state is ever actualized, the instantiated elements need to be told what the session plans to do18:02
tristanlike which elements will be tracked, etc18:02
*** jonathanmaw has quit IRC18:03
tristanThe order of things going on in Stream._load(), is *very* significant :)18:04
*** nimish has quit IRC18:08
gitlab-br-botaevri opened MR !1191 (aevri/macos->master: _platform/darwin: fix missing space, say MacOS) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/119118:10
*** phildawson has quit IRC18:10
benschubertAh right18:17
*** lachlan has quit IRC18:22
*** raoul has quit IRC18:27
*** tpollard has quit IRC18:33
*** tpollard has joined #buildstream18:33
*** tpollard has quit IRC18:40
*** tpollard has joined #buildstream18:40
*** tpollard has quit IRC18:42
*** tpollard has joined #buildstream18:42
gitlab-br-botmarge-bot123 merged MR !1191 (aevri/macos->master: _platform/darwin: fix missing space, say MacOS) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/119118:50
*** tpollard has quit IRC18:52
*** tpollard has joined #buildstream18:53
*** lachlan has joined #buildstream19:00
*** mablanch has quit IRC19:13
*** valentind has quit IRC19:13
*** WSalmon has quit IRC19:13
*** laurence has quit IRC19:13
*** johnward has quit IRC19:13
*** bethw has quit IRC19:13
*** bethw has joined #buildstream19:14
*** johnward has joined #buildstream19:15
*** laurence has joined #buildstream19:15
*** mablanch has joined #buildstream19:15
*** valentind has joined #buildstream19:16
*** WSalmon has joined #buildstream19:17
*** adds68 has quit IRC19:17
*** jennis has quit IRC19:17
*** ikerperez has quit IRC19:17
*** mablanch has quit IRC19:33
*** bethw has quit IRC19:34
*** bethw has joined #buildstream19:34
*** mablanch has joined #buildstream19:34
*** benbrown has quit IRC19:36
*** jmac has quit IRC19:40
gitlab-br-botjuergbi merged MR !1183 (juerg/directory-import->master: Directory.import_files() improvements) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/118320:21
*** benbrown has joined #buildstream20:42
*** benschubert has quit IRC20:55
*** lachlan has quit IRC21:04
*** adds68 has joined #buildstream21:31
*** tristan has quit IRC21:51
*** alatiera has joined #buildstream22:52

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