IRC logs for #buildstream for Tuesday, 2020-05-19

*** aminbegood has joined #buildstream02:02
*** aminbegood has quit IRC02:22
*** narispo has quit IRC04:27
*** aminbegood has joined #buildstream05:12
*** persia has quit IRC06:42
*** persia has joined #buildstream06:44
*** jude has joined #buildstream07:29
*** hasebastian has joined #buildstream07:30
*** tpreston has joined #buildstream07:42
*** benschubert has joined #buildstream07:51
*** aminbegood has quit IRC07:58
*** Stella8252 has joined #buildstream08:25
*** Stella8252 has quit IRC08:26
*** ikerperez has quit IRC08:27
*** hasebastian has quit IRC08:28
*** narispo has joined #buildstream08:40
*** santi has joined #buildstream08:51
*** tpollard has joined #buildstream08:52
*** tristan has joined #buildstream09:03
*** phildawson has joined #buildstream09:06
*** ChanServ sets mode: +o tristan09:09
tristanis it known that we're getting spurious errors from artifactservice.py::test_update_artifact() ?09:38
tristanhttps://gitlab.com/BuildStream/buildstream/-/jobs/55853647009:38
tristanbenschubert, Do we have some convenience function to load a string which is supposed to be an element, and does some basic validation on that ?09:44
tristanOr, should we ?09:44
tristanhmmm09:44
benschuberttristan: what kind of validation? AFAIK we can just yaml.load_data it then try loading it as an element? Probably not the best though. Or are you thinking about something else?09:45
tristanbenschubert, well, we have something for ensuring project paths and that they exist, when we have strings which are expected to be paths in the project09:47
tristanI thought something like that but which takes the element path into consideration09:47
tristanI'm not sure it makes sense to have that though honestly09:48
benschubertIf we need it, probably, but not sure right now where there is a need09:48
tristanmaybe not, for elements which need configuration of specified elements, we're only really allowed to know about dependencies, and for that I believe elements like script and x86image will have to validate on `self.search()`09:49
tristanI was thinking of plugin origins specifying a junction, but in that case it's also fine to just trust the string and complain that "the specified junction element '../@ - @/;;' doesn't exist" (or we failed to load it or smth)09:51
benschuberttristan: for plugin origins with junctions, we'd try to load the junction first right? So the validation would happen then09:54
juergbitristan: test_update_artifact: hm, that's an INTERNALERROR, i.e., before a test is actually running. pytest/xdist bug?09:55
tristanbenschubert, right, I'm seeing that basically we would call the current loader's .get_loader() method for the specified junction, and delegate validation to that09:58
* tristan is noticing that .get_loader() still needs to be made public on the Loader() object (it's currently _get_loader())09:59
benschuberttristan: that's what I think is simplest, as we make sure that all our junction loading code goes through the same place :)09:59
tristanjuergbi, I guess yeah10:00
tristanwish that would magically get fixed10:00
tristanAlso looking at Loader() public API, I'm seeing get_state_for_child_job_pickling(), this is confusing... is this part of Angelos's win32 support ?10:02
tristanThe confusing part about that, is I don't really understand why we would ever send a "Loader" from one thread/process to another10:02
juergbitristan: yes, child job pickling is from Angelos's win32 effort. the code path should be exercised in the 'spawn' CI job we have (running on Linux as win32 port is incomplete)10:21
*** devcurmudgeon has quit IRC10:21
*** cphang has quit IRC10:21
juergbisounds odd to me as well OTOH, however, I haven't taken a closer look10:21
juergbimaybe just some small bits of data are needed from the loader object10:22
tristanYeah, I feel like it would be more worth while finding out what those are and eliminating them, rather than supporting pickled loaders10:24
tristan(or loaded pickles)10:24
* tristan tries to stay on track with what he's doing, but is getting distracted by some warts heh10:24
tristanmight be time for some minor refactors soon10:24
tpollardThere should be a catchall issue for the win32 work10:26
tpollardcan probably link back to why it's needed through that10:26
tristanStrange, it appears from pluginfactory.py that local plugins don't support the default .yaml files10:34
tristanThat's more in line with the code I'm writing so I can ensure there is a test for that10:35
tristantpollard, Yeah I recall Angelos was verbose and we should be able to track the reason for that pretty easily10:36
*** cphang has joined #buildstream10:37
*** hasebastian has joined #buildstream10:55
*** narispo has quit IRC11:03
*** narispo has joined #buildstream11:03
*** Aubree2429 has joined #buildstream11:11
tristanIt also looks like no more than one plugin loaded from a given pip origin can have it's defaults loaded11:12
*** Aubree2429 has quit IRC11:12
* tristan expands the scope of his pluginfactory refactor before moving on to junctions11:13
tristanneeds untangling11:14
*** tristan has quit IRC11:20
*** phoenix has joined #buildstream11:31
*** tristan has joined #buildstream11:51
*** phoenix has quit IRC12:17
*** flatmush has quit IRC12:26
*** Adeline4916 has joined #buildstream12:41
*** Adeline4916 has quit IRC12:42
*** aminbegood has joined #buildstream12:49
*** aminbegood has quit IRC12:54
WSalmonjuergbi, now that benschubert's variable fix has landed can we rebase juerg/dynamic-plan there isnt a gui button while its wip, are you ok with me pushing the rebase to it? it was a clean rebase13:24
juergbiWSalmon: yes, go ahead13:37
juergbishould still add a test before we can merge it13:37
WSalmon+1 for tests13:42
*** Melanie6395 has joined #buildstream14:31
*** Melanie6395 has quit IRC14:33
*** phoenix has joined #buildstream14:50
*** phildawson has quit IRC15:22
*** phildawson has joined #buildstream15:22
*** jude has quit IRC16:26
tprestonIs it possible to affect the "variables" mapping in a stack element?16:32
tprestonIs it possible to affect the "variables" mapping in one of a stack element's dependencies?16:32
tprestonIn particular, I'm interested in changing the value of `variables: rootfs-size: 2G` in an element which is in another project (included via junction)16:34
tprestonI believe I can do this with includes, but its a bit hacky16:34
tpreston(include the element first, then overwrite the value)16:34
juergbitpreston: you can't affect variables of dependencies as each element exists only once in a pipeline (unless in the special case where the same project is used multiple times via junctions)16:35
tprestonOk that makes sense16:37
juergbiif you want multiple elements in a single pipeline that differ only slightly, includes are probably the right approach indeed16:37
juergbiand in some cases junctions (e.g., for bootstrapping stages or multi-arch builds)16:38
tprestonjuergbi: what if you have an element that likely needs changing, eg linux kernel (config). What is the canonical approach for doing this in two projects?16:44
tprestonFor example: gnome-build-meta "consumes" freedesktop-sdk. Can gnome-build-meta consume and extend the linux kernel in freedesktop-sdk?16:45
tprestonOr do we have to re-implement the kernel element in every project?16:45
juergbithat's quite a different question as you typically don't want to build multiple different kernels in a single pipeline16:45
juergbi(if you do, junctions probably make sense for this, but they don't solve the sharing of the common part)16:46
juergbilinux kernel config is tricky as it needs to meet the requirements of hardware (platform as well as peripherals) as well as userspace and project/product policy16:48
juergbifor good reuse you probably want a modular configuration where you separate e.g. hardware-specific config fragments from other aspects16:49
benschuberttpreston: what I usually do is I have a second source on my junction, which applies a quilt patch. It's not great as that voids most of the keys in the junction's project, so no cache hit, but it allows me greater control of my dependency16:50
juergbifor a kernel with different config you anyway need a rebuild but userspace components shouldn't build-depend on the kernel, so that aspect should not be an issue16:51
tprestonjuergbi: sure but how do I split the module kernel config across two projects?16:51
tprestonFor example, the project I'm working on collects together all the bits for a raspberry pi16:52
tprestonIt builds a certain kernel, with a certain config16:52
tprestonAnd my other project - which consumes the raspberry pi project - needs some extra kernel config16:52
tprestonhow do I use the "rasbperry pi kernel element" but add in my own kernel config16:53
juergbitheoretically, one option would be to define an element for each kernel config fragment16:53
tprestonRight, so the16:54
juergbithese would be simple import elements that place the config in a particular location16:54
tprestonwhoops16:54
juergbiand then you depend on those config elements that you want16:54
juergbiand the common part of the kernel element itself (build/install) would either be defined in an include, or maybe it would even make sense to create an element plugin for the linux kernel build system16:55
tprestonSure an element plugin would make sense. I want to build for a few different boards to get a feel for specifics of that16:55
tprestonSo, using this example, the "raspberry pi support project". Now it only provides a config fragment - to be consumed by the kernel element in my "main app" project16:56
tprestonBut what if the kernel source is somewhere weird16:56
tprestonhow do I "provide" the source URL16:57
tprestonanother include?:16:57
juergbiyes16:58
tprestonok16:58
tprestonthat's useful, I'll go away and experiment with some of those ideas16:58
tprestonthank you!16:58
juergbitpreston: kernel source is often not straight forward, of course. hardware and userspace might even have conflicting constraints on kernel version/patches16:59
juergbior may need manual reconciliation16:59
tprestonjuergbi: sure, and ultimately if something really complex needs to happy then the "main app" project needs to have full control over how everything is built16:59
juergbiyep16:59
tprestonOur goal atm is really just to provide a grab-bag "BSP" project, to make life easy for someone who just wants to put X on a raspberry pi17:00
juergbisure, that would definitely be great as starting point17:01
tprestonbenschubert: thanks also, but I think we're trying to avoid tracking patches!17:01
benschubertthat makes a lot of sense :) no worries!17:02
juergbitpreston, benschubert: I'm wondering whether it could make sense to generalize/extend the `origin: junction` approach for element sources as well17:02
juergbito get 'local' files from a junctioned project17:03
juergbibut there might be better ways to approach that17:03
benschubertwouldn't an import element work from the base project?17:03
tprestonjuergbi: I'm not sure what you mean?17:03
tprestonLike, accessing local files via a "self" junction?17:04
juergbibenschubert: the issue is that you can't put an element into the source list17:04
benschubertright17:04
juergbitpreston: no, adding e.g. a kernel config fragment from a bsp junction to the source list in the kernel element17:05
benschubertI'm not sure I like the idea but if there's a need, it woul dmake sense unless we have a nicer solution17:05
juergbibenschubert: it is related to the question of whether to support specifying the destination path for dependencies17:05
juergbifrom some point of view, a source is also just a dependency17:05
juergbithey have different constraints. and sometimes it would be useful to be able to use one as the other17:06
juergbi(just a thought related to the above discussion. don't have a concrete proposal at this time)17:07
tprestonbenschubert, juergbi: do you mind if I copy this discussion somewhere?17:18
tpreston(issue tracker, public)17:18
benschuberttpreston: it's archived and public anyways, no problem with that for me :)17:18
tprestonthanks!17:18
benschubertjuergbi: good point, I sometimes would wish to be able to use an element as a source too (imagine building deb files. You could have sources -> package -> install in the pipeline)17:19
benschubertjuergbi: would that be something we should consider?17:19
juergbitpreston: sure17:21
philni'd need to add a "ruby gem" in my project, that doesn't supported yet?17:22
philnhttps://paste.debian.net/1147666/17:23
juergbibenschubert: it's not in our bst 2.0 plan. we probably don't want any major core changes related to this. however, it wouldn't hurt to give it some thought whether bst could become a bit more flexible in this regard17:24
benschubertjuergbi: right, that might be a good thing to open for discussion on the ML17:25
benschubertI can start that in a few days17:25
benschubertif you think it might be useful17:25
pointswavesphiln: the issue is how the tar source expects your tar to have a folder inside its self and to extract that17:25
pointswavesyou need to tell it not to worry and just extract everything in the tar17:26
philncould i just download the file and not extract it?17:26
philni suspect `gem install` expects a .gem file17:27
philnah maybe with the `remote` source kind17:28
pointswavesphiln: if you change https://docs.buildstream.build/1.4.3/sources/tar.html base_dir:'*' to base_dir:'' it will just extract the tar17:28
pointswavesoh sorry right you want the gem as is17:28
pointswavesyep remote may be a better bet17:28
philnyay that works, now need to fix the gem install call17:29
pointswavesphiln i would expect that you need to tell it to use a prefix17:30
pointswavesso it installs in the install folder not the base of the sandbox17:30
philnpointswaves: ERROR:  While executing gem ... (Gem::FilePermissionError)17:30
philn        You don't have write permissions for the /usr/lib/x86_64-linux-gnu/ruby/gems/2.6.0 directory.17:30
pointswavesyep because `/` is read only17:31
juergbibenschubert: I'm not sure whether it makes sense to open this potential can of worms as general discussion on the ML. I would probably only post if we have a concrete proposal. or if you want to ask for suggestions for a concrete use case17:33
philnpointswaves: --install-dir %{install-root} got me further, need to fix some compile error now :) thanks!17:33
pointswavesphiln: no problem17:33
pointswavesphiln: i would gues you need some more build dependencies?17:34
philnpointswaves: i'm not sure yet, https://paste.debian.net/1147668/17:35
pointswavesalso projects like FD get you to install in something like %{install-root}/%{prefix} as lots of things like you to install in /usr/bin etc17:35
philnah, yeah right, i'll need to double-check that17:36
pointswavesyep that looks a lot like a missing dependency17:37
pointswavesbut im not promising17:37
*** tpreston has quit IRC17:38
philnpointswaves: i was using an old version of them gem, it installed now after updating to 1.8.517:38
pointswavesBrill17:39
*** santi has quit IRC17:40
*** santi has joined #buildstream17:42
philnpointswaves: seems to work! thanks again! https://paste.debian.net/1147670/17:42
pointswavesGreat, I have never used ruby in buildstream so let use know how it's going we can have a plugin to reduce the boiler plate if needed17:44
philnfirst time ruby user here too :)17:44
*** santi has quit IRC17:44
philnhttps://paste.debian.net/1147671/ is my final version17:44
benschubertjuergbi: makes sense I might postpone17:46
philnpointswaves: ah, now packaging the highline gem, seems like it depends on more gems... i'd need to download them as sources, similarly to the cargo/crate plugin17:52
philngem install highline-2.0.3.gem --install-dir /buildstream-install//usr17:52
philnWARNING:  Unable to pull data from 'https://rubygems.org/': no such name (https://rubygems.org/specs.4.8.gz)17:52
pointswavesPhil yep, that way you have trust worthy cache keys18:02
pointswavesphiln even18:02
pointswavesNo network in the sandbox18:02
pointswavesFor building18:02
philnhttps://help.rubygems.org/kb/rubygems/installing-gems-with-no-network18:03
philni'll have a look at writing a plugin for this18:05
pointswavesLooks like if you know all the deps then you could just install them one at a time and dep on the bst files but a plugin would be a much snazzier way to do it18:07
*** tpollard has quit IRC18:15
*** hasebastian has quit IRC18:26
*** xjuan has joined #buildstream18:56
*** xjuan has quit IRC19:36
*** xjuan has joined #buildstream19:37
*** philn has quit IRC19:49
*** philn has joined #buildstream19:49
*** benschubert has quit IRC19:58
*** phoenix has quit IRC20:32
*** Luna7407 has joined #buildstream20:43
*** Luna7407 has quit IRC20:45
*** xjuan has quit IRC21:50
*** Kennedy8735 has joined #buildstream22:20
*** Kennedy8735 has quit IRC22:20
*** Aurora6901 has joined #buildstream22:26
*** Aurora6901 has quit IRC22:27
*** narispo has quit IRC22:45
*** narispo has joined #buildstream22:51
*** Nora7531 has joined #buildstream23:39
*** Nora7531 has quit IRC23:41

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