IRC logs for #buildstream for Tuesday, 2017-04-11

*** tristan has joined #buildstream07:04
*** ChanServ sets mode: +o tristan07:41
*** jonathanmaw has joined #buildstream08:18
tristanjjardon[m], I tried reproducing it again to be doubly sure, btw08:37
tristanjjardon[m], fwiw, I used commands almost _exactly_ as you have them specified currently in https://gitlab.com/baserock/definitions/blob/jjardon/bst2/.gitlab-ci.yml#L1908:38
tristanjjardon[m], except for the fact that I have a definitions/ybd already checked out in some other directory and already have the gits ybd wants mirrored in some location08:38
tristanI used defs2bst master... definitions repo master...08:39
tristanAnd ybd master actually (with some configuration file changes to point to my local gits mirror)08:40
tristanAnd not reproducing that missing bluetooth or other issue, seems to work well here08:40
* tristan checks the gitlab, maybe it's passing now ?08:40
ironfoottristan: I believe we managed to solve the missing bluetooth issue08:41
ironfootand it's fixed in that branch08:41
tristanAh08:41
tristanI'm seeing an issue with using ostree now08:41
tristanpermission denied on the runner for file extended attributes ?08:42
tristanhttps://gitlab.com/baserock/definitions/builds/1408425808:42
ironfootthe missing bluetooth.bst problem was solved with: https://gitlab.com/baserock/definitions/commit/440e4ed35ba6b3704f188765262646941a042dd708:42
tristanthat looks correct yeah08:42
* tristan pushes some changes to the gnu-toolchain branch of buildstream-tests08:43
tristanand rebases build-gnome on top of those08:43
tristanNow we dont depend on the entire GNOME SDK for building the base toolchain (instead we just use org.freedesktop.[BasePlaform/BaseSdk])08:44
tristanwhich should be much less downloading08:45
ironfootkewl08:45
jjardon[m]tristan yep about the bluethoot problem I filled https://gitlab.com/BuildStream/defs2bst/issues/108:45
ironfootregarding permissions for file extended attributes... if that's the case, we could try to enable that in our runners08:47
ironfootiiuc, it's possible to add some privileges to the runner. It's also possible to use gitlab runner binary to test .gitlab-ci locally without pushing branches08:48
tristanjjardon[m], :-S08:52
tristanThat should not be08:52
tristanjjardon[m], the output should really be going into the elements/ subdir08:56
tristanAnd I'm trying it here, and it's working, something else is up08:56
tristanAnd indeed08:57
tristanAfter your change, it produces an undesirable conversion08:57
tristani.e. look at your `find` output08:57
tristanbuildstream-tests/sound-server-pulseaudio.bst08:57
tristanbuildstream-tests/weston-common08:57
tristanbuildstream-tests/weston-common/weston.bst08:57
tristanbuildstream-tests/dlna-services08:57
tristanbuildstream-tests/dlna-services/rygel.bst08:57
tristanbuildstream-tests/dlna-services/gupnp-dlna.bst08:57
tristanbuildstream-tests/dlna-services/gssdp.bst08:57
tristanbuildstream-tests/dlna-services/gupnp.bst08:58
tristanbuildstream-tests/dlna-services/gupnp-igd.bst08:58
tristanbuildstream-tests/dlna-services/gupnp-av.bst08:58
tristan...08:58
tristanInstead of putting all the elements into buildstream-tests/elements, its making the root directory full of elements08:58
ironfoothm.. I suggested that change. These were the instructions that were failing: https://gitlab.com/baserock/definitions/blob/768d4adfc8e58a31ec7baf8e66a76c4e5b282374/.gitlab-ci.yml#L3008:58
tristanironfoot, in that case, you should only have to change: bst -C buildstream-tests build elements/gnome/gnome-system-x86_64-content.bst08:59
tristanTo be  bst -C buildstream-tests build gnome/gnome-system-x86_64-content.bst08:59
jonathanmawtristan: looking at source.py, the track() method doesn't mention what it raises. Should I assume that it might raise a SourceError?08:59
tristanironfoot, elements are interpreted as "project element directory relative paths"08:59
tristanjonathanmaw, Yes09:00
tristanjonathanmaw, it can possibly raise other errors though, when using some of BuildStream's internal helper methods09:00
tristanjonathanmaw, from the point of view of a Source plugin, you should only really be concerned with raising SourceError09:01
ironfoottristan: but that exactly is what jjardon[m] tried before: https://gitlab.com/baserock/definitions/blob/dc2986ae68f18dd708f0bc8a7ce49e5eda8c2ef0/.gitlab-ci.yml#L3009:01
tristanironfoot, so because of this line: https://gitlab.com/BuildStream/buildstream-tests/blob/gnu-toolchain/project.conf#L1209:02
tristaneverything should be interpreted as elements/ relative09:02
ironfootright, that flag is new to me09:02
tristanironfoot, *that* commit should work09:03
tristanhttps://gitlab.com/baserock/definitions/blob/dc2986ae68f18dd708f0bc8a7ce49e5eda8c2ef0/.gitlab-ci.yml#L3009:03
tristanThat should definitely work, if not, something I'm not aware of is going on09:03
tristanthat is in fact working fine here09:04
* ironfoot re-triggers the pipeline: https://gitlab.com/baserock/definitions/builds/1410991409:04
tristanironfoot, was that pipeline triggered with --output buildstream-tests/elements ?09:11
tristanbecause... that worked09:11
tristanmight be nice to add `bst show --deps all gnome/gnome-system-x86_64-content.bst` in advance of building09:12
ironfoottristan: well, your theory was correct  :)09:13
ironfootalthough I don't understand. that flag in the config file was there yesterday09:14
tristanI dont understand how it failed before either09:14
ironfootanyway, it's working now09:14
ironfootjjardon[m]: this version is the one that is right: https://gitlab.com/baserock/definitions/blob/dc2986ae68f18dd708f0bc8a7ce49e5eda8c2ef0/.gitlab-ci.yml#L3009:15
tristannow just have to fix that xattrs issue09:17
tristanseems quite strange though, there is nothing ultra privileged about what ostree is doing here09:17
ironfootI've seen the same error before, when trying buildstream in docker. When acceessing the same container twice at the same time, one building, and the other trying to do a `show`09:27
ironfootso, really odd error, I don't think my comment gives any clues09:28
tristanyeah, seems to be docker related ? gitlab runners also use docker ?09:28
tristanironfoot, I looked at your docker docs patch by the way, and looks generally good09:29
tristanWhat I've been thinking... is I'd like to have a "Installing and Running" section around there09:29
tristanAnd the docker docs would fit better as a section of that09:30
tristan(currently it looks like a promotion for using docker, like that is the primary way buildstream should be run)09:31
ironfoot yes, gitlab runners are also docker containers (i believe)09:41
ironfooti may be wrong here though09:41
* tristan just remarked that because he quite often runs `bst show` on a project while it's building and never ran into that09:42
ironfoottristan: I agree with your suggestion for the docs. I didn't want to modify lots of things without having your input09:42
tristanyeah, I should probably just merge your patch as a first step, though09:42
tristanAlso, I want to look into generating man pages and docs for the CLI itself, but I'm not sure exactly how to do that with Click09:43
*** franred has joined #buildstream09:45
jjardon[m]runners use docker, yes09:46
tristanstill, it seems ironfoot was able to use docker without encountering that error09:47
tristanbut then, if the issue has to do with concurrency + docker (i.e. `bst show` triggered it ?), then it may be happening at random09:48
ironfootit might be that the runners do this kind of thing when using docker09:48
ironfootone session to run commands, other to fetch the logs, etc, (i don't have a clue)09:49
jjardon[m]Maybe the underlying is that is runners the docker ages is related? I will check and see if I can use something else (its coreos atm)09:49
*** ssam2 has joined #buildstream09:50
tristanironfoot, but buildstream will do a lot of concurrent ostree anyway, just have to fall on some part where artifacts are getting committed/extracted simultaneously09:50
ironfootwe could do with some investigation :_)09:54
*** Chris has joined #buildstream09:54
*** Chris is now known as chrispolin09:55
tristanironfoot, I dont know, operation not supported looks like an fs thing09:55
* tristan thinks he misread that as "operation not permitted" before09:56
jonathanmawTurns out I'm an idiot. I had some engimatic errors which turned out to be because I didn't notice that class variables and class methods use the same namespace, so I can't have self.track() the method, and self.track the variable!11:51
tristanjonathanmaw, happened to me before :)11:52
* tristan is trying to hook up man page generation into setup.py but it's a pain :-/11:53
jonathanmawtristan, can you give me some insight into how I'm breaking things here https://pastebin.com/K4KU7Y7G12:04
jonathanmawI can see what's probably the offending line12:05
jonathanmawbut I don't see the reason why it's broken12:05
*** brejoc has joined #buildstream12:05
jonathanmawIt looks like the error message that got through was "Unknown exception in SIGCHLD handler"12:05
tristanyeah12:06
tristanjonathanmaw, you already downloaded the latest master from this weekend right ?12:06
jonathanmawtristan: I don't think so12:07
tristanOh12:07
* jonathanmaw is not used to fast-moving projects :/12:07
tristanjonathanmaw, rebase12:07
jonathanmawerm, maybe from the weekend, not sure about monday.12:07
tristanjonathanmaw, I believe I fixed at least how the frontend is handling failures from sources this weekend12:07
tristanI think it was already there monday though12:07
jonathanmawtristan: looks like the only commit I was missing was "main.py: Custom initial loading feedback when not connected to a tty"12:08
tristanOk I'll try to fix it better12:08
tristanyeah that's not it12:08
tristanjonathanmaw, there are 2 things going on here12:09
jonathanmawtristan: when I run bst with --no-interactive, the traceback is less huge, but doesn't seem any more enlightening, btw. I even lose the "Unknown exception in SIGCHLD handler"12:09
tristanthe part from the frontend doing that traceback is what I'm talking about, which needs some additional fixing12:10
tristanthe source of the bug I believe is with open(self._get_mirror_file(), 'w') as f:12:10
tristanjonathanmaw, to explain a bit further, we expect that any errors from plugins get normalized into a SourceError (or any _BstError in fact)12:11
tristanThat ensures that if there is something which can go wrong, the user will get an intelligible error message for it12:11
tristannormalized exceptions, will show up in the output log as an ERROR12:12
jonathanmawtristan: ok, so it might have been a type of error I wasn't expecting. I should expand my except statements to be broader, and then I ought to get better logging.12:12
tristaninstead of throwing an ugly stack trace12:12
tristanjonathanmaw, the problem with the "open" context managers are that they will throw IOError or OSError (forget which) exceptions12:13
jonathanmawaha, I was getting a FileNotFoundError12:13
tristanright, or that12:13
tristanpython312:13
tristanso what's happening I think, is that the leading directories to the file you want to create are missing12:13
tristannote however, that both the self.get_mirror_directory() method... _and_ the self.tempdir() context manager I pointed at the other day, will ensure that those returned directories exist so you dont have to12:15
jonathanmawtristan: yep. though it looks like urllib lets you download files straight into memory, as well as to a filename of your choosing.12:16
jonathanmawwhich at least saves me opening it up to read it.12:17
jonathanmawI hope it is downloading to memory, instead of an anonymous temporary file somewhere, but I couldn't find anything about whether it uses a temporary file or not.12:18
tristanIs it desirable to download the whole file in memory ?12:18
jonathanmawhrm12:18
jonathanmawit saves me downloading it only to open it up12:18
tristanI think you want with self.tempdir():12:18
tristanand download it to a file in that dir12:18
tristanafterwards, use shutil.move() or os.rename() to move it into the desired location in self.get_mirror_directory()12:19
tristanThat is guaranteed anyway to be on the same filesys12:19
tristanso there is no copy12:19
tristanjonathanmaw, Ah I think I get your meaning by "it saves me downloading it only to open it up", because you want to do the sha256sum on it without downloading it ?12:20
tristanThat is rather moot I think in this case12:20
jonathanmawtristan: I don't know of any way to sha256sum without downloading12:21
jonathanmawit's more about guessing it'd be marginally more efficient12:21
tristanjonathanmaw, you will anyway want to mirror it, so for the tarball case, fetch() and track() both just have to ensure that it's mirrored12:21
tristanSo I guess, what you want is a.) ensure_mirror(uri) to download it if it's not there; b.) track() will call that and then do the sha256sum... c.) fetch() will also call that and raise a SourceError if the sha256sum specified in self->ref does not match that of the downloaded tarball12:23
jonathanmawhrm, python docs recommend not using tempfile.mktemp(), which returns a pathname that did not exist when the call was made, but is insecure for making temporary files because something else might create a file with that name before you use it.12:43
jonathanmawSince I want an anonymous name for where I'm downloading the file to, that'll do, however12:43
jonathanmawunless there's a specific function just for generating anonymous filenames.12:43
jonathanmawaha! it doesn't matter, since self.tempdir gives me the insulation I need.12:46
tristanyeah you want self.tempdir() context manager12:51
tristanif there is really an issue with tempfile module, then we should be able to fix it entirely in one place; within Plugin.tempdir()12:52
tristanAh right, that's not an issue, as we use mkdtemp internally12:53
tristanno racing12:53
*** brejoc has quit IRC13:25
jonathanmaw\o/ got a plugin that seems to work for me https://gitlab.com/jonathanmaw/buildstream/commit/8f51d91ce04d166c5cfb74e2bf5e1ce24841ae7513:56
jonathanmawnow to figure out the tests and make sure I actually have all the bases covered13:56
tristanjonathanmaw, :D14:02
jonathanmawtristan, is there a way to run buildstream's test suits only for one set of tests?14:11
jonathanmawi.e. if I created tests/sources/tar.py, would I be able to have it run only for those tests?14:11
tristanjonathanmaw, I dont know how, I suspect pytest may have some way14:12
tristan ./setup.py test --addopts [...] adds options to pytest14:12
ssam2`py.test -k pattern` runs only tests whose name matches 'pattern'14:14
tristanSo ./setup.py test --addopts -k pattern "should" do it14:15
tristanit may require quotes14:15
tristanAnyway, the tests take only 10 or 20 seconds to complete I think14:15
tristanjonathanmaw, so I think that A.) get_unique_key() should include the unresolved origin_url14:16
tristanand B.) take a look at git.py's implementation of get_consistency()14:17
tristanI think for the right experience, consistency should be CACHED if the ref exists (i.e. ref is not None)14:17
tristanRESOLVED if the tarball is downloaded _and_ the ref exists14:18
tristanotherwise INCONSISTENT14:18
tristanOh sorry I got that backwards14:18
tristanRESOLVED if ref is not None, and CACHED if ref is not None _and_ tarball is downloaded14:18
*** tristan has quit IRC14:23
*** tristan has joined #buildstream14:30
*** ChanServ sets mode: +o tristan14:31
jonathanmawtristan: in get_unique_key, I previously stuck with the sha256sum because sha256sum collisions are rare, and if the file is identical it oughtn't to make any difference.15:00
jonathanmaware these assumptions correct?15:00
*** franred has quit IRC15:02
tristanjonathanmaw, it cant hurt15:09
tristanto include it15:10
tristanbut15:10
tristanjonathanmaw, what is more important to me, than which way is ultimately more correct, is that all of the plugins we do include do it the same way15:10
jonathanmawtristan: I see. works for me.15:15
tristanjonathanmaw, note that the test case structure for sources predates the existence of the pipeline, as such it's possible that the fixture there is more unwieldy than it needs to be15:15
tristanWe will want to add a few more sources soon, starting with hg and bzr15:16
tristanjonathanmaw, if you judge that you will save time overall by reworking, and possibly simplifying that fixture stuff, then please feel free to go ahead :D15:17
* tristan thinks there is a lot of potential to restructure and simplify the test cases now that the core is pretty much all written out, but wont be spending time doing that while more pressing things need doing15:19
*** jonathanmaw has quit IRC17:07
*** brejoc has joined #buildstream17:56
*** ssam2 has quit IRC18:09
*** tristan has quit IRC19:50
*** brejoc has quit IRC19:56
albfan[m]tristan: flatpak usage for test suite ready See https://github.com/flatpak/flatpak/issues/69922:38

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