IRC logs for #buildstream for Monday, 2017-09-11

gitlab-br-botpush on buildstream@testing-shell (by Tristan Van Berkom): 2 commits (last: element.py: Changed Element._shell() behaviors.) https://gitlab.com/BuildStream/buildstream/commit/4780f71105e6494cb63a34e551cba1a4e8c75a3700:27
gitlab-br-botpush on buildstream@testing-shell (by Tristan Van Berkom): 1 commit (last: _sandboxbwrap.py: Make terminal control setting conditional on stdin being a tty) https://gitlab.com/BuildStream/buildstream/commit/6e6924fc15b85763d83ed917e74b653f05655ffd01:22
gitlab-br-botpush on buildstream@testing-shell (by Tristan Van Berkom): 2 commits (last: _frontend/main.py: Changes to the bst shell command) https://gitlab.com/BuildStream/buildstream/commit/9270d4214cfb66088dd8cf67123047229a08a54103:07
gitlab-br-botpush on buildstream@master (by Tristan Van Berkom): 3 commits (last: element.py: Changed Element._shell() behaviors.) https://gitlab.com/BuildStream/buildstream/commit/4780f71105e6494cb63a34e551cba1a4e8c75a3703:18
gitlab-br-botbuildstream: issue #86 ("bst shell --command requires a shell") changed state ("closed") https://gitlab.com/BuildStream/buildstream/issues/8603:18
*** exalm has joined #buildstream04:18
*** bochecha has joined #buildstream08:22
*** bochecha has quit IRC08:27
*** bochecha_ has joined #buildstream08:28
*** jonathanmaw has joined #buildstream08:54
*** jude has joined #buildstream08:59
*** tlater has joined #buildstream09:20
gitlab-br-botpush on buildstream@24-better-validation-for-loaded-yaml (by Tristan Maat): 7 commits (last: Add _yaml.validate_node) https://gitlab.com/BuildStream/buildstream/commit/e7612f42a4e53140204adacecfda50788aeca71011:10
gitlab-br-botbuildstream: merge request (24-better-validation-for-loaded-yaml->master: Resolve "Better validation for loaded YAML") #87 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/8711:10
gitlab-br-botpush on buildstream@24-better-validation-for-loaded-yaml (by Tristan Maat): 20 commits (last: _artifactcache/artifactcache.py: Removed remove()) https://gitlab.com/BuildStream/buildstream/commit/e368f29bfc0f1df7ca91dc023cfce69670b78a9611:11
gitlab-br-botbuildstream: merge request (24-better-validation-for-loaded-yaml->master: Resolve "Better validation for loaded YAML") #87 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/8711:11
gitlab-br-botpush on buildstream@70-third-party-plugin-sharing (by Tristan Maat): 2 commits (last: Add plugin dependencies) https://gitlab.com/BuildStream/buildstream/commit/f4ee0efafc4565a5f6dad0d1f24f56bcab5713c611:41
gitlab-br-botbuildstream: merge request (24-better-validation-for-loaded-yaml->master: Resolve "Better validation for loaded YAML") #87 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/8711:57
*** tlater has quit IRC12:02
*** tlater has joined #buildstream12:25
bochecha_huh12:43
bochecha_    pushreceive: INFO: Executing ssh -l bochecha -p 22 richmond.toniob.net bst-artifact-receive --verbose /srv/www/daitauha.fr/www/static/ideascube/artifacts12:44
bochecha_    pushreceive: INFO: Receiving repository information12:44
bochecha_    bash: bst-artifact-receive: command not found12:44
bochecha_that's what I get when I try pushing artifacts :-/12:44
bochecha_yet, bst opens a login shell (`ssh -l`) which means the ~/.profile file should be read12:45
bochecha_and that files adds ~/.local/share/bin (where bst-artifact-receive is installed) to the PATH :-/12:45
bochecha_same with setting the PATH in the ~/.bashrc file anyway12:46
bochecha_oh no!12:47
bochecha_> If command is specified, it is executed on the remote host instead of a login shell.12:47
bochecha_ok, so that explains it :-/12:47
gitlab-br-botpush on buildstream@24-better-validation-for-loaded-yaml (by Tristan Maat): 5 commits (last: project.py: Add project config node validations) https://gitlab.com/BuildStream/buildstream/commit/ae6e7e335457b7377e5bb56f9721067d124001fc14:00
gitlab-br-botpush on buildstream@24-better-validation-for-loaded-yaml (by Tristan Maat): 4 commits (last: context.py: Add user config node validations) https://gitlab.com/BuildStream/buildstream/commit/1661053b50c474af90868ce44f17c3a4754cc79b14:24
gitlab-br-botbuildstream: merge request (24-better-validation-for-loaded-yaml->master: Resolve "Better validation for loaded YAML") #87 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/8714:31
gitlab-br-botbuildstream: merge request (24-better-validation-for-loaded-yaml->master: Resolve "Better validation for loaded YAML") #87 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/8714:54
gitlab-br-botpush on buildstream@70-third-party-plugin-sharing (by Tristan Maat): 17 commits (last: Removing artifact cache tests.) https://gitlab.com/BuildStream/buildstream/commit/d1d5873ff50750c092a762ef851ff6ae915c414f15:05
tristantlater, do you have time to look over the plugins stuff together before I jump on a bus and get to a proper coffee shop ?15:25
tlatertristan: Yup15:25
tlaterHang on just a second, I'll link you to the current plugins repo...15:26
tlaterhttps://gitlab.com/tlater/buildstream-plugins15:27
tlaterWith the current interface all a plugin repo needs to do is define entry_points with a specific key15:27
tlaterUsing plugins from such a repo is a bit less clear15:28
tlaterI don't think I like the idea of 'requiring' a plugin, since we already capture that idea with namespaces15:28
tristanI'm looking at the branch now15:29
tristansetuptools and entry points15:29
tlaterSimply specifying 'buildstream-plugins;autotools' as the kind seems more sensible.15:29
tristanbuildstream's plugins should not need the namespace though15:29
tlaterThey don't with the current implementation15:30
tlater'buildstream' could be a special namespace just for consistency, too, even if not required.15:30
tristanwell I see your point about not requiring packages explicitly, you will anyway get an error15:30
tristanthat a plugin is missing15:30
tristanAnd perhaps if the error comes with a prefix that works15:31
tristanAlso the plugins are individually format revisioned already15:31
tristanSo you should be able to require a version of plugin 'foo:bar'15:31
tlaterWould that translate to 'kind: buildstream-plugins;autotools:1.0'?15:32
tristanIs there a way we can continue to use pluginbase for these packages too though ?15:32
tristantlater, no you require them once in your project.conf15:32
tlaterUnfortunately there's no way pluginbase can work with this, there is no way to access the original source file.15:33
tlaterpluginbase explicitly says that it's incompatible15:33
tristanSo can we get setuptools to report a directory ?15:33
tristanAnd share an install directory with buildstream ?15:33
tlaterNot as far as I've seen - especially not since things might be packaged as zipfiles15:34
tristanThere must be a way15:34
tlaterWe could maybe hack it with __file__, but I don't think that would work well, if only because zipfiles can happen.15:34
tristantlater, there is a reason we use pluginbase15:35
tristanSo I'm trying to find out how to properly share data files/directories between packages15:35
tlaterWhy do we use pluginbase?15:36
tristanbecause while it might be possible that one can assume the plugin sets loaded for two pipelines in the same python interpretor are the same, for installed plugins; I'd rather not break that15:36
tristanpluginbase is a namespaced loader, so the set of plugins in two loaded Pipelines are completely isolated, intentionally15:37
tristanif for instance with recursive pipelines, I want to explicitly use this package of "foo" for every "foo:bar", I will no longer be able to offer that possibility if we throw away pluginbase15:37
tristanThe buildstream package structure is also very delicately constructed to ensure that buildstream plugins are not part of the same package namespace15:38
tristanSo we make sure we are always exercising the same codepath for loading plugins15:38
tristanexternal or internal15:39
tlatertristan: Doesn't setuptools' 'dist' property cover that as well?15:39
tristanCover what ?15:40
tlaterNamespaces - to be a different 'dist' you need to be a completely separate package.15:40
tristantlater, what if I want 1.0 of foo in pipeline A and 1.2 of foo in pipeline B15:41
tristanin any case, setuptools is something I want to trust less, not more15:41
tristanit's completely inappropriate crap for our use cases, we're barely forcing it against it's will to do what we need15:41
tlatertristan: Hm, alright, I understand.15:42
tlaterI'll try and see if there's a way to hack this in, though I'm pretty sure from past experiences that it will break on zipfiles15:42
tristanThen there is another way15:42
tristanTo ensure they are not zip files15:43
tristanWhen installing a plugin package, that package requires buildstream; which means buildstream is there is to inform it already with some metadata that "you must put your plugins *here*, not in some zip file"15:43
tristanI know, setuptools is crap, and I've been pondering what the future will hold15:44
tristanwonder if we can switch to something like meson perhaps15:44
tlatertristan: We can't enforce installation, though, that's up to the package maintainer. Unless we roll our own package installation script that runs on top of setuptools.15:45
tlaterActually, that could work, something like buildstream.setuptools15:45
tlaterWhich just overrides something very minor to enforce non-zip plugins15:46
tristanI'm not sure what you mean about enforcing installation15:50
tlatertristan: Enforce no zipfiles during installation15:50
tristantlater, the user should be told that the package was not found and needs to be installed right ?15:50
tristantlater, we certainly must be able to, for instance anything installed in data_files would break right ?15:51
tristanit has to be readable back from %{prefix}/path/to/resource15:51
tlatertristan: Right, yes, that's necessary anyway.15:51
tristancertainly you cannot install man pages in a zip15:51
tlatertristan: Would it be alright to override the setuptools.setup function to ensure that it contains the no-zipfile flag, and mandate that buildstream plugins use our custom buildstream.setup function?15:53
tlatertristan: I think that will be the closest to a user-friendly way to do this.15:53
tristanHrm15:54
tristanWell, I guess the API for plugin installation doesnt have to be as golden stable as everything else :-/15:55
tristantlater, I'm not seeing the how right now but yeah sure you can, lets make sure we're using pluginsbase and not setuptools for loading plugins, and make sure the project/user facing API for requiring plugins is something we're comfortable with long term15:58
tristanconsidering that setuptools is something we probably need a real replacement for, we'll hopefully end up yanking it out before too long15:59
tlatertristan: Is the 'kind: <dist>;<plugin>' syntax enough? I think it's pretty sensible, though I'm not sure where versions would move into this.16:00
tristanso then we may have to change the story of how plugins get installed unfortunately; but at least the API for projects to require them will remain the same16:00
tristanI would stick to colon and not semicolon16:01
tristanjust like the source aliases16:01
tristanIn fact, there may even be an aliasing game that might one day be fun at that level16:01
tristanbut anyway16:01
tristantlater, to answer your last more concretely; I think it's enough to address a plugin from a project element, I'm not *sure* that we dont need anything explicit in project.conf about the plugin package, but in any case if we do; it looks like that can later be added in an API compatible way16:09
tristanso for now, addressing a plugin from a package as <package>:<plugin> being the only thing, is fine16:10
*** jude has quit IRC16:17
tristantlater, looks like maybe http://setuptools.readthedocs.io/en/latest/pkg_resources.html#resource-extraction might be of help16:47
tlatertristan: Interesting, last I used that function it did not extract files16:51
tristanwas the resource_name meaningful ?16:52
tlatertristan: I'll check, I think this is how I made a plugin system in the past16:53
tristanresource_listdir() should tell I think16:53
*** exalm has left #buildstream16:53
tlaterThis works: pkg_resources.resource_string('elements', 'autotools.py')16:56
tlaterThe package module actually has to be sensible, but that's not too bad, and extending with '.py' automatically should be fine.16:57
tlaterHmmm16:57
tlaterAlthough now two packages could technically define the same module, which would break things16:58
tristansigh16:59
tristancan we solve the big problem now ? what can we put off till later16:59
tristanI looked at meson python support and it looks like we would have to change a lot (and the support is not that amazing either)17:00
tristanat least looking at: https://github.com/mesonbuild/meson/tree/master/test%20cases/python317:00
tristantlater, so we can consider that a python package is a valid source of loading packages, in which case the namespace should be the unique package name according to the package manager right ?17:01
tlatertristan: Probably just something in the documentation I haven't found yet - there is no way this function would *require* every package to have different module names17:01
tristanIn which case there can never be two17:01
tristanMore than one separate package can have the same modulename but that would be fine17:02
tristanIn the future, we can add other sources for loading packages17:02
tlatertristan: Yes, but this function doesn't seem to use python packages, but rather python modules, and presumably picks the correct file randomly.17:02
tristaninstead of just "your pip managed mess"17:02
tristanSo the module needs to be an __init__.py, and the actual plugin has to be in a subdirectory of that separated by a directory that has no __init__.py ?17:04
tristanyuck17:04
tristanmaybe setting the name="packagename" in setup() should be enough ?17:04
tlatertristan: That could be it, I named the package buildstream-plugins, it might not like the dash17:05
tristanit wouldnt no17:05
tristanI like dashes, python wouldnt17:05
tlaterHm, no, that isn't it either. Damnit this documentation needs links.17:06
*** jude has joined #buildstream17:07
tristantlater, I think you need to do this in the shell17:08
tristanmaybe you are anyway :)17:08
tlatertristan: I even installed ipython x)17:08
tristanseems to be a common python thing17:09
tristanpoking at live apis and seeing what they do, and printing their docstrings17:09
* tristan better check the next bus time17:10
tristanOh... before I go...17:10
tristanANY thoughts on the email which is too long to read ?17:10
* tlater No, but probably not meant for that question either. I like the cool keys17:11
tlater;)17:11
tristanhttps://mail.gnome.org/archives/buildstream-list/2017-September/msg00000.html17:11
tristanParticularly, I think the S-Expressions are going to be winner17:12
tristanI've used those to automate queries in custom orm-ish setups (EDS does that too), they save a lot of typing17:13
tristanand they are also easily parseable (just additional structured recursive lists of lists)17:13
tristanI personally wish I could take away the quotes in the special keys17:14
tristanthat would make it not quite yaml but slightly augmented yaml17:14
tristanand would require a bit of tinkering in the parser17:14
tristanOr; possibly just a preprocessing phase17:15
tristanI think there is precedence, I could of swore I saw some gitlab docs for special keys like `>>:` (without quotes)17:15
tristanthat was what inspired that idea of using tokens like that17:16
*** jonathanmaw has quit IRC17:17
tristanAhhh right that is part of yaml itself17:17
* tristan palmface17:18
tristanhttps://stackoverflow.com/questions/41063361/what-is-the-double-left-arrow-syntax-in-yaml-called-and-wheres-it-specced17:18
tristaneg17:18
tristanstill viable but I wonder what we can do better...17:18
tlatertristan: I found the magic formula \o/17:19
tlater"package.dist.get_resource_string(None, package.module_name.replace('.', os.sep) + '.py')"17:19
tristantlater, mhm so... this is basically allowing us to use the pip installation as a dictionary of plugin packages17:20
tlaterYup. This should work for the .yaml templates too, though we should add specialized loading for those files too.17:20
tristanI think that this is decent first step, even without anything explicit in the project talking about plugin packages17:20
tristanLater if we want to evolve on that and treat plugins more strictly (it's interesting to tie third party plugins to stricter revisioning policy)17:21
tristanthen we can add something to project.conf, telling buildstream exactly where to load the package from17:21
tristanbut in any case, we use pkg_resources as a dictionary and it means we'll be able to load system wide or user level installations17:22
tristanand we still use the same loading mechanics, ok sounds good to me17:22
tlaterAnyway, it's almost 6:30 here, I think I'll implement that tomorrow.17:23
tristanyup17:24
tristangood evening !17:24
tlatero/17:24
*** tlater has quit IRC17:25
gitlab-br-botpush on buildstream@master (by Tristan Van Berkom): 1 commit (last: Generating man pages) https://gitlab.com/BuildStream/buildstream/commit/7bc2e070182fc45b9e6d630e95d5e90d97fc910e17:25
gitlab-br-botbuildstream: Tristan Van Berkom deleted branch testing-shell17:25
gitlab-br-botbuildstream: merge request (interactive-bst-shell-cmd->master: Allow forcing an interactive 'bst shell') #85 changed state ("closed"): https://gitlab.com/BuildStream/buildstream/merge_requests/8517:32
*** tristan has quit IRC17:39
*** tristan has joined #buildstream18:18
*** ChanServ sets mode: +o tristan18:18
*** jude has quit IRC18:30
*** tristan has quit IRC20:02
*** tristan has joined #buildstream20:02
*** ChanServ sets mode: +o tristan20:02
tristanSo here is some fun little code: https://bpaste.net/show/ee645f3d5ecd20:03
tristanA little writeup sexp variable evaluation expression code20:03
tristan condition: (and (opt "debug") (ifeq (opt "logging") "max"))20:04
*** tristan has quit IRC20:20
*** bochecha has joined #buildstream21:01
*** bochecha has quit IRC21:02
*** bochecha has joined #buildstream21:02
*** bochecha_ has quit IRC21:03
*** jude has joined #buildstream21:03
*** bochecha has quit IRC21:12
*** bochecha has joined #buildstream21:13
*** bochecha has quit IRC21:17
*** bochecha has joined #buildstream21:17
*** bochecha has quit IRC21:22
*** bochecha has joined #buildstream21:23
*** bochecha has quit IRC21:27
*** bochecha has joined #buildstream21:27
*** bochecha has quit IRC21:33
*** bochecha has joined #buildstream22:49
*** bochecha has quit IRC23:02
*** bochecha has joined #buildstream23:03
*** bochecha has quit IRC23:07
*** bochecha has joined #buildstream23:07
*** bochecha has quit IRC23:22

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