IRC logs for #buildstream for Monday, 2020-04-13

*** tristan_ has quit IRC04:28
*** tristan_ has joined #buildstream04:54
*** ChanServ sets mode: +o tristan_06:14
tristan_Fun: AttributeError: 'google.protobuf.pyext._message.RepeatedCompositeCo' object has no attribute 'append'06:14
tristan_This is after `sudo pip3 install -e .`06:14
tristan_Since `pip3 install --user -e .` fails, apparently a recent regression: https://github.com/pypa/pip/issues/795306:15
tristan_After deleting my old artifact cache, my integration command fails with: Internal job process unexpectedly died with exit code -606:18
tristan_Hrrrrrm a little bit more detail could be nice there06:18
tristan_Stack trace if this is a bug; clear instructions to fix my installation if this is my fault, would be good06:19
tristan_eeesh very buggy here, what happened :-S06:22
tristan_BUG: Message handling out of sync, unable to retrieve failure message for element libhello.bs06:22
tristan_t06:22
tristan_python3: ../nptl/pthread_mutex_lock.c:433: __pthread_mutex_lock_full: Assertion `INTERNAL_SYSCALL_ERRNO (e, __err) != ESRCH || !robust' failed.06:22
* tristan_ expects this is an installation problem, because bst appears to be working alright in the example docs generation06:24
juergbitristan_: the recommendation for development is venv and when you're in a venv you can use `pip3 install -e .` as regular user08:38
juergbiexit code -6 means SIGABRT. that might be an assertion failure in a C library, possibly protobuf/grpc. hence no python stack trace08:38
juergbiwhat distro version are you on? and what python version?08:39
juergbivalentind has seen an issue with debian sid due to the system-provided protobuf/grpc. however, the latest stable releases of common distros work fine according to CI08:40
tristan_I've got python 3.7 on debian 908:53
tristan_juergbi, I worked around it with `tox -e venv /bin/bash`08:53
tristan_But I'd much rather have a user installed buildstream than wrestle with a venv :-S08:54
juergbivenv shouldn't really be much less convenient than user installation. the only extra thing you need is to activate the venv in each shell (and I guess you can do this implicitly if you only/mainly work with a single venv)08:59
juergbii.e., venv doesn't have to involve tox08:59
*** phoenix has joined #buildstream08:59
juergbitristan_: btw: as debian 9 comes with python 3.5, we've recently dropped it from CI. I'd suggest upgrading to debian 10, which is tested in CI and already comes with python 3.709:01
tristan_Yeah, activating the venv in each shell, plus the overhead of figuring out how to set it up in the first place09:02
* tristan_ finds this really annoying09:02
juergbiwe should definitely write or at least point to some good venv documentation for buildstream09:02
* tristan_ was hoping he could still get away with `pip3 install --user -e .`, so long as I don't need 2 buildstreams installed09:03
tristan_Or to at least only have *one* of my BuildStreams in a venv09:03
juergbiI was just going to mention, if you still want bst 1.x around, you anyway need a venv09:03
juergbimaybe someone here knows a website with some best practice around python venv09:03
* tristan_ recalls being very annoyed with venvs, particularly the aspect that ^D doesnt exit the venv, it kills your terminal (I think it sources a script instead of launching a subshell)09:04
juergbiyou can do either09:05
tristan_On top of having to you know, actually know how to use the thing, which is a burden too09:05
* tristan_ thinks so far that `tox -e venv /bin/bash` so far is going to be the easiest hack09:05
tristan_minimal burden of knowledge09:06
juergbiit's not really suitable to multiple shells/terminals, though, right?09:06
juergbiI'm mainly using a non-tox venv09:06
juergbias that is very quick to enter09:07
tristan_I think that it will only setup the .tox/ subdir once right ? so once you do it once, the second time is snappy09:07
tristan_or we have that disabled tox.ini-wide09:07
juergbiit should definitely be faster the second time. however, I think it still takes a couple of seconds or so, far from instant09:08
tristan_They could be valuable seconds though09:08
juergbiand I'm not sure whether you can keep the tox shell open, modify buildstream and have it owrk09:08
tristan_I.e. sacrificing those seconds could save you from giving a damn about updated requirements.txt09:08
juergbiyes, that's definitely helpful09:09
tristan_Yeah that's another aspect, I believe it's possible though09:09
tristan_to use the develop install mode09:09
juergbion the other hand, I also occasionally (not often, though) have to call tox --recreate. i.e., it's not completely foolproof either09:09
juergbibtw: the pip3 install --user -e . issue appeared last summer, it's not that recent09:11
tristan_I suppose the 12 day old report https://github.com/pypa/pip/issues/7953 must be a duplicate09:12
* tristan_ was assuming recent regression due to age of the report he found09:12
tristan_juergbi, you know oddly, I did work around this first with `sudo` and decided, I'd rather have to just re-install on the system every time than use a venv09:14
tristan_That's when I got slapped with the grpc stuff though :-/09:15
tristan_I think I have a custom 3.7 here, well not custom but manually built09:15
juergbimaybe just setup a single main venv and automatically enter it in your bashrc/profile09:15
* tristan_ needed to have every version of python installed to do all his tests locally09:15
tristan_I'm surprised I cannot just install on the system though, even if the `--user -e` thing doesnt work, I should at least be able to do that09:16
juergbiright. as test differences across Python versions because of code changes is rare enough in my experience, I only test one Python version locally and leave the rest to CI09:16
juergbimy suspicion is that there is an incompatibility/issue with a system-installed Python package09:17
tristan_Yeah, I started doing that because I was fixing bugs in the testing itself (parallelism of testing in multiple python versions etc)09:17
juergbiinstalling in a fresh venv avoids this issue (you can have the venv ignore the system packages)09:17
tristan_But then it just stuck with me09:17
* tristan_ thinks there may be bugs with the "dimming" of cache keys for strict/non-strict artifacts09:43
tristan_Anyway, I'll finish writing up this example first and then investigate later...09:43
*** tristan_ has quit IRC10:00
*** tristan_ has joined #buildstream11:15
*** ChanServ sets mode: +o tristan_11:16
tristan_juergbi, don't know if you're around anymore but... do you have any idea why a workspaced element would have a different cache key when running `bst --no-strict show` vs `bst --strict show`, given the same set of dependencies that are all unmodified and cached ?11:18
tristan_my expectation would be for cache keys to only deviate in reverse dependencies of a modified workspaced element11:19
juergbitristan_: no, can't think of a reason off the top of my head11:22
juergbiunless it shows the weak key in the non-strict case for some reason11:23
juergbi(it shouldn't, though)11:24
tristan_juergbi, in master, we no longer have that trick where we need to build in order to derive the key of a workspace correct ?11:26
* tristan_ confused with this11:26
tristan_hmmm11:26
* tristan_ is writing an example in the user guide about using non-strict mode, but cannot explain why the workspaced libhello.bst shows up dimmed out in `bst --no-strict show`, and with a different cache key than with --strict11:27
tristan_The code does not show the weak key afaics11:28
juergbitristan_: have you verified that all the build dependencies have the same cache key between the two modes, i.e., is the only cache key difference in the workspace element itself?11:32
*** rdale has joined #buildstream11:33
tristan_juergbi, yes11:34
tristan_The dependencies of the workspace are the same with strict or no-strict, the workspace and reverse dependencies are changed11:34
juergbiI'd add a debug print for the cache key dict to find the difference11:35
* tristan_ does11:38
*** phoenix has quit IRC11:51
tristan_Weird11:51
tristan_juergbi, in strict mode, the cache key dict of the workspace has: 'dependencies': [['strict-mode', 'base/alpine.bst', 'b795a72d92c05ed0810723f5c3ad40c53bba6e8b568a9d5da22a450a11e03659'], ['strict-mode', 'base.bst', 'e4a4926893ce660306ca9c812fd8018fa41571c27f37fff4a9e6ab592d0333fe']]11:52
tristan_In non-strict mode, it has: 'dependencies': ['b795a72d92c05ed0810723f5c3ad40c53bba6e8b568a9d5da22a450a11e03659', 'e4a4926893ce660306ca9c812fd8018fa41571c27f37fff4a9e6ab592d0333fe']11:52
tristan_but 'grep -r "strict-mode" src/buildstream' yields no results :-S11:55
juergbistrict-mode is the name of the project?11:55
juergbithis looks like a bug11:56
tristan_Aha yes it is that would explain11:56
juergbiit seems like we have a discrepancy between strong cache key calculations in strict and non-strict mode11:56
tristan_Ok, I'll first complete the docs I'm working on under the assumption that this get's fixed, then I'll file the issue with the docs as evidence11:57
juergbidependencies in __update_cache_key_non_strict are missing project name + element name, while __update_cache_keys has it11:57
tristan_Yeah it's more subtle than that, because the keys are indeed the same for the dependencies of the workspaced element11:57
juergbiin non-strict mode if it finds a dependency matching the strict cache key, we always use that11:58
juergbithe issue only arises if that doesn't exist11:58
* tristan_ thinks we don't have very good test coverage for cache keys in non-strict mode + workspaces12:04
tristan_only good coverage for regular strong keys12:04
juergbiyes, should add tests with the fix12:06
juergbitristan_: this untested branch might fix it: https://gitlab.com/BuildStream/buildstream/commits/juerg/cache-key12:09
tristan_:)12:10
*** ikerperez has quit IRC12:10
*** tristan has quit IRC12:10
*** cphang has quit IRC12:10
juergbipending test + p ossibly tiny refactoring12:10
* tristan_ grabs his nick12:10
*** tristan_ is now known as tristan12:10
tristanmtimes are still used in workspaces right ?12:11
juergbiyes12:11
* tristan got confused for a moment, second time building his example caused workspace cache key to change ;-)12:11
juergbiyes, an unexpected bug12:14
juergbiwe apparently still don't have sufficient non-strict tests12:14
*** cphang has joined #buildstream12:14
tristanSo tests for workspace cache keys would have to be in terms of "did it differ" rather than "does it match"12:14
juergbinot quite sure what you mean12:15
tristanmtimes12:15
tristangrrr, /me was hoping that your branch would have warmed up the runners...12:15
juergbibuildstream can't know whether an mtime-only difference has an impact or not12:16
juergbiso mtime differences affect the cache key the same as content changes12:16
juergbibut no other special handling should be needed for workspaces in core code12:16
juergbiah, sorry, misread your message12:17
juergbifor tests, yes, I think the simplest approach would be to set a specific mtime such that all test invocations are identical12:17
juergbifor cache key checks12:18
tristanThat could work, but if you instead open a workspace and then capture it's cache key, you can can later check if strict mode has an effect on that key12:18
juergbiin many other workspace tests the exact cache key is not relevant for the test itself12:18
tristanwithout adding special hooks in the code12:18
tristannot sure if it covers enough but would cover this case12:19
juergbibtw: this bug is not workspace-specific12:19
tristanI see12:19
tristanWasn't sure :)12:19
juergbifortunately, we no longer need special handling of workspaces in cache key code12:20
juergbibut non-strict cache key handling is still not completely trivial12:20
tristanSo I've been pondering that old mail thread in the background, about element names and project names having an effect on keys12:21
tristanWouldn't it be rather "okay" if it still only had an effect on weak keys ?12:21
* tristan wonders if there are other side effects of that he didn't consider12:22
juergbitristan: the weak cache key is stored in the artifact proto and thus, the strong cache key dict must be a superset of the weak cache key dict12:27
juergbiif the weak cache key could change without the strong cache key changing (when a dependency is renamed), I think there would be odd issues12:28
juergbiand it would definitely also be surprising to me as a user12:29
juergbi(no longer finding artifact in cache in non-strict mode but still finding it in strict mode)12:29
tristanRight12:33
tristanjuergbi, I was thinking that last part was an okay tradeoff in order to allow reuse of strong artifacts after a rename12:34
tristanHowever, I would hope that existing strong artifacts would still be found in non-strict mode12:34
juergbiI'd be worried about exposing such an odd behavior12:34
tristanI'm not sure however why the strong key *must* be a superset of the weak key, this sounds like an implementation detail12:34
juergbie.g., a CI building latest elements in strict mode wouldn't trigger a rebuild on rename12:35
tristanCurrently the mere fact that renaming elements can incur rebuilds is also a worry, though12:35
juergbiwhich means that as long as that element and dependencies are not modified, non-strict clients wouldn't have it cached anymore12:35
tristanRight, I feel like non-strict mode being unable to find strong artifacts after a rename could be avoided12:36
tristanThis appears more to do with addressing of artifacts than their keys12:36
juergbiI don't see how the not finding can be avoided with non-superset strong key12:37
juergbialthough we could possibly improve things for the strict CI case such that it would push the new weak key references12:38
tristanWell, if the artifact lookups are done by key only, then the strong keys are always nameless12:38
tristaneven in non-strict mode, I think we first search for a strong (strict) key12:38
tristanIn the case that you fallback on one which doesnt match your strict key, then you get something with names, and only that breaks (and eventually gets purged/expired from a shared cache)12:39
juergbiright, it would still find by strict key12:39
tristanRight, even if you're in non-strict mode, your strong artifact cache keys will still remain useful, you only lose the weak keys12:39
juergbiwe would definitely have to rip out weak cache key and dependency names from the artifact proto12:39
juergbiI don't know right now what issues this might cause12:39
tristanRight I'm not sure about implementation details, I'm just thinking that the tradeoff appears to be worthwhile12:40
juergbie.g., downloading a strict key would no longer allow creating a weak key link using artifact proto12:40
juergbiin some cases we can use the calculated weak key instead but there might be important cases where that's not possible12:41
juergbihave to check each place where we currently use that artifact proto info12:41
juergbii.e., I can't say off the top of my head whether these would only be implementation details or whether this would cause fundamental issues12:42
tristan:)12:43
tristanBTW: https://buildstream.gitlab.io/-/buildstream/-/jobs/508555828/artifacts/public/main_using.html12:43
tristanI've got two new sections in there; Directives and Strict mode (also Junctions with includes but that's still WIP)12:43
tristanAnd a bit of a renaming of sections job, also split up the "Junctions" part into two pages, not to confound the already complex material about creating junctions with the aspect of workspaces12:45
tristanLooking better I think12:45
tristanMore like a user manual :)12:45
juergbinice, will try to take a closer look later12:46
* tristan thinks he'd like to see a new whole section about "Manipulating files", where we could discuss overlaps, split rules, and usage of filter and compose elements12:46
* tristan originally thought that could go into the first chapter but I think it's a bit too much for "Getting started"12:46
juergbiyes, a separate section for file handling seems reasonable12:48
tristanbwaaaahahaha12:51
tristanwhen viewing $@ (in the context of Makefile example in the docs at least when viewed there on gitlab).... they get replaced with "[email protected]"12:52
tristane.g.: https://buildstream.gitlab.io/-/buildstream/-/jobs/508555828/artifacts/public/developing/strict-mode.html#files-libhello-makefile12:52
tristanI suspect it wont do that on the website though12:52
juergbihm, it's a job artifact. I wouldn't expect gitlab to mangle it12:57
juergbibut seems to be the case indeed12:58
tristanBrowsing the locally built stuff in file://... does not do that for me12:58
*** d55c749a has joined #buildstream12:58
juergbiyes, really seems to be gitlab censoring12:58
*** d55c749a has quit IRC13:04
tristan... some cache keys are ephemeral ...13:06
*** tristan has quit IRC13:17
valentindbetween 1.4.1 and the current tip of bst-1, there is  a difference in cache key. The file https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/blob/076fe9d30f37224a1bd756a177e33399dad37e8d/elements/components/jpeg.bst gets 1975408718d400d75839763116b1ce6b50562aca5a78fc06e853e0189c87b241 in 1.4.1 but 23bb7315065cf2bd92b120dd9513e9dd841a4ef135a828c67750fbac02dc84ee in bst-114:38
abderrahim[m]valentind: it's !154914:40
gitlab-br-botMR !1549: plugins/elements/cmake.yaml: always specify variable types https://gitlab.com/BuildStream/buildstream/-/merge_requests/154914:40
valentindOK, good it is known.14:40
*** tristan has joined #buildstream14:46
*** ChanServ sets mode: +o tristan15:26
*** phoenix has joined #buildstream17:38
*** keisha has joined #buildstream18:08
*** keisha has quit IRC18:36
*** keisha has joined #buildstream18:44
*** toscalix has joined #buildstream18:49
*** keisha has quit IRC19:02
*** keisha has joined #buildstream19:10
*** keisha has quit IRC19:24
*** rdale has quit IRC19:49
*** toscalix has quit IRC21:23
jjardonIs there no tests to detect changes in the cache key?21:57
jjardonI'd assume this should have been detected in the MR CI?21:58
*** phoenix has quit IRC22:02
*** lachlan has joined #buildstream22:11
*** lachlan has quit IRC22:22

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