IRC logs for #buildstream for Wednesday, 2017-04-26

*** tristan has joined #buildstream06:04
*** ChanServ sets mode: +o tristan06:25
*** jude has joined #buildstream07:02
*** tristan has quit IRC07:31
*** tristan has joined #buildstream07:45
*** jonathanmaw has joined #buildstream08:21
*** ChanServ sets mode: +o tristan08:52
*** ssam2 has joined #buildstream09:12
*** tiagogomes has joined #buildstream09:20
tristan... moving here :)10:09
tristanOk, so we we're discussing mostly BuildStream vocabulary10:10
persiatristan: So, yeah taking this out of /query: I'm struggling to understand how "Element", "Source", "Pipeline", etc. map to more traditional concepts of software management.10:10
tristanRight so we should probably work on a list and some definitions10:10
tristanAnd it *might* make sense to have a section on this in https://buildstream.gitlab.io/buildstream/10:11
tristannot sure about that, if the docs read well then it should not really be needed10:11
tristanSo let me throw some words out first10:11
persiaHaving something there would certainly make it more accessible.  For terms I know (e.g. "series", "package", "component", "distribution", etc.) from other places, it would have been easier to lean with such a page (and one may exist now)10:12
tristan o Project: A directory with a project.conf and some buildstream "Element" declarations (bst files)10:12
tristan o Pipeline: A resolved dependency graph of Elements, one Project may have many possibilities of Pipelines10:13
tristan o Element: An entity which performs some mutation of filesystem data, not all of these are associated with building anything, but in a project, usually a majority of elements build something10:14
tristan o Source: An entity which brings in external data into the Sandbox on behalf of an Element. One Element may own 0 or more Sources10:15
tristanSo that is the toplevel of BuildStream entities really, but as we had noticed, there is room for misunderstanding10:16
tristanSo, there is a difference between a 'Source' and a 'Source plugin' I guess10:16
tristanWhere a Source plugin introduces a "kind" of Source (a type)10:16
tristanwhich knows how to deal with a specific kind of backend10:17
persiaOr, one could say that a "Source" has a type, depending on where/how the data resides.10:17
tristanlike git, svn, tar, etc10:17
persiaRight.10:17
tristanAnd we do call it a "kind", for both Elements and Sources10:17
persiaAnd I think there is also the concept of "Repo", which is a collection of Sources with the same name, and same kind (and same location), ideally organised in some sort of history.10:18
tristanSo to take this example of an "autotools" kind of Element which uses a "git" kind of Source: https://gitlab.com/BuildStream/buildstream-tests/blob/build-gnome/elements/core/attr.bst10:18
persia"kind" in preference to "type" works for me.10:18
tristanThere is no concept of a "Repo" really, that is all managed by the Source itself10:19
tristanpersia, see this bug: https://gitlab.com/BuildStream/buildstream/issues/510:19
tristanThat is a corner case consequence of not having a "Repo" type of concept10:19
tristanBut I think that we can solve this particular thing without introducing a new layer10:20
tristanperhaps by using some locking mechanism, written once in the core10:20
persiaYes.  I think there is a human concept "Repo", that BuildStream does not model, as everything can sensibly be done with "Source" and "Source kind"10:20
tristanRight so what is that exactly ?10:21
tristanI think it's basically, the 'url' attribute of a Source ?10:21
persiaYes.10:21
persiaOr at least, that is how we identify it.10:21
persiaIn other models of thinking about software management, it is an important concept, but I'm now convinced that it isn't important here.10:22
tristanRight, so to dig into Sources a bit further, Sources can theoretically use different vocabulary, but for Source implementations which live in BuildStream proper, we want to use the same vocab10:22
persia(aside from the odd corner case where one has two Sources from the same Repo, but that should not really happen except in the linux/linux-libc situation)10:22
tristanit's quite rare yes10:23
tristanthere are submodules which are a more common occurence10:23
tristan*occurrence10:23
tristanbut in any case, this doesnt really get in the way10:23
persiaOh, ugh, right, I try to pretend those don't exist :)10:24
persiaAnyway, distraction.10:24
tristanRight so, Source plugin vocabulary, some Source plugins may have additional options (we've yet to learn this, I think the dpkg source plugin has some additional options)10:24
persiaSo, when one produces an artifact, one does that by processing of an "Element", within a "Pipeline", where the "Pipeline" may only have 1 "Element", or may have many, depending on the dependency graph?10:25
tristanBut we basically have: url, ref and track10:25
tristanYes.10:25
tristanThe artifact is the output of an Element10:25
tristanHowever notably, "stack" elements do not produce output (they produce empty artifacts to be more precise)10:26
persiaYou should be able to do a debian-archive pull with that.  URL would be a host/path, Ref is likely a specific revision, and Track is probably following some series (e.g. jessie).10:26
persia"stack" elements?10:27
tristanSo first line: for dpkg source I think we want/need a list of unversioned "package names" in order to control what exactly you want to mirror/stage10:27
persiaAnd, to confirm, an "Element" cannot be executed outside of the context of a "Pipeline", although "Pipelines" can be dynamically constructed based on a request to generate an artifact for a specific "Element"?10:28
tristanYes.10:29
persiaDebian-Archive: Yes, mirror/package identifies the specific thing to get, and there exists such a list of all packages for each series on a mirror.10:29
tristanlets stay off the debian stuff, it's clouding things :)10:30
persiaYes :)10:30
* albfan[m] sent a long message: albfan[m]_2017-04-26_10:30:44.txt - https://matrix.org/_matrix/media/v1/download/matrix.org/fuzIfXKcRpyFwnesSRXsvoaP10:30
tristanI just wanted to say that, there can be justifications that a Source add some extra parameter, for dpkg, without that extra parameter, the only possible expression would be "Please stage every single package of the entire distro here"10:30
persiaI certainly hope not, but that is a separate discussion.10:32
tristanalbfan[m], I would really like to get to the point of automatically converting the JSON and testing a real flatpak deployment10:32
tristanalbfan[m], also, I dont know what matrix UI is like, but you might try sending one liner messages10:32
tristanit looks like your IRC bridge eats them up and then pastes them somewhere :)10:32
tristanpersia, Ok so...10:33
albfan[m]tristan: opps!10:33
tristan o ref: This is some Source specific identifier for an exact revision, in the case of git, it's a commit sha10:33
tristan o url: This is the location to obtain the data10:33
tristan o track: This is the symbolic name to update the "ref" with10:34
tristanThat is the common vocab for parameters of Sources, which we try to keep the same for all Source implementations in BuildStream10:34
albfan[m]tristan: we can start from simple. Doing a buildstream recipe based on that json manifest from flatpak. With a complete example we can think how to automatically convert from flatpak to buildstream10:35
tristanalbfan[m], that would be great if you would like to try it actually !10:35
tristanalbfan[m], so there will be *some* obstacles to get it published into a flatpak that you can actually install10:36
*** albfan has joined #buildstream10:36
* albfan takes a look in plain IRC10:37
tristan:)10:37
tristanso just in case10:37
tristan<tristan> albfan[m], that would be great if you would like to try it actually !10:37
tristan<tristan> albfan[m], so there will be *some* obstacles to get it published into a flatpak that you can actually install10:37
tristanalbfan, so note that https://gitlab.com/BuildStream/buildstream-tests/tree/master master branch currently has an example project which builds a few things10:38
tristanwhich were manually ported over from flatpak json10:38
tristanNotice gnome-platform.bst and gnome-sdk.bst, these are "import" elements for the actual GNOME flatpak sdk & runtime10:39
tristanthat forms the base for building a flatpak for anything which depends on GNOME Runtime/SDK10:39
tristanright now those point to 3.2210:39
tristanalbfan, so I was able to get as far as building them and running them in a shell10:40
tristanHowever, distributing them to run in a flatpak is a part of the puzzle I still need to try10:40
* albfan is taking a look to gedit.bst (again)10:41
albfanyaml? love it10:41
tristanyep, all yaml :)10:41
albfanhttps://gitlab.com/BuildStream/buildstream-tests/blob/master/gedit.bst#L10 for deps, right?10:41
tristanpersia, that reminds me, even the 'git' source needs some additional parameters, for handling of submodules :)10:42
albfanhttps://gitlab.com/BuildStream/buildstream-tests/blob/master/gnome-sdk.bst#L17 flatpak runtime is already there, right?10:42
albfaneasy as pie10:42
tristanalbfan, right so, there is a bit of a problem with the way I've listed the dependencies, as that was just an initial "try"10:42
tristanalbfan, technically, the gnome-sdk.bst and gnome-platform.bst should be "build" dependencies10:43
albfanI think some python parser can convert a flatpak.json into yaml bst easily, is that ok (that would be another phase)10:43
* paulsher1ood also loves yaml, and hopes it continues to take over the world10:44
tristanyes, I've looked at all of the possibilities, and we are close to merging the 'bzr' source which is supported by Flatpak, so we should have support for everything10:44
albfanYes I see them here https://gitlab.com/BuildStream/buildstream-tests/blob/master/gedit.bst#L1210:44
tristanfwiw, this is the docs on dependencies: https://buildstream.gitlab.io/buildstream/format.html#dependencies10:45
albfanpaulsher1ood agreed let's get away for that xml madness10:45
tristanAnd how they work10:45
tristanalbfan, basically what I'm getting at, is that for a Flatpak build, we only want the SDK/Runtime around at build time, but it's not transitive10:45
albfantristan ok. As I need buildstream for CI is ok to running on a shell. Indeed I just want to be able to run test suite10:46
tristantrue, in that case you dont need to care10:46
albfanas it uses installed tests is ok10:46
tristanand you'll need the SDK/Runtime to be there in order to run a shell with everything built10:46
albfanfor code coverage is harder because I need to collect gcno and gcda files from make -k check, but I will dig in the docs to access to that10:47
albfanperfect. Second times seems to be better than first tries, wasn't that the phrase?10:48
albfanI have all I need thanks Tristan10:48
albfanwaltervargas[m] ^^10:48
tristanalbfan, great, let me know how it plays out :D10:49
tristanalbfan, I have a feeling you might want to write an element, or perhaps use the script element kind, to do the actual running instead of using a shell10:50
tristanbut by all means try the shell first10:50
tristani.e. you may want to have your CI element (which doesnt produce output but just runs tests) to be your main target, and then have that run things10:51
* persia ponders the value of a CI element capturing logs and storing the logs in an artifact10:52
tristanpersia, actually, I want _all_ artifacts to store logs (and some additional metadata)10:56
tristanthats TODO though for now10:56
tristanAlso I think it should be optional to download10:56
albfanhttps://www.irccloud.com/pastebin/VkijvzY7/10:57
tristanI think, anyway some logs can get very huge, but it will be nice to say "Here is exactly all the logs of everything in your build"10:57
albfanurl for gcovr http://gcovr.com/guide.html#_xml_output10:58
persiaYes.  In my imaginary ideal environment, I was thinking of using something like logstash for the logs, but having them in artifacts simplifies the infrastructure, and (assuming enough math is done) provides a provable provenance trail.10:59
tristanin any case regarding logs, metadata and artifacts, I want them stored in the same store, but I dont want additional data to be *in* the artifact but separate10:59
persia+110:59
tristanpersia, so where were we... oh yeah "stack" elements, ok first off, you can view the existing elements here: https://buildstream.gitlab.io/buildstream/#elements11:01
tristanI have "Build Elements" separate from "General Elements" there so that they are easier to distinguish11:01
tristanthey are all Elements, though11:01
tristanpersia, so a "stack" is just a convenience for grouping dependencies together, that's all11:02
paulsher1ood+1 for stack, also :)11:02
tristanpaulsher1ood, btw, did you try installing ruamel.yaml with apt-get on jessie ?11:03
* tristan would update the instructions accordingly if that worked out11:03
paulsher1oodno, not so far11:03
paulsher1oodi'll try now11:03
tristanon my debian stretch, the package name seems to be "python3-ruamel.yaml"11:04
persiatristan: So a "stack" "Element" only exists as a way of grouping several "Elements" into a logical entity for the purposes of reverse dependencies?11:04
persiaSimilar to the use of a "metapackage"?11:04
* tristan still unclear on "reverse dependencies"11:04
tristanyes similar to a metapackage11:04
persiaIn my mind, a "dependency" is when Element A requires Element B in order to execute.11:05
persiaElement C may also have such a dependency on Element B.11:05
tristanYes.11:05
persiaNow, if we change Element B, there are no explicit dependencies on Elements A or C, as B is independnet.11:05
persia*BUT* We may need to understand what is affected by the change in Element B, by generating all possible Pipelines in a Project, and following the graphs.11:06
persiaThe set of things that then depend on Element B (in this example A and C), are the "reverse dependencies" of Element B.11:06
tristanRight, I see11:06
tristanWe currently have no means of automatically calculating reverse dependencies11:07
tristanpersia, you might file that as an enhancement bug to keep it on the radar11:07
persiaOne usually only looks at direct reverse dependendencies, but sometimes one wishes to look at the entire transitive set (to more clearly guage the impact of a change).11:07
paulsher1oodtristan: 'sudo apt-get install ruamel.yaml' followed by 'pip3 install --user .' works on jessie11:07
persiatristan: What is the bug?11:07
tristanpersia, there is none, I said you might want to file one :)11:08
tristanso that the idea of automatically calculating reverse dependencies of an element in a project is somewhere on the radar :)11:08
persiaFor the lack of tooling to calculate rdeps?  I'll see if I can do that easily.11:08
tristanhttps://gitlab.com/BuildStream/buildstream/issues11:09
tristanpaulsher1ood, great :)11:09
tristanOk I'll try to clean up the things listed in issue 12 then11:10
paulsher1oodtristan: where can i find instructions for trying out your baserock gnome build?11:10
tristanpaulsher1ood, and curiously, now that you've installed, does `man bst` work ?11:10
paulsher1oodtristan: yes, it works11:10
tristanpaulsher1ood, https://blogs.gnome.org/tvb/2017/04/10/buildstream-progress-and-booting-images/ ... near the end, search the title "A booting demo"11:11
tristanseems in stretch I dont have a debian package 'ruamel.yaml'11:12
tristanoh, I do11:13
tristanstrange that it does not come up for `apt-cache search ruamel`11:13
tristanaha, apt-get says:11:13
tristanNote, selecting 'python3-ruamel.yaml' for regex 'ruamel.yaml'11:13
tristanNote, selecting 'python-ruamel.yaml' for regex 'ruamel.yaml'11:13
* paulsher1ood kicks off the 'A booting demo' build on the biggest machine he can find11:16
* paulsher1ood notices there's no count of progress equivalent to ybd [a/b/c] in logs11:17
tristanpaulsher1ood, true, I want to add a line in the status area for overall build time and exactly that11:20
tristanpaulsher1ood, I suggest building with `bst --log-file build.log gnome/gnome-system-image.bst`11:21
tristanto capture the entire log11:21
paulsher1oodcool! it's chugging away, anyway :)11:21
tristanwithout redirecting the output, that way you get interactive _and_ saved log11:21
paulsher1oodi normally just copy and paste11:21
tristanif you have a huge terminal history, that'll work11:22
paulsher1oodwe'll see. anyway, for a meaningful comparison vs ybd timings, the second run is what in need (assuming gits have already been cached)11:23
tristanif you want to test that without the fetching part...11:25
tristanthen your artifact cache, if you want to remove it, will be in ~/.cache/buildstream/artifacts/11:26
tristanpaulsher1ood, then again... the fact that we parallelize fetches may just be a contributing factor in improved build times :)11:26
paulsher1oodwe'll see about that, too :)11:27
tristanof course, the fact that we use an ostree clone to get a base runtime, will offset that number11:27
paulsher1oodi expect will need some fudge factors to convert apples times to orages times here11:28
paulsher1oodunless buildstream just flat out rocks, of course :-)11:29
paulsher1oodhmmm... so no 'total elapsed time so far' either... tut tut :)11:30
tristansorry, that would be in the status area as I mentioned above, good enhancement to have though11:31
tristantotal elapsed time + build N packages out of N11:31
tristanas top line in status area11:31
tristan(maybe even sharing the separator ~~~~~~~~~[time]~~~~~~~~[N/N/N]~~~~~~~~~~~~11:32
tristan)11:32
tristansave one line of terminal11:32
tristanpaulsher1ood, the total will appear at the end (you have time to wait before that happens)11:32
tristanAnd I think there is a bug, I think that is the only timer which does not freeze on suspension11:33
paulsher1oodack. i like your separator idea11:33
tristanSo say, if you press ^C once, time stops... for every timer except the global one11:33
* tristan pushed a fix for issue 12 and closed fwiw11:33
tristandocs should be in the process of updating themselves11:34
paulsher1oodthanks for the fix!11:34
tristanthanks for identifying it :D11:35
*** jude has quit IRC11:38
tristanpersia, so we got pretty far I think with vocabulary/terminology, do you want to continue and do you think we should turn this into a docs section ?11:54
*** jude has joined #buildstream12:07
persiatristan: Sorry, yeah, I think I understand everything now.12:25
persiaIf I get uncertain again, I'll ask :)12:26
paulsher1oodtristan: what causes 'maximum build tasks' to be 4 please?12:26
tristanpaulsher1ood, there are few ways... the default is in BuildStream's internal default configuration: https://buildstream.gitlab.io/buildstream/buildstream.context.html#module-buildstream.context12:29
tristanvalues in that configuration can be overridden in a user's config file12:29
tristanWhich by default will be searched for as ~/.config/buildstream.conf12:30
paulsher1oodok. will be interesting12:30
tristanBut can be overridden with `bst -c /path/to/config`12:30
tristanMost everything in the user config, can also be overridden directly on the command line12:30
* paulsher1ood will not be learning any of your fancy commandline tricks12:30
tristanwhich overrides anything else, if specified12:30
tristanin this case `bst --fetchers 8 ...`12:31
paulsher1oodstoppit, now :)12:31
tristan:)12:31
tristan2 levels of configuration A.) config file overrides defaults  B.) command line overrides everything12:31
tristanhope it's not *too* hard to remember :)12:31
paulsher1oodtime-since-start is more useful than all these zeroes, imo12:33
paulsher1oods/zeroes/zeroes and blanks/12:34
tristannod, I think zeroes are for the start of timed activities, blanks are for messages which have no relation to timing something12:34
tristanIt takes some space, but I think alignment is very important12:35
tristanNot sure it would be intuitive to show time-since-start12:35
paulsher1oodthat's how ybd does it, and no-one has complained12:36
tristanWhen compared to the time it took to complete a matching SUCCESS line for instance12:36
paulsher1oodSUCCESS line should have an Elapsed: xx:xx::xx in it imo12:36
tristanI dont think nobody having complained is a great metric either for a nice UI12:36
tristanMost things are timed, does it not make sense to have one single column reserved for timers ?12:37
tristanMaybe not12:37
paulsher1oodtry this: the current info is not useful, time-since-start is12:37
tristanAnd... then "time since start" ... when the SUCCESS line comes "again time since start ?" I'm more interested in how long it took to complete12:38
tristanand the line length is already usually close to (if not exceeding) 80 chars12:38
paulsher1oodi'm talkgin about time-since-start of whole run. SUCCESS needs to report elapsed of the specific task12:40
tristanThats what I mean it's unintuitive, START will on average have a time that is > SUCCESS12:41
tristanIt could be changed so that the column is _always_ time-since-start, for _everything_, then we would still want elapsed time of specific task12:42
paulsher1oodSTART and SUCCESS are uninituitive in themselves, to me :)12:42
* paulsher1ood would prefer the _always_ time-since-start idea12:43
paulsher1oodSTART would go with END or similar, for me12:43
*** Chris has quit IRC13:18
*** Chris has joined #buildstream13:25
*** tristan has quit IRC13:44
paulsher1oodreal160m10.573s14:32
paulsher1ooduser98m22.756s14:32
paulsher1oodsys22m31.240s14:32
ironfootbst building gnome?14:42
paulsher1oodyup14:42
ironfootpaulsher1ood:  any other result to compare it to?14:42
paulsher1oodaws c4.8x-large14:43
paulsher1oodi need to know which version tristan converted14:43
ironfootgood point14:44
ironfootpaulsher1ood: is it the build-gnome branch in buildstream-tests.git?14:48
paulsher1oodyup14:48
ironfooti've grep'ed some of the sha1s introduced in latest commits in definitions14:50
ironfootand they are there, so I my guess is that is converted from latest definitions.git14:50
paulsher1oodoh?14:52
* paulsher1ood tries building gnome-system-x86_64 from master definitions with ybd14:53
ironfootif my guess turns out to be right, you will have the relevant information already :)14:53
paulsher1ood:)14:55
*** albfan has quit IRC15:50
*** jonathanmaw has quit IRC16:26
*** tristan has joined #buildstream16:59
*** ChanServ sets mode: +o tristan17:00
*** jude has quit IRC17:23
*** ssam2 has quit IRC18:14
*** tristan has quit IRC20:32

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