IRC logs for #buildstream for Sunday, 2020-06-21

tristanjuergbi, we exposed it because we needed to allow plugins to manipulate filesystem trees, decide where where to put files, etc03:40
tristani.e. a plugin is allowed to say "take this file from this artifact and put it there in the sandbox"03:40
tristanA plugin was never allowed to modify content or attributes of files03:40
tristanWe did have this conversation years ago, jjardon and valentind when they came up with this plugin, it's a very long time ago03:41
tristanI did point out that the plugin should not be modifying this stuff...03:42
tristanAnd yes, adding the vdir stuff would have been the perfect opportunity to make it impossible to exploit this availability of the directory on disk03:42
tristanNow that we've added these APIs, I definitely think we need to remove them before 2.0, and I'll raise a thread about this03:44
tristanAnd yes of course the crawling of the hierarchy and invoking non Element/Source APIs is separate, I noticed this bug a long time later, after bst-plugins-experimental was created03:45
*** tristan has quit IRC04:56
*** tristan has joined #buildstream06:36
*** ChanServ sets mode: +o tristan06:36
tristanjuergbi, https://mail.gnome.org/archives/buildstream-list/2020-June/msg00017.html, https://lists.apache.org/list.html?dev@buildstream.apache.org06:38
tristanIssue raised on the ML now :-S06:38
juergbitristan: ta, further 'experimental' plugins are affected, though. bazelize, collect_integration, dpkg_build, dpkg_deploy, flatpak_image and tar_element all also create files in the sandbox directory, in addition to collect_manifest and oci06:47
juergbii.e., almost every bst-plugins-experimental plugin that isn't just a BuildElement with a yaml file violates this06:48
tristandpkg_build & dpkg_deploy as I recall they were implemented initially, did not write this stuff directly to the sandbox06:52
tristanCrap maybe dpkg_deploy does ?06:52
juergbidpkg_deploy creates debian's control file, package-scripts (postinst etc.) and md5sums files06:53
juergbisame for dpkg_build06:53
juergbiah no, dpkg_build reads them06:53
tristanYeah06:53
tristanI think we should be able to expose plugins to code which runs in a sandbox and that should fix basically all of these problems06:54
tristanIn fact, plugins can already do this by setting up the environment06:54
tristanThat is a bit less than ideal though when it comes to lists06:54
tristanIt would be better if the core had a way to guarantee that such public data being exposed in some way to a sandbox, is stably sorted and consistent across buildstream versions / execution environments06:55
tristanAs it stands, I bet that the outputs of plugins like collect_manifest are already not reproducible due to python's dictionary randomization06:56
juergbididn't Python make dict ordering stable a while ago?06:57
tristanIt did the opposite06:57
juergbiguaranteed to be insertion order, iirc06:57
tristanIt used to be stable, and then it was intentionally made random in order to ensure people caught bugs where they relied on ordering06:57
tristanThat happened near the beginning of BuildStream06:57
tristanmaybe it became random in 3.5, while in 3.4 is was stable06:58
juergbitristan: "06:58
juergbiChanged in version 3.7: Dictionary order is guaranteed to be insertion order. This behavior was an implementation detail of CPython from 3.6."06:58
juergbisince 3.7 it's explicitly guaranteed06:59
tristanChanged back again06:59
juergbihowever, effectively it's that way since 3.606:59
juergbiwhich is our minimum version06:59
tristanWell, clearly it's not rational to depend on python to be consistent06:59
juergbino, unfortunately not06:59
tristanjuergbi, We were using OrderedDict for that at some point fwiw07:00
tristannear the close of 3.4 support and adding 3.5 support07:01
juergbitristan: how do you envision plugins executing code in the sandbox? I don't think we have a good story for this currently07:01
juergbiI definitely like going into that direction07:01
tristanRight now it means running commands in the sandbox07:01
juergbiI mean, code that is essentially part of the plugin07:01
tristanLike autotools BuildElement does, or cmake or whichever07:02
juergbian element plugin in a bst project-independent repo could place any code in the sandbox07:02
tristanFurther than that, there are some proposals on the table already07:02
tristanOne of them being default dependencies for element kinds07:02
tristanAnother one being a recent idea tied into composite plugins07:02
tristanWhich is somewhat related07:02
tristanI.e. it would be nice to consider some plugins to be "Bound to the project they originate from", if you are using cross-junction elements07:03
juergbiyes, something along that line07:04
tristanThis was the idea for the BSP composite plugin thread, i.e. "Give me a freedesktop-sdk BSP element to use in my project, which itself internally depends on all of the artifacts it uses for deployment"07:04
tristanAnd it would be a composite plugin which would do all of the initrd, filesystem root composition, and syslinux bootability stuff with multiple elements internally07:04
tristanOf course that would be an end result of a few different developments07:05
tristanBut until that happens, plugins just have a dependency on tools existing in the sandbox, and project authors need to provide those tools07:06
tristan(that's kind of always been the case)07:06
tristanI recall in the early days we discussed preflighting in the sandbox similar to host tooling; i.e. allow build elements to fail with more interesting error messages when a tool they depend on does not exist in the sandbox07:07
tristan(not very preflight but still an interesting assertion to have)07:07
tristanThe story of implicit plugin dependencies on elements is a tricky one on it's own to solve - for autotools/cmake etc, we want to run those tools staged into the sysroot of the payload we're building07:09
tristanWhen considering implicit plugin dependencies for deploying FS images, we don't care at all about that and such bindings could be less error prone07:09
tristanFor autotools/cmake etc the idea was always to have the project authors define that once in project.conf (just to save some typing in the project elements)07:10
*** tristan has quit IRC07:21
*** tristan has joined #buildstream07:26
*** ChanServ sets mode: +o tristan07:26
*** lantw44 has quit IRC16:08
*** toscalix has joined #buildstream19:17
*** toscalix has quit IRC21:33

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