IRC logs for #buildstream for Wednesday, 2020-06-03

*** tristan has quit IRC04:39
*** benschubert has joined #buildstream07:19
*** santi has joined #buildstream08:48
*** toscalix has joined #buildstream08:50
*** tristan has joined #buildstream09:04
*** ChanServ sets mode: +o tristan09:04
tristanbenschubert, hmmm, have a meeting now, I think you've missed the meaning of that mail in a few ways but appreciate the response09:05
tristanI'll read the full mail after my meeting and try to discuss...09:06
benschuberttristan: sure, entirely possible :)09:06
benschubertand sorry about the delay09:06
*** mohan43u has quit IRC09:23
benschuberttristan: also, https://gitlab.com/BuildStream/buildstream/-/merge_requests/1954 would be a breaking change right?10:03
tristanbenschubert, Ok so I just got through your mail, the first misconception is that "it cannot be done today"10:24
tristanToday, we can have multiple instances of the same project10:25
benschubertah true10:25
tristanhttps://docs.buildstream.build/master/elements/junction.html#nested-junctions10:25
tristanWe do this horribly confusing thing where the name of your junction element is meaningful10:26
tristanAnd note it says "It is recommended that the name of a junction is set to the same as the name of the linked project."10:26
tristanThis leads to the main problem which "overrides" is intended to solve10:26
benschubertI am not even sure I understand the docs there :/10:27
tristanI.e., if I follow that rule, and everyone follows that rule, say one day I add a dependency on another project which has a common dependency on a subproject10:27
benschubertSo definitely +1 on confusing10:27
tristanOk what the docs are saying there is if I have a junciton "freedesktop-sdk.bst" in my project, and a subproject of mine also has a "freedesktop-sdk.bst" junction, then my toplevel "freedesktop-sdk.bst" will *win*.10:27
benschubertbased on the name of the element10:28
tristanAnd it will be used as the common configuration of that junction for all projects which junction freedesktop-sdk10:28
benschubertah gotcha10:28
tristanYes10:28
benschubertbut then point 2 is not possible (different options)10:28
benschubertok I'm following10:28
tristanSo the *main* problem with that, asides from it being confusing, is that I can *unknowningly* override the subproject of a new project I start junctioning10:28
tristanEffectively getting different artifacts from that project than the artifacts I expect, and the artifacts that project advertizes to provide10:29
tristanWithout any warning or anything10:29
tristanI know it's confusing... but, following me so far ?10:29
tristan;-)10:29
benschubertyep, I had understood that from the message (might not have phrased it best though :D) )10:29
tristanOk10:29
tristanSo basically the first part of the patch which is already written on !1901, is to add an overrides to replace that junction name coalescing stuff10:30
tristanAnd to also error out when multiple instances of the same project name occur10:30
tristanMaking it impossible to override a junction in a subproject without being explicit about it10:30
tristanNow, you bring up a point in your email which has been simmering in the back of my mind too10:31
tristanWhich is overriding of deeply nested junctions10:31
tristanit's unclear to me if we really need that10:31
benschubertI at least could see one case: for bootstrap projects that build themselves10:32
tristanI've also been thinking of that with a nasty wrenching feeling deep in my gut, though10:32
tristanThat is the next topic, I thought we were not there yet10:32
benschubertah gotcha10:32
tristanThe other topic is how to explicitly *allow* the duplication of projects, so that there are multiple instances of the same project10:32
tristanWhich the first part of the branch (already implemented) prevents10:33
tristanBut before moving there, do we think we need the ability to override deeply nested junction configurations ?10:33
benschubertI don't have a use case in hand10:33
tristanI have a feeling that doing that should involve supporting full element pathing10:33
benschuberthowever, I don't think we should have a disparity between what is possible with "overrides" and "renaming"10:33
tristanSo if and when we get there, we should be able to specify an element as "foo.bst:bar.bst:baz.bst:frob.bst"10:34
benschubertcorrect10:34
tristanrather than being limited to only one colon10:34
benschubertthat's part of my email (unless I was unclear :D)10:34
tristanRight, so that part10:34
tristanI understand the discomfort with that10:35
valentindDo we use marge?10:35
tristanvalentind, yep10:35
tristanbenschubert, So... for overrides, you really need element names, that much is certain I think10:35
tristanyou want to address a specific junction via a path10:36
benschuberttristan: my take was: we should either use only 'name' or only 'element' to address those, otherwise it will end up being ocnfusing10:36
tristanbenschubert, for the renaming proposal, the logic is that in renames, you will definitely want to be able to rename deeply nested junctions10:36
tristanYeah I understand that part and I quite agree10:37
benschubertand I think that both should have feature parity otherwise it will also be confusing10:37
benschubertunless there is a technical reason why we don't/can't10:37
benschubert*don't want10:38
tristanCurrently we don't, since junction "coalescing" allows overriding of deeply nested junctions10:38
tristanSo the renaming approach (one of the many approaches suggested so far to address the second problem)... the value would of course be a project name10:38
tristanThe key could be junction names to have a clearer API10:39
tristanBut would then require that we also support deep fullpath addressing of elements10:39
tristanIf we do that, then we also solve the problem of "overrides" feature parity10:39
benschubertagreed, something like:10:40
benschubertoverrides: key: name -> value: element10:40
benschubertproject-names: key: name -> value: name10:40
benschubertright? and therefore both would support arbitrary nesting10:40
tristanboth would support specifying many `:` in the key10:40
benschuberttristan: if we use name, we don't need any `:`10:41
tristanI don't know if it makes sense to also support it in the value of overrides10:41
tristanbenschubert, but I don't believe that is specific enough10:41
tristanat least not in the case of overrides10:41
benschubertfor values of overrides, I'd say no, there isn't much to gain from that10:41
tristanWe need to specify exactly which *junction* an override overrides10:41
tristannot which project10:41
benschubertbut a junction will end up having a unique name in a specific project right?10:41
benschubertsince you would not be able to have two projects with the same name anymore10:42
tristanYeah this is tricky, because thoughts have materialized in different orders10:42
tristanSo, if we were to go back and rethink overrides in a scenario where you are allowed to rename things10:42
tristanIs there no possibility at all that there is ambiguity ?10:42
benschubertcorrect10:42
benschubertbecause we end up with unique names _all the time_10:42
benschubertso if you have A -> B ->(c, c2), with C and C2 the same junction with different name, you can uniquely identify them by name10:43
tristanbenschubert, this line of thinking is dangerously scope creepy10:43
tristan2 additional things which I think deserve changing in this approach10:43
tristan* The UI should print "{project-name}:{element-name.bst}" instead of "{full}:{element}:{path}"10:44
tristan* We should logically allow elements to depend on elements in subprojects with "build-depends: ... - {project-name}:{element-name.bst}"10:45
benschubertwhich will lead to shorter paths and thus a nicer readable UI? :) But true that's a change10:45
benschubertright10:45
benschubertright this could result in bigger changes10:45
tristan  * That past part would require that junctions be associated with project names in the toplevel project.conf, otherwise we don't know anymore how to load junctions as a side effect of a dependency10:45
tristans/past/last10:45
tristanSo... I don't know if we have the stomach for all of this10:46
benschubertOn the other hand, it's a nicer UX10:46
benschubertI am not sure we want to have to change all of this10:46
tristanThe addressing of elements by "paths" via junctions makes the implementation clean10:46
tristanbecause we have the junction needed to load the project via there10:46
tristanNow if we also had the project.conf maintaining a table of names/junctionelements, that also is annoying for users10:47
tristanEspecially given that projects can be renamed10:47
benschubertI think there is also a fundamental problem there: names in projects don't matter but they do10:47
tristanRight10:47
tristanRight now we use them in user config to specify artifact caches10:48
tristanAnd they are also meaningful in artifact "names"10:48
benschubertwhich they really should not :) (at least not part of the cache key)10:48
tristanRight, a lot of cans of worms, all of which contribute to reluctance to get involved with this thread on the ML I need resolved :)10:49
benschuberttristan: a middle ground could be to support both types of 'keys' in the config10:49
tristanSo, for instance, even if I've decided that I want "two freedesktop-sdk instances" in my pipeline, I think I don't want those to have different artifact "names" just because of that10:50
tristanRemember that the driving reason is the ability to explicitly have two10:50
tristanNot necessarily to rename them10:50
benschubertyep, definitely10:51
benschubertbut on the other hand if you _rename_ them explicitely to avoid clashed, the UX should tell you from where it's coming10:51
tristanSo maybe the disruption of the rename approach is too much10:51
benschubertotherwise, why am I building 5 times the same element?10:51
tristanbenschubert, if you always display full paths in the UI then you don't have that problem10:52
benschubertright10:52
tristanMy patch actually *needed* to do this otherwise I get crashes10:52
tristanSo currently with !1901, we don't have a limitation of two levels10:52
tristanWithout !1901, the problem of name clashes in the UI doesnt arise because of the coalescing10:53
tristanSo the other approach that I'm kind of happy with too, is the "internal / duplicates" approach10:53
benschubertLet's rewind a bit10:53
tristanOk10:53
benschubert> because we end up with unique names _all the time_10:54
benschubert> 11:43 AM so if you have A -> B ->(c, c2), with C and C2 the same junction with different name, you can uniquely identify them by name10:54
benschubertI meant use this _only_ in the junction: overrides/project-names config10:54
benschubertnot use this anywhere else10:54
benschubertfor the `key` section10:54
tristanYou mean, the rename would not rename project instances, it would rename something internal to the loader10:55
tristanand only there10:55
benschubertcorrect10:55
benschubertor even if it renames the project instance10:56
tristanSo I still worry about ambiguities here10:56
benschubertif should not matter10:56
tristanbenschubert, If I have a "would be diamond" pattern of projects that is actually a pyramid10:56
benschubertno wait, I think we are getting confused and going in circles there10:56
tristanFor instance: A -> B, A -> C, C -> D(1), B -> D(2)10:56
tristanI'm saying, using project names as keys here, does not explicitly specify *which* junction needs to have a rename, and which one gets overridden10:57
benschubertAre you sure? If we have renames and overrides, we end up in a state where:10:58
benschubertfor each project and its junctions, each 'project' in the pipeline has a unique name (either because it has been overriden, or because it was renamed).10:59
benschubertAnd this is true wherever you are in a tree of projects/junctions10:59
benschubertSo, as long as we treat overrides/renames recursively, we are fine10:59
tristanHmmm, perhaps; because the "A->B" junction is where you rename "C", it is still in the context of "B" where "C" is still unique10:59
benschubertcorrect10:59
benschubertI think that we should keep the context everywhere, it should make everything easier to reason about10:59
benschubertI know we were discussing there before about having only the top level override win, but if we apply them in order, we get a stricter layout11:00
tristanYes, I understand, it works this way... and with that, we could use it in the UI, to make more concise names indeed11:00
tristanNo no, I'm just having a hard time to follow, sorry11:00
benschubertand we don't (and shouldn't) replace in the build-depends/runtime-depends11:01
benschuberthaha I think that's true for both of us :D11:01
tristanBut then, there will be other expectations I think which will be broken11:01
benschubertwhich are?11:01
tristanI.e. changing this in the UI will at least mean people will expect these renames to apply to artifact caches in user configuration11:01
tristanI don't think we'd want to go down the road of allowing dependencies to be expressed via project-name references, though11:02
benschubertI think that we should do that (otherwise renames will get messy)11:02
tristanI don't understand what you think we should do11:02
benschubertOk, let me rewind:11:03
tristan(also, I'd like to re-re-re-rewind this to the beginning and follow the other branch of thought in a moment)11:03
benschubert- I think we should go for the 'overrides' and the 'project-names' that you propose11:05
benschubert- I think we should apply them recursively, bottom of the stack to the top level project11:05
benschubert- I think we should use project names in the configuration for those11:05
benschubertOther potential improvements:11:05
benschubert- Use the project name in the 'ui' instead of the long name11:05
benschubert- For artifact-caches, I can see some potential use cases to define per-name, though I am not sure we would want that11:05
benschubert-> if we don't want for artifact-caches, let's just use the long name in the UI, it is still simpler and leads to less confusion11:05
benschubertDoes that make some sense? :)11:06
tristanok11:06
tristanIt clarifies that you also don't think we should go down the road of allowing project-name addressing of dependencies11:06
benschubertyep11:07
benschubertit's too much of a change11:07
benschubertthough with the invariant of per-project cone uniqueness of name, we could do that11:08
tristanbefore descending into the other branch of thinking: What would we do for artifact names in this world view ?11:08
tristanI think that in this world view, we'd actually want to use the redefined names "as built", not the originals11:08
tristanAnd in *any case* we still want to be able to address artifacts as "just keys" without the full names, and still get cache hits11:09
tristanthat's another long standing discussion11:09
tristanartifact full names are really for user convenience I think, they are largely superficial11:09
benschubertI can see two ways:11:10
benschubert- We allow per-name caching, potentially more work (if you have multiple times the same project for which you define artifacts), but also would allow more complex scenarios (potentially transform the config as a list with a 'projects' key?11:10
benschubert- We move to 'element-based' junction cache (that is we use the junction's element full path in the config)11:10
benschubert- We don't do anything unless someone asks11:10
benschubertcorrect, an artifact should not change based on those names11:10
tristancurrently we may have a situation where we cannot reuse an artifact because a project was renamed, but that is just our failure to also cache it under the "key only"11:11
tristanAnyway11:11
tristanI should point out...11:11
tristan<benschubert> though with the invariant of per-project cone uniqueness of name, we could do that <--- I disagree with this11:12
benschubertright, that's something we already decided to remove the name from the 'key'11:12
benschubertah?11:12
tristanBecause addressing of dependencies by project names implies additional project configuration of elements11:12
tristanThe only reason you can depend on freedesktop-sdk.bst:glib.bst, is because that string contains the name of the junction you need to *load*11:12
tristanWithout it, you need the name configured somewhere else, which would be horrible when combined with also renaming possibilities in junctions11:13
benschubertright11:14
benschubertwhat I meant by "we could" is that, since it is unique, it would be a potential way of doing, though it would require a mapping somewhere11:15
benschubertSo we agree on that11:15
tristanThat leads me to consider the possibility of not making the renames possible in junctions to subprojects, but making it possible in project.conf instead11:15
tristanWhat if (A) We had this dictionary in project.conf ... and (B) We also supported full pathing of junctions to map to those names ?11:16
tristanI think it would be bad actually11:16
tristanit might obviate the default error you *should* receive when accidentally junctioning a project with a conflicting name11:16
tristanBy forcing a project to name all their subprojects ... also bad.11:17
benschubertwe could only add the renames + overrides there11:17
benschubertit has one advantage: a single place where you can see all the changes11:17
benschubertbut yeah, I have no opinion on that11:17
benschubertand project.conf tends to grow with time, so maybe better to keep it smaller11:18
tristanOk well, there is a possibility of saying "In project.conf we can list all the junctions we need to access elements from, and rename some of them also"11:18
tristanListing the junctions there without naming them, would imply preloading them, which is a bad performance experience when you don't need to fetch a junction to `bst show` something unrelated11:19
benschubertdefinitely11:19
tristanAlright, so can I re-re-re-re-re-rewind this for a moment ?11:19
benschubertgo for it :)11:19
tristanWe've only explored renaming territory11:19
tristanAnd now we have a good idea I think of all the kinks and twists it might imply11:19
tristanThere is an alternative where say, we add 2 new configurations, but they are basically booleans11:20
tristan(A) A junction itself can have a single "internal: True" boolean11:20
tristanThis means: "Do not conflict with any reverse dependency", but does not necessarily come with any complicated guarantee of runtime dependencies bleeding across project boundaries (although that is also an option)11:21
tristan...11:21
benschubert> Do not conflict with any reverse dependency11:21
benschubertWhat do you mean by that?11:21
tristan(B) A junction can have a list of "duplicates", e.g.: duplicate: ["foo.bst", "bar.bst:baz.bst", "juice.bst:orange.bst:jazz.bst"]11:22
tristanbenschubert, it means basically that any reverse dependency project which junctions the same project without overriding this junction... will not cause any conflict/error, it will be a separate instance of the same project11:23
tristanThat is the final goal of all of this in the end: only this11:23
tristanThe "duplicate" list, would be for handling this in the reverse dependency project, where I bring in a new version of the same project but I know I'm doing it for a different use case11:24
benschubertnot sure I grasp what `B` would do?11:24
benschubertah11:24
tristanThe UX is... I have a project and I add a junction11:24
tristanThen I get an error: sorry dude, this junction conflicts with that deep nested junction11:24
benschubertI like this less, it seems more complex to me, and less clear of what's happening11:24
tristanNow: I decide, Do I want to use a "link" ? Do I want to override the deep one ? Or do I want to "duplicate" it11:24
benschubertAlso, the 'duplicates' is tricky, some projects have conflicting elements in the same project, thus having this duplicate....11:25
tristanThis is a junction configuration, not a project configuration11:25
benschubertI understand that11:26
tristanRight ? So at the junction level I say "I'm okay with this duplicate project which this junctioned project brings in"11:26
tristanEssentially, the renaming approach is only to solve these two use cases in the first place11:26
benschubertah wait, so everything in `duplicates` would be junction elements?11:26
tristanYe11:27
tristans11:27
benschuberthow do you validate that? Only on access of one of those elements?11:27
tristanSo either I can say "Don't let this internal junction cause any conflict with reverse dependencies", or I can say as a reverse dependency "Yes, I'm okay with this duplicated project"11:27
tristanValidation of this is actually the easy part11:28
benschuberthow?11:28
tristanThat is done while loading, !1901 uses a global table of loaded projects11:28
benschubertwhich means you might never check it if you are not loading something in the path11:28
tristanI can easily cause those keys to become unique by way of "internal" and "duplicate" declarations, silencing the error and allowing the load11:28
benschubertlike if you don't depend on it11:28
tristanI don't think I follow your last two lines exactly11:29
benschubertBack to:11:30
benschubert> Ok well, there is a possibility of saying "In project.conf we can list all the junctions we need to access elements from, and rename some of them also"11:30
benschubert12:19 PM Listing the junctions there without naming them, would imply preloading them, which is a bad performance experience when you don't need to fetch a junction to `bst show` something unrelated11:30
benschubertIt seems to me it's the same problem if we want to validate things correctly11:30
tristanThe difference is that you are never *required* to duplicate something11:31
benschubertfair point11:31
tristanbenschubert, also remember that... if I duplicate something in my junction, that's my business; the error will reliably happen again in a reverse dependency project which tries to bring in that same project *again* by other means11:31
tristanSo every time you junction something, by default you will get an error if you have no explicit knowledge of this coexistence11:32
benschubertso this would not bleed out, I like this idea11:32
benschubertso we would need: coalescing + those two right?11:33
tristanThis is the original idea of a "whitelist" combined with the idea of "internal"11:33
tristancoalescing is now what we are calling the thing we currently have11:33
benschubertyeah, but we'd still need it right?11:34
tristanI know it's confusing, but juergbi has been calling it that, I know that technically we are changing coalescing of junction element names for project names, though11:34
tristanBasically !1901 already has coalescing of project names used to trigger an *error*11:34
tristanThe other 2 configurations are ways to explicitly avoid that error11:34
benschuberttristan: just to make sure I get it, we would not get rid of the way of telling a junction, "for your junction foo.bst, please you my element "blah.bst" right?11:35
benschubertSo we would have this + the two booleans11:35
tristanWe would also have overrides yes11:36
tristanoverrides explicitly overrides a subproject's junction with a local junction11:36
benschubert(I wonder why we force it to be local?)11:36
tristanAlso we now have link, so we can also easily say "Override this subproject junction with my local link to this other subproject junction"11:36
benschubertok, that's simple enough11:37
benschubertmmh I am still not 100% sure about the 'internal' stuff11:37
tristanOk so11:37
benschubertit seems hte naming would bring more expectations thant that11:37
benschubert(will need to go to eat, can we continue in 30-45 minutes?)11:37
tristanWhen you say "duplicate", that means you are a high level project saying "I am okay with this duplication"11:37
tristanbenschubert, When you say "internal", that means: I know I am only using this as build dependencies internally, and I want to hide this conflict from any reverse dependency projects11:38
benschubertmy problem is "i know that", it's more error pron11:38
benschubert*prone11:38
tristanI.e. we don't *always* want to force reverse dependency projects to have knowledge of low level internals11:39
tristanbenschubert, Right, and that's why there is a suggestion of checking for runtime element dependencies bleeding through a project which has an "internal" junction11:39
benschubertthat's complex, you _might_ have some internal elements that should not be depended upon that can have runtime deps there11:40
tristanIf I declare an internal junction, and my reverse dependency project has elements which end up runtime depending on elements from my internal junction, that could be an error11:40
benschubertand what is your element is a compose and you therefore export everything :P11:40
benschubertcorrect, so with 'renaming', a low level project could say "project-names: fsdk: my_internal_fsdk_please_dont_touch" and we would have the same behavior11:40
tristanExactly11:40
tristanIt kind of handles both directions11:41
benschubertso by that I still think rename + overrides is a simpler approach11:41
benschubertand allows top level projects to force something if they wish11:41
benschubertat their own risks11:41
tristanBut from our conversation, I'm starting to feel the opposite :)11:41
tristanAlso, making the distinction between internal/duplicate gives us the power to possibly implement checks11:41
tristanWhereas renames does not separate these semantics11:42
tristanbenschubert, go eat and think about it11:42
tristanI'm a bit worried of all the implications of renaming projects more that we talk about it to be honest11:42
*** santi has quit IRC11:56
tristanbenschubert, fwiw, I don't see how https://gitlab.com/BuildStream/buildstream/-/merge_requests/1954 would be a breaking change, if it is; then it's certainly fixing a bug (if includes were able to overwrite conditionals by virtue of inclusion, that seems like it would have been a pretty bad bug)12:00
*** santi has joined #buildstream12:00
WSalmonI am getting more `Remote (https://push.public.aws.celduin.co.uk) already has artifact 25176b94 cached` @ https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/jobs/578770889, i was expecting a little rebuilding for that job due to a rebase but im pretty sure its rebuiding way too much12:00
WSalmonhttps://gitlab.com/BuildStream/buildstream/-/issues/1314#note_354422869 are the others involved with this issue happy with my comment? juergbi coldtom cphang et al. ?12:10
benschuberttristan: ok so no need for a ML post I guess?12:13
benschubertand back :)12:13
benschubertThe checks would be complex to get right and many things could go awry12:13
benschubertI agree that it's a deeper rabbit hole than expected12:14
*** slaf has quit IRC12:19
* tristan got distracted by old friend walking by, back...12:20
benschubertok! So...12:21
tristanbenschubert, Do you think the checks (for reverse dependencies on "internal" projects bleeding through the junctioning project into reverse dependency projects), would be a hard requirement ?12:21
tristanI think that they could be nice to have, while renaming allows the same construct with no path at all towards such checks12:21
tristanBut to be honest, it's mostly all of the possible side effects of renames which are starting to look scary12:22
benschubertI dislike the 'internal' name, because it implies more things than we could check and potentially doesn't have the same understanding for everyone12:22
tristanjuergbi, originally suggested 'private'12:22
benschubertiff we have a clear definition of what the "internal" contract means, I could get behind it12:23
tristanBut I disliked 'private' because I could see a case for reverse dependency projects 'linking' a private junction and reusing it12:23
tristanFor instance, imagine a junction which basically provides a kind of compiler for a given format, we know that it is used internally for that project, but reverse dependencies might want to reuse the same one12:24
tristanI think that the internal contract really means that there is no chance of dependencies bleeding through the junctioning project to reverse dependency projects... OR that having that dependency would be unintended and warranting of an error12:25
tristanFor a project which bootstraps itself, it might self junction internally12:26
benschubertI actually kind of like this idea: it would make 'bootstrap' projects easier (ensuring the stage 1 doesn't leak past stage 2)12:26
tristanAnd again, it would be wrong for reverse dependencies to be granted access to the original project12:26
benschubertbut then, why restrict 'internal' to junctions? (playing the devil's advocate there)12:27
tristanI'm not sure that the checks would be that difficult to implement, but I'm not entirely convinced the checks are a hard requirement12:27
tristanbenschubert, That is a beautiful idea to be honest12:27
benschuberthowever, that's a long discussion on the ML ;)12:28
benschubertbut I could get behind a `private`12:28
tristanHowever, I think the semantic might be a bit different for "internal elements" or "private elements"12:28
benschubertI do remember some discussion with Bazel folks where they had a problem around not having a notion of private elements, which lead to quite some problems12:28
tristanSince the beginning, we've left it to project authors to use their own conventions for marking things as private12:28
tristanThere is a distinction however to make: Private in my eyes means "Reverse dependency projects should not *directly* depend on this, because it's not stable API of my project"12:29
tristanThat is different from an artifact which should never make it into a build sandbox of a build in a reverse dependency project12:29
tristanI would expect people to name their elements with a leading underscore for instance to denote privateness12:30
tristanThings which might change between junction updates to more recent versions12:30
benschubertyeah right12:31
tristan(or place those elements in a private/ directory)12:31
tristanWe haven't really taken a stance on how people do that, because we've been busy making the core work and hoping users would come up with that stuff :)12:31
benschubertOk back to the original problem: is there a particular demand/use-case that was put forward that lead to this ML thread and this proposal?12:32
tristanBut anyway, straying a bit here... If we implement the concept of "Elements from this subproject should not be depended on by superprojects in any way", why not do the same for elements ? and what should it really be called ?12:33
tristanYes12:33
tristanbenschubert, there are two competing forces to keep in mind12:33
tristanOne: We cant have people overriding the projects they depend on without knowing it12:34
tristanTwo: We want to reduce as much as possible any knowledge which projects need to have about the projects they depend on12:34
tristanSo basically, If I have a project which depends on things in order to provide data/artifacts to my consumers (reverse dep projects), I don't want them to have to know how I made the sausage12:35
tristanI just want to provide the sausage12:35
benschubertI'd add a third one (that at least I'd like): We? want to allow a top level project ot have the last word on how a junction should behave?12:35
tristanI'm not even entirely convinced of this all around; I think it's clearly undesirable to override a subproject in any way at all12:35
tristanOverriding a subproject's junction is a last resort, because you have multiple dependencies on the same project which need to depend on the same one12:36
tristanIt may happen often enough, and indeed, the toplevel project needs to have the last word12:36
benschubertit does happen, there are some "valid" use cases for that, so that's something I'll be keen on keeping12:37
tristanBut yes, anyway I think that that is still a detail of "One:", i.e. projects need to be able to explicitly override subproject junctions, but never accidentally12:38
benschubertfair12:38
tristanThe "internal" or "private" thing comes from "Two"12:38
tristanI.e. I might use a project to do something internally, have compose or script elements between that and the artifacts my reverse dependencies consume, and I don't want those reverse dependencies to be forced to know about this internal detail12:39
tristanThis is all in the interest of creating a clean API surface between projects12:39
tristanI want to `bst track junction.bst` on my dependency projects, get the latest stable, rebuild regularly; and have as little friction in that as possible12:40
tristanIf that subproject starts to depend on a common third party subproject for artifacts I consume, I will need to get an error12:40
tristanBut if that subproject uses another subproject I don't depend on, or a project only for build dependencies; I should not be bothered by that and my CI should flow12:41
benschubertSo to summarize:12:41
benschubertin junction.bst:12:41
benschubert'overrides': element -> element  # to say, "for this (sub)+-junction element, use this element instead12:41
benschubertinternal: bool # I guarantee this project does not leek out of my project, please don't notify dependents of me that they have a conflict with this project's junction12:41
benschubertin project.conf:12:41
benschubertjunction-duplicates: [a.bst, b.bst, c.bst:d.bst]  # I know those junctions are all the same, I don't want to use the same one, let me live with it12:41
benschubertDo I summarize your current thinking correctly?12:41
benschubertdoes `junction-duplicates` works accross junctions? That is if one junction defines one, it will work for its dep cone?12:42
tristanI would have envisioned duplicates being in a junction12:42
tristanFollowing the same style as overrides12:42
tristanPart of the declaration of that specific branch of inter-project dependencies12:43
benschubertand how would it work? Let's say I have A->B, A->C, B->C. How do I declare that C can be duplicated?12:43
tristanmaybe "duplicate:" is not the perfect verb for this12:43
benschubertwith A the top level project12:43
tristanYou would only need to declare it on one side12:43
tristanSo the "A->C" junction would say to duplicate C12:44
tristanOh wait, it would be declaring C, I C what you mean :-S12:45
tristanI hadn't thought it out that far into the details of how it's all declared hehe12:45
benschubertOk, I think I can get behind it, and as long as I can override, that means we can re-define all this stuff on a higher level project so I think it ticks all the boxes for me12:46
benschuberthowever, we'd need to go through all details again :)12:46
tristanI think that in any case, recursive resolution of junction paths is going to be a requirement12:46
tristani.e. full paths12:46
benschubertI concur12:46
tristanI can capture all of this in an email and reply to your mail12:48
tristanGood ?12:48
benschubertSeems good to me :)12:48
benschubertthanks for taking the time for this12:48
tristanI think it was a very useful exercise to go down the rename thought experiment12:48
tristanThank you !12:48
tristanI've been sitting alone with this problem for a while haha12:48
tristanHave to get it solved12:48
benschubertagreed12:48
benschubertI have a project in mind with a project junctionning itself recursively, with the only thing changing being a config in the junction, and that would probably make it easier :D12:49
tristanIt will certainly make it clearer how to achieve this, and stop you from doing things accidentally12:50
scottclarkeHi, I'd like to submit a small patch for this issue, would someone be able to give me developer access? https://gitlab.com/BuildStream/buildstream/-/issues/133612:50
tristanSure !12:51
scottclarkethanks tristan!12:54
*** tristan has quit IRC12:56
WSalmonI am getting more `Remote (https://push.public.aws.celduin.co.uk) already has artifact 25176b94 cached` @ https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/jobs/578770889, i was expecting a little rebuilding for that job due to a rebase but im pretty sure its rebuiding way too much13:40
WSalmonso looking at the code13:40
WSalmonthe message from bst is only issues when BlobNotFound is raised (i think)13:40
WSalmonbut did coldtom say the last time we looked at this the cache did not report issuing any BlobNotFound ?13:41
WSalmonexcept BlobNotFound as e:13:41
WSalmon                # Not all blobs are available on this remote13:41
WSalmon                element.info("Remote cas ({}) does not have blob {} cached".format(remote, e.blob))13:41
WSalmonah13:41
WSalmonno13:41
WSalmonsorry miss read13:43
WSalmonthe error comes from self._pull_artifact_storage returning false, so that dose line up with what coldtom found :)13:44
WSalmoni though it was getting closer but sadly not13:44
coldtomthe real question is why does it think that it's already cached13:45
cphangWSalmon can you think of a minimal example where we can locally reproduce this?13:45
WSalmoncoldtom, i think its because it is already cached and its the pull that is incorrectly failing13:46
WSalmoncphang, i am doing so atm13:46
WSalmoni thought i had something but i had not13:46
cphangack, ta13:46
WSalmoni seems to work fine if it only needs to pull one thing, but when the first thing it tries to pull is not there and so it has to pull loads of things, it seems to thing that it needs to rebuild tooo much.13:48
WSalmontlater[m], when would https://gitlab.com/BuildStream/buildstream/-/blob/master/src/buildstream/_artifactcache.py#L313 ever be reached? i would think that ether lines 311 or 316 should be hit?14:14
WSalmonhttps://gitlab.com/BuildStream/buildstream/-/blob/master/src/buildstream/_artifactcache.py#L287 this is identiacl to 313 so its really hard to debug why things are falsely being reported as not pull able, so i would like to change one of the lines but i dont under stand the second line so dont know how to make the info more helpful14:16
WSalmonjuergbi,14:16
juergbiWSalmon: you can check whether the line before it has `Pulling data for artifact..` or just `Pulling artifact...`14:29
WSalmonthanks juergbi14:33
*** tristan has joined #buildstream15:00
*** ChanServ sets mode: +o tristan15:00
WSalmontristan, FYI https://gitlab.com/BuildStream/buildstream/-/issues/133715:01
WSalmondid you land something todo with this recently?15:02
WSalmondo you know what i need to do to fix it?15:02
WSalmoni presume my project has something that is now not acceptable15:02
juergbiWSalmon: that looks like fallout from !194815:04
tristanThat is odd (but quiet leet)15:05
tristanOdd given https://gitlab.com/BuildStream/buildstream/-/blob/master/src/buildstream/_loader/loadelement.pyx#L9615:05
tristanI mean, it seems quite impossible for a LoadElement to not have a link_target member15:05
tristanmaybe a cython glitch here15:05
benschubertWSalmon: that's cython code, did you `pip install` after pulling the newer version? (as in, are you in editable mode and did not reinstall?)15:05
tristanAh15:05
tristanA lack of rebuild might cause that15:06
WSalmonah15:06
WSalmonthanks benschubert, that might be it15:06
benschubertyeah, cython is C code in the end, welcome to edit-compile cycle again :'D15:06
WSalmonoh, i  didnt think i had moved many commits15:07
WSalmonthanks tristan and benschubert15:07
benschuberteven if you move a single commit15:07
benschubertif a .pyx/.pxd file changes, you need to reinstall15:07
juergbitristan: I assume you don't have any objections dropping BST_FORCE_{SANDBOX,BACKEND} as they become useless with the bwrap drop or do you want to take a closer look at https://gitlab.com/BuildStream/buildstream/-/merge_requests/1952 ?15:07
WSalmonindeed15:07
tristanjuergbi, kill it sounds great !15:08
juergbi:)15:08
juergbi 35 files changed, 186 insertions(+), 2820 deletions(-)15:08
tristanjuergbi, I suppose we still might need to have CI testing various modes of BuildBox though ?15:08
tristanLike maybe the unix test or smth ?15:08
juergbithe unix job has been removed a while ago already15:09
juergbiwe still test buildbox-run-userchroot, though, which is the variant that also works on non-Linux15:09
tristanPerfect15:09
juergbiand we test missing deps15:09
benschubertthat's an awesome MR :D15:09
cphangjuergbi including osx?15:12
benschubertcphang: there is currently no sandboxing technologies really usable by BuildStream on OSX15:12
benschubertand if that comes, it will be through buildbox-run, so we should be fine15:12
juergbiis userchroot not (yet) working on MacOS?15:12
benschubertis userchroot working on MacOS? (I didn't know that?)15:13
benschubertI guess you'd still need to make a chroot15:13
juergbiI'm asking, I don't remember15:13
benschubertah, I actually have no idea whether it works15:13
juergbiyes, it might be tricky to define a suitable chroot, there may also be copyright concerns15:13
juergbibut technically it might work15:14
benschuberttrue15:14
tristanI (personally) would be happy to land regardless and file that as a buildbox issue15:15
tristanit's not like we had osx support with BuildStream 1 also15:15
juergbiyes, before buildbox-run we never properly supported anything but Linux15:19
juergbieven the 'generic' unix sandboxing backend relied on linux-specific mount options15:19
juergbiand pyfuse15:19
juergbiit's merged now15:20
tristanparty \o/15:20
cphang\o/15:21
benschubertawesome !15:21
*** tpollard has joined #buildstream15:22
tpollardHi, with a script element, I know you can add '' to get an empty r/w directory with a given name15:23
tpollardIf I have a path /foo/bar, should I expect only bar to be r/w?15:23
tpollardI'm trying to work out if a package has changed behaviour in a new release, or bst behaviour has changed15:25
juergbitpollard: if root-read-only is True, only the destinations specified in the layout are read-write15:29
juergbior am I misunderstanding your question?15:29
tpollardI've got a script element that adds /foo/bar, and writes to it15:30
tpollardhowever, during the build the packages wants to r/w /foo/baz, but seemingly can't15:31
tpollardif I manually add in another '' for /foo, it works15:31
tpollardso I'm presuming that only the bar subdir is r/w, and the root foo isn't15:32
tpollardhowever the version of the package & the version of bst changes between both snapshots, so I'm trying to narrow down what is happening15:34
tpollardI can't point you to the actual repo if I'm not explaining it very well15:35
tpollardalso referring to https://gitlab.com/BuildStream/buildstream/-/blob/master/src/buildstream/scriptelement.py#L14315:36
douglaswinshipI'm trying to build the same thing on two different machines something using buildstream 1.93.1 (and bst-plugins-experimental 1.93.1). It works just fine on one machine, but the other refuses to even build. I'm getting an error message:15:41
douglaswinshipError loading user configuration: {myHomeDirectory}/.local/lib/python3.7/site-packages/buildstream/data/userconfig.yaml: Severely malformed YAML:15:41
douglaswinship'NoneType' object is not callable15:41
douglaswinshipAny ideas?15:41
douglaswinshipI've just now pip-uninstalled and pip-reinstalled the appropriate versions of buildstream and buildstream-plugins-experimental15:41
douglaswinshipand the file that it mentions (userconfig.yaml) looks identical across both machines.15:42
coldtomdouglaswinship: `pip3 install --user ruamel.yaml.clib` is the fix to that iirc, i could be wrong though15:42
tpollardyep, it's a known issue15:42
tpollardone of benschubert's favourites I believe15:42
douglaswinshipnope. It's claiming that was already installed, and it hasn't fixed the issue15:43
tpollardjuergbi: did my explanation make sense?15:43
douglaswinshipi'll try uninstalling/reinstalling15:43
benschubertdouglaswinship: you need to force reinstall (-U works)15:43
benschubertit's ... annoying15:43
WSalmon<juergbi> tpollard: if root-read-only is True, only the destinations specified in the layout are read-write <- this seems to agree with what tpollard is experiencing, i wonder why it used to work15:43
juergbiyes, I would ask myself the same thing15:43
benschubertbut ruamel.yaml.clib does a test-compile as a pre-build step (WTH) and ends up failing because they haven't setup the env correctly...15:44
juergbiassuming root-read-only is indeed True15:44
benschubertand with their move to sourceforge, contributing is... hard15:44
tpollardthe script element is not setting it as true15:44
juergbihm, then everything should be read-write15:44
douglaswinshipjuergbi: the file in question doesn't directly set that paramet, if I recall. It could be true by default though?15:44
juergbiit's not15:44
juergbiproject.conf could override it, though15:44
juergbi(but would rather be odd)15:44
WSalmoni thought we defaulted to root-read-only is True15:45
tpollardbst doesn't15:45
juergbiroot is read-only by default for BuildElements15:45
juergbibut not for scripts15:45
WSalmonoh15:45
WSalmoni wonder if a project conf somewere has changed that would turn it on for scripts..15:46
tpollardI still think bst is only setting the subdir as r/w15:46
tpollardI don't know if that's change behaviour though15:47
WSalmoni wonder if tpollard tries to explicitly turn it off, then we would have a bug that it is getting turned on when it should not?15:47
juergbitpollard: it could also be a regression in the switch to buildbox-run15:47
douglaswinshiptpollard: i suppose that should be easy enough to test though?15:47
juergbialthough we should have this covered by tests15:47
douglaswinshiptpollard: s/easy/straight-foward-but-possibly-time-consuming15:48
juergbi(there are known limitations with buildbox-run-userchroot permissions but I assume you're using buildbox-run-bubblewrap)15:48
tpollardhttps://gitlab.com/celduin/bsps/pi-3b-plus-bsp/-/blob/bst-1.93.1/elements/deploy/image.bst is the script in question15:48
douglaswinshipcoldtom: benschubert: thanks btw! it worked.15:48
benschubertI should really get to detect that and handle it in BuildStream given how frequent it is :/15:49
tpollardjuergbi: so before adding in https://gitlab.com/celduin/bsps/pi-3b-plus-bsp/-/commit/9ee196fb86b5fe8bc85bfeb05dd42c59ee111f0e15:50
douglaswinshipwhat's the term for things like "root-read-only" btw? they're not 'variables'. Variables are the things that get expanded out with the %{} syntax. So what are they?15:50
douglaswinship(I have a question i want to ask but i'm facing a vocabulary error)15:50
tpollardjuergbi: it complained about /genimage/tmp, however, it was seemingly fine with writing to /genimage/sdcard which was defined in the layout15:51
benschubertdouglaswinship: options? config?15:51
coldtomi think config is the best word for it15:51
coldtomotherwise you have a name collision with project options imo15:52
juergbitpollard: you don't have to explicitly list parent directories of layout destinations15:52
juergbiit creates those implicitly15:52
juergbihowever, the parents are not writable unless they are specified as layout destinations themselves15:53
juergbi(except for destination '/' where root-read-only takes precedence)15:53
WSalmonjuergbi, yep but you said root-read-only should not be on for scripts by default?15:55
douglaswinshipWSalmon: juergbi: unless it's on by default, for root. And off by default for everything else?15:57
douglaswinshipsorry, ignore that. I misread15:57
douglaswinshipcoldtom: benschubert: thanks, config sounds good.15:58
douglaswinshipSo you can use bst show to display all the available variables, and what they resolve to, for a given element: https://docs.buildstream.build/1.4.3/tutorial/autotools.html?#looking-at-variables15:58
douglaswinshipis there a way to do the same for config settings?15:59
tpollardjuergbi: that makes sense thanks, the the subdir is r/w, but the parent/root of it isn't15:59
tpollard*that the15:59
douglaswinshipoh! bst show --format "%{config}" element-name.bst does some of what i was asking for.16:03
douglaswinship(but not enough)16:03
tpollarddouglaswinship: I think the easiest way we could test it for peace of mind is to apply a patch to the fdsdk junction in the bsp repo to switch it back to genimage 1216:04
tpollardremove the explicit /genimage, and see if it doesn't complain16:04
tpollardthat would rule out it being a difference in bst versions16:04
douglaswinshiptpollard: did you try it out? (/would you like some help?)16:31
tpollardI won't have time to try it out today, if you'd like to feel free :)16:32
tpollardwhilst we're in flux between bst versions & 'bsp' repos I wouldn't put too much effort into it though16:33
tpollardonce we've got a more stable pipeline then we can give things a good test16:33
douglaswinshipSure16:34
tpollardwe'll have to port the license split rule stuff over, so that'll be a good opportunity to see what we hit16:36
douglaswinshipport it over? Is the syntax for split rules different between different bst versions?16:36
tpollardbetween different 'bsp' repos16:36
douglaswinshipthis is becoming a very #Celduin conversation, in #buildstream...16:37
douglaswinshipi'll message you :)16:37
tpollardsure16:37
douglaswinshipback on buildstream: Can anyone help me figure out how to resolve this error? I'm trying to "bst shell" into an element:16:38
douglaswinshipError launching shell: Sources for element jupyter/notebook.bst are not cached.Element must be fetched.16:39
douglaswinshipThis is the first time i've tried to build or shell into anything from this project, locally. The build went fine, but shell is throwing the error.16:39
*** toscalix has quit IRC16:41
cphangdo we need to specify a source cache for shell to work?16:57
* cphang with a naive grok of https://gitlab.com/BuildStream/buildstream/-/blob/master/src/buildstream/_stream.py#L21116:57
cphangah, no this is a bug ini 1.93.1 https://gitlab.com/BuildStream/buildstream/-/commit/67ea61f5be51db24c2366167cb372d817e1ab6ff16:58
douglaswinship(and if so: why can't I just download the source from its original origin url?)16:58
cphangor more specifically https://gitlab.com/BuildStream/buildstream/-/commit/1f74bd72280b0e6712355625134af2758ec0971716:58
*** santi has quit IRC17:00
*** tpollard has quit IRC17:03
*** xjuan has joined #buildstream19:07
*** phildawson has quit IRC19:53
*** benschubert has quit IRC21:58
pointswavesthis job https://gitlab.com/pointswaves/embbeded-selfy/-/jobs/580084176 junctions the commit of FD that triggered https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/jobs/580051634 but the cache keys of the elements through the junction seem to be diffrent. eg. 0fd8f19015e950dd0808f540d7d5a33b5450405d8324f331b51c5af98194904a freedesktop-sdk.bst:bootstrap/build/base-sdk/image-aarch64.bst vs22:33
pointswaves99c588db1e8bd9907a3ec89300a22a78aa693638a9b2fe79e2344550eae8ff23 im not sure if its because i have set embbeded selfy wrong or because something else is up22:33
pointswavesAny one got any ideas?22:34
*** xjuan has quit IRC22:35

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