IRC logs for #buildstream for Friday, 2019-06-14

*** tristan has quit IRC06:29
*** shibu has joined #buildstream07:14
*** tristan has joined #buildstream07:36
*** bochecha has joined #buildstream07:48
benschuberthey tristan, juergbi are you around? I am clear on what API I think is best for _yaml.Node, but that requires lots of changes in the codebase. Would you prefer a one-time sweeping change with all the API done, adding the new API only with minimal uses, or piece by piece (removing 1-2 functions per MR). I'm leaning towards the last one, and have opened a WIP MR !1401 so we can start a discussion. I'm happy to move to a one-time sweep if you prefer08:15
gitlab-br-botMR !1401: WIP: introduce a Node api, and remove node_get https://gitlab.com/BuildStream/buildstream/merge_requests/140108:15
benschubertjennis: ^ might itnerest you too08:15
jennisI think the initial WIP MR is a good idea so that we can all at least get a taste of/agree on the new API08:20
juergbihi benschubert, I generally prefer the incremental approach as well. we just need to be confident that all planned parts really get done in a reasonable time frame. i.e., I wouldn't want the code base to get stuck in a half-migrated state08:20
benschubertjuergbi: I could also create a long-living branche new-node-api, and merge smaller changes with code reviews in it if we prefer, rebasing shouldn't be too much of a hassle08:21
benschubertI just want to make sure that I do get enough code reviews and that we end up in a better state :)08:21
juergbibenschubert: if you indeed don't expect significant rebasing overhead, that might make sense08:22
benschubertbut I'm confident with where I want the codebase to be08:22
juergbiwould be equivalent from the reviewing point of view (small MRs) without risking inconsistency in master at all08:22
benschubertyep, and only breaking external plugins once :)08:22
juergbiindeed08:22
jennisI suspect that once we get this first MR right, the rest should be smooth sailing, right?08:22
benschubertI'll create a new branch for that and move the MR to it, thanks!08:22
benschubertjennis: there is lots of edge cases, and I might need to tweak a few things to keep the provenance entirely correct, but yes :)08:23
jennisfair enough, thanks benschubert08:23
*** ChanServ sets mode: +o tristan08:25
tristanbenschubert, agreed... I'd like to minimize the amount of times we need to churn consumers of the API, so an atomic change is desirable there - if you want to do incremental internal changes leading up to that, that would be fine08:25
benschubertI'll make a long living branch to which we merge everything from that change08:25
benschubertand once we are happy we can do a sweep change :)08:25
tristanbenschubert, I wonder... (just really pie in the sky pondering here...) if this Node API could somehow meld in with ruamel.yaml one day - having the API this way seems conducive to that08:28
tristani.e. perhaps we could save cycles if we were to subclass some ruamel things in the parser and have them come out as Nodes in the first place ?08:29
tristanjust a random thought really08:29
benschuberttristan: that's almost what is done now :), we basically rewrite the Representer and return our own nodes instead08:30
tristanAhhh08:30
tristanNice08:30
benschubertwhich still have a problem, that ruamel doesn't expose the class that calls the representer as a C extension, only as a python class08:30
benschubertso we still have a roundtrip to the intepreter here08:30
benschubertbut we sould be able in the future to possibly ask / contribute some changes for that08:31
tristanI recall when I brute forced the provenance to be stored in the parent dicts thinking "If I had time... I should really be making the parser return something with all of this context"08:31
benschuberthttps://gitlab.com/BuildStream/buildstream/merge_requests/1401 is now targeting the new branch in which I'll put all the API changes, Feel free to give early review. I plan to have it out of WIP today or sometimes next week depending on how much time I get on it08:32
benschubertthe yaml changes themselves are fairly sset. I'm now moving to remove all the other calls to node_get08:32
jennisHow do we tell if an element is from a junction?08:36
jennisI was hoping to find some __junctioned flag in element or something08:37
tristanjennis, who wants to ask ?08:38
jennisme!08:38
tristanjennis, it makes a difference, I'm not sure there is an answer for a plugin author08:39
jennisI guess we can get the element's project, and see if this doesn't match the parent project?08:39
tristanbut the core is allowed to know for sure08:39
jennisIt's for the core, specifically, not pushing junctioned elements to a parent project's remote08:39
tristanjennis, right, via the project08:39
tristanjennis, there are a couple attributes, the project when loaded for instance also indicates the element from whence it was junctioned08:40
*** raoul has joined #buildstream08:40
tristanso if project = element._get_project(), and `project.junction is None`, then it is in the toplevel project08:41
tristanHmmm08:41
tristan"To a parent project's remote"08:41
jennisOk, I should be able to use that08:41
tristanjennis, That sounds ambiguous to me a bit, i.e. you might not be interested in whether that is None08:42
tristanbut you should be able to get the context you need08:42
jennisNo, rather I'd be interest in whether it's not none08:42
tristanjennis, I don't think so08:42
jennisthen, it's a junctioned element?08:42
tristanjennis, I mean "Not pushing junctioned elements to a parent project's remote" as a statement... implies there is an element in context which is to be pushed to a remote08:43
tristanand that there is some recursion going on08:43
tristanjennis, Assume there are a dozen junctioned projects in the loaded graph, and you don't know for sure if the one which explicitly needs to be pushed is from the toplevel project or not... right ?08:44
tristanjennis, But I think that *anyway*, "the remotes to where an element's artifact must be pushed" is resolved on a per project basis anyway08:45
jennisAhh I think I'm getting myself confused08:45
tristanAt load time08:45
jennisI was under the impression that the top level project would have project.junction = None08:45
tristanSo perhaps if there are issues around that, it would be better to ensure those are loaded correctly at startup, rather than adding any statements in code which say "if self._get_project().junction._get_project() == self._get_project()"08:46
jennisYes, that does seem to be the case...?08:46
jennisI've just set up a test case using our junction examples project, the top level element, from the parent (callHello.bst), element._get_project().junction returns None, whereas the others return hello-junction.bst08:47
tristanjennis: *Yes* - The toplevel project will have it's junction set to None.... and *No* I don't believe that there is any rule that is specific to the toplevel project08:48
tristanjennis, if there is a difference in behavior for a toplevel & subproject... then that same difference in behavior would also apply to a subproject & sub-subproject, right ?08:49
jennisoh, gotcha08:49
tristanjennis, But also... I really think this should be resolved at load time - configuration of which remotes to push to are done in project.conf and user configuration08:50
tristanjennis, in the end, after loading - every Project() object should know where things should be being pushed to08:50
tristanwe shouldnt need runtime checks there08:50
jennismhmm, but we still need all the remotes to be able to push too08:50
tristanas already, each Project() is different08:51
jennisWe just need to know whether the element should push to the remote08:51
* tristan doesnt understand the first sentence08:51
tristaneach project.conf is loaded separately right ?08:52
tristanjennis, Are we basing this on an incorrect assumption that the configuration of where to push artifacts belongs in the ArtifactCache(), rather than on the Project() ?08:52
jennisahh right, well there must be a point where we create a list of *all* remotes, from the top-level project and the junctions08:53
tristanI think we may have still some weirdness where we have the ArtifactCache loading data from projects and then hashing them on a per project basis ?08:53
tristanThat is a bit confusing, misleading, and messy08:53
jennisPotentially, I'll have a look08:53
tristanBut I suppose it is at least still configuration that is loaded on a per project basis (even though it's loaded in a place which naturally causes developers to be very confused)08:54
jennisBut if we're loading remotes, per project, at some point we must be saying, "give me all the remotes I can push to", and this is what we're looping over in ArtifactCache.push()08:54
jennisahh, interestingly, we loop over self._remotes[project]08:55
jennisOk this should be easy enough to find08:55
tristanjennis, It sounds like that question: "give me all the remotes I can push to", is a question that an Element should ask the Project, and then inform the ArtifactCache of the response to that question at push() time08:55
tristanbut yeah, I'm sure there is a way to fix this issue without refactoring all of that to be more sensible08:56
jennisAgreed08:56
*** shibu has quit IRC08:56
*** shibu has joined #buildstream08:59
*** jonathanmaw has joined #buildstream09:09
*** shibu has quit IRC09:18
*** shibu has joined #buildstream09:18
*** lachlan has joined #buildstream09:47
*** lachlan has quit IRC09:56
*** lachlan has joined #buildstream10:03
*** lachlan has quit IRC10:09
gitlab-br-botBenjaminSchubert approved MR !1399 (raoul/unique-error-domains->master: Make ErrorDomain a unique enumeration) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/139910:21
gitlab-br-botmarge-bot123 merged MR !1399 (raoul/unique-error-domains->master: Make ErrorDomain a unique enumeration) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/139910:24
*** lachlan has joined #buildstream10:24
tlater[m]tristan: Do you happen to be around?10:28
gitlab-br-botraoul.hidalgocharman opened (was WIP) MR !1400 (raoul/1044-blobs-on-demand->master: CLI options for on demand blob fetching) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/140010:48
gitlab-br-botBenjaminSchubert approved MR !1400 (raoul/1044-blobs-on-demand->master: CLI options for on demand blob fetching) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/140010:50
tristantlater[m], I am !10:50
tlater[m]Awesome!10:50
tlater[m]I wanted to ask you what your opinion on the whole testing with ostree thing is10:51
tlater[m]I've been working on the docs-freedesktop thing10:51
*** lachlan has quit IRC10:51
tlater[m]And my goal is to build freedesktop as part of the examples, which means that the CI needs to build freedesktop10:51
tlater[m]But that's a whole can of worms with us moving ostree out of the standard plugins10:52
tlater[m]And it would mean that building the examples is difficult on non-ostree platforms10:52
tlater[m]Right now I think it would be alright to override elements in ostree for non-ostree platforms, and to use a cache managed by us to make sure that the actual examples don't take forever to build.10:53
tlater[m]s/in ostree/in freedesktop/10:54
tlater[m]But well, it's combining a lot of moving parts, and I want to check if that sounds sensible...10:54
tristanUmmm10:58
tristantlater[m], So you want to build freedesktop-sdk as a part of BuildStream CI ?10:58
tlater[m]Only the base platform part10:58
tristanI mean, we have that but it's mostly for testing master can still do it10:58
tristanMmmmyeah10:59
tlater[m]Right, yes, but the point isn't building freedesktop-sdk. The point is having examples that are 100% buildstream powered.10:59
tristantlater[m], I don't think that BuildStream itself needs to be involved in the knowledge base of how to bootstrap an operating system - I think those are distinctly separate topics10:59
tristanWhile it's one of the important things that you can do with BuildStream, BuildStream should not be the one demonstrating that set of knowledge11:00
tristanOk so... having examples that use freedesktop-sdk as a base makes sense, but do *we* have to build/bootstrap it ?11:00
tristanI think those are separate topics of discussion too: (A) Lets have examples which run in runtimes that were created by BuildStream... (B) Let's have our CI actually build the runtimes where are examples run11:01
tristanDo they need to be intertwined ?11:01
persiabuilding it and bootstrapping it aare two different things.  While I don't have a firm opinion on buildstream building freedesktop-sdk in CI, I do think it should not be bootstrapped.11:02
persiaAlso, while it might be interesting to have a CI job that builds a runtime as an example, I don't think it makes sense to recurse that: such a path leads to a preferential runtime.11:03
tlater[m]Hm, well, the bootstrapping comes naturally from including freedesktop-sdk as a junction, and I think the docs would be more useful if they showed how buildstream would actually be used to build something; currently we have no examples for this at all.11:04
tlater[m]Though I suppose if the buildstream docs only look at buildstream as a tool, that is going a bit too far.11:04
tlater[m]tristan: So you think it would make more sense to swap a freedesktop-sdk tarball into the place of the current 'doctored' alpine image, and instead have a doc that lives somewhere else to show how you would *really* depend on freedesktop-sdk in a project?11:05
tristanpersia, tlater[m] ... "building OR bootstrapping freedesktop-sdk" is also *totally* different from just using it's output to base our examples on11:09
tristanDo we need to be doing *any* of that ?11:09
tristanpersia, Right now our "preferential runtime" is an alpine linux tarball, I think it's a good idea to at least have a preferential runtime that was built with BuildStream for our examples11:10
tlater[m]tristan: It is a shame that our examples miss out on showing how BuildStream can define everything from the ground up if we don't build our runtime, though.11:13
tristantlater[m], It would make more sense to refer to external documentation about that, though11:15
tristantlater[m], it's not uncommon for projects to list some of their users on their web pages or point to their documentation11:15
tlater[m]Yes, I can definitely see that. It makes sense to keep the examples as minimal as possible.11:16
tlater[m]If we use a freedesktop-sdk base tarball we can always have a pretty note section that points to a doc that shows this dependency thing in more detail.11:17
tlater[m]Yeah, I'm convinced. I suppose freedesktop wouldn't mind this in their docs.11:18
tristanRight, also if we want an example of using a junction, we should not use an example of a project junctioning freedesktop-sdk11:18
tristanwe should have something very small and self contained which provides the minimal amount of information possible to display how a junction works11:18
tlater[m]No, the current junction example does the job pretty well.11:18
tristan(as you said: it makes sense for examples to be minimal as possible)11:18
tristanright11:18
tristanIt might use an alpine tarball, and it might make sense to swap that for an fdsdk one11:19
tristanjust for the sake of using something built with buildstream, proving we "stand on our own two feet" so to speak11:19
tlater[m]Also so people don't have to trust our "doctoring" - we can just actually use BuildStream to tell them what that means ;p11:20
*** shibu has quit IRC11:26
*** lachlan has joined #buildstream11:28
*** lachlan has quit IRC11:47
*** lachlan has joined #buildstream12:02
*** lachlan has quit IRC12:05
*** tristan has quit IRC12:35
*** tristan has joined #buildstream12:45
*** lachlan has joined #buildstream13:28
*** lachlan has quit IRC14:32
gitlab-br-botjennis approved MR !1394 (aevri/psutil_affinity->master: _platform.get_cpu_count: use psutil instead of os) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/139414:41
*** lachlan has joined #buildstream14:46
*** shibu has joined #buildstream14:50
persiaI became distracted, but my concern is that the ability to "stand on our own two feet" doesn't lead to an inability to work in other contexts.  Nice to be able to stand alone, of course, but also absolutely essential to not create a monolithic environment that doesn't play well with others.14:55
*** lachlan has quit IRC14:56
*** lachlan has joined #buildstream15:14
*** lachlan has quit IRC16:05
*** lantw44 has quit IRC16:07
*** lantw44 has joined #buildstream16:07
*** bochecha has quit IRC16:16
*** shibu has quit IRC16:22
*** shibu has joined #buildstream16:23
*** raoul has quit IRC16:41
tlater[m]persia: That's a reasonable concern, but I think with tristan's suggestion we also circumvent that issue nicely. The docs will use a runtime that, while it was built with BuildStream originally, is distributed as a tarball, and should therefore basically be the "standard" (well, unless you consider docker the "standard").16:59
tlater[m]We're "standing on our own two feet", but we're not limiting ourselves to that, and we don't send a message of "you can only use buildstream with buildstream"17:00
tlater[m]My concern was that we're not showing that you can use only buildstream, but that's resolved by placing that particular doc in an external source.17:00
*** jonathanmaw has quit IRC17:02
*** tpollard has quit IRC17:07
*** shibu has quit IRC17:43
*** benschubert has quit IRC18:58
*** lachlan has joined #buildstream19:29
*** lachlan has quit IRC19:42
*** kapip has quit IRC19:53
*** kapip has joined #buildstream20:01
persiatlater[m]: Fair.  I think there is a happy compromise; I mostly just wanted to identify my opinion about "too far".20:20

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