IRC logs for #buildstream for Tuesday, 2017-10-03

*** tristan has joined #buildstream05:41
*** jude has joined #buildstream07:44
tristandude !07:52
*** jonathanmaw has joined #buildstream08:03
*** juergbi has quit IRC08:20
*** juergbi has joined #buildstream08:23
*** adds68 has quit IRC08:59
*** adds68 has joined #buildstream08:59
*** ssam2 has joined #buildstream08:59
paulsherwoodtristan: ?09:04
tristanpaulsherwood, it's an insider, but jude didnt notice anyway09:07
judetristan, still on jude the dude? :)09:28
tristanjude, of course I wouldnt let you down :)09:30
tristanjude, I havent seen you around here much, welcome to the channel !09:30
paulsherwoodah, i get it now09:31
* paulsherwood is slow09:31
judepaulsherwood, you need to catch up :P09:34
judetristan, i have been around, though trying to keep an eye on a multiple channels. Hence why you have not heard from me in a while :)09:36
tristanjude, I guess I have to create a really frustrating bug for you to complain about !09:36
*** jude has quit IRC09:39
*** tlater has joined #buildstream09:42
*** jude has joined #buildstream09:52
tlaterHm, it seems that ostree will refuse to commit WO directories, and since it manages the permissions of its files I don't think caching WO directories is possible09:59
tlaterI can get it to throw an error at least09:59
tristantlater, that is why I was raising the other, deeper issue the other day10:00
tristani.e. https://gitlab.com/BuildStream/buildstream/issues/3810:01
tlatertristan: Yup, that would solve this issue.10:02
tristantlater, in any case lets not get carried away; that will have to be treated separately; and we're going to have to make a better statement about the weird corner cases and what is supported10:02
tlaterCurrently it looks like RO support is quite easy to get (and implemented), and WO support is impossible until #38 is solved10:03
tristanbut yeah, there seems to be no way to handle write only directories without that, because it must remain forbidden at all times to modify artifacts in the cache10:03
tristanSo, we are not allowed to temporarily chmod a directory in order to read it's contents, because that is in the cache10:04
tristanbesides the fact that ostree wouldnt give it to us anyway; I think it's impossible to commit10:04
tristanbut again not sure about that10:04
tlaterI don't really see a way it would be. I'm assuming just throwing a pretty error is alright for now, possibly solving it later with a neat way to manage permissions?10:05
tristanSo this is what currently works: https://bpaste.net/show/91a60a2ca58810:09
tristanAnd I'm wondering, while taking a pause, what would be the best... certainly a less featureful initial landing of conditionals is acceptable, but what can we get right off the bat10:10
tristanssam2, you expressed a need for a sort of 'else' clause10:11
ssam2yeah10:13
tristanfor instance, a list of conditionals is easy to handle: https://bpaste.net/show/3f96f3ecdc7a10:13
ssam2ah, that sounds probably fine10:13
ssam2i'm just thinking of lists of architecture-specific things really10:13
tristanBut then things need to get annoyingly wordy if we want a sort of if, elif, elif, else semantic10:13
ssam2for example, this: https://gitlab.com/baserock/definitions/blob/master/project.conf#L4210:14
tristanright, and in that case; else is only really a requirement in the case that you are casing a free form string10:14
ssam2indeed... which I hope to not be doing :-)10:14
tristanBut if we disallow freeform strings from the get go, the problem doesnt present itself right ?10:14
tristanright10:14
ssam2you might want to leave some thing open ended10:15
tristanyeah10:15
ssam2like, "do this on architecture a, b, or c: else do this on any other architecture"10:15
tristanAh10:15
tristanRight10:15
ssam2it would be annoying to have to list every possible thing in the 'else' clause there10:16
tristanThat is easy if every conditional is allowed to have an else value10:16
tristanso (?): condition, value, else10:16
ssam2yeah10:16
tristanI also tried something weird, maybe I should try it again10:17
tristanssam2, https://bpaste.net/show/eca84634463110:18
tristanhaha10:18
tristanI think it must be a no go, though10:18
tristanthere has to be something wrong with it10:18
ssam2what's weird about that ?10:19
ssam2that pony isn't defined anywhere ?10:19
tristanWell, somehow, it manages to get parsed, unquoted10:19
tristanAlready, I find this strange10:19
tristanAn else value is tricky, how would we do it, I guess... with an else key in the same dictionary ?10:20
tristanSo... "any key that is not 'else', is a conditional"10:21
tristanAnd the conditional must have only one key ?10:21
tristanbesides a potential else ?10:21
tristanSo I guess, no options named 'else' for you10:21
tristan(not horrible)10:21
tristanit's certainly more pretty10:21
ssam2yeah, that's a common syntax limitation :-)10:21
ssam2so this is an alternative to having "condition, value, else, ..." ?10:22
tristanssam2, only in the interest of being less wordy and more pretty yeah10:23
ssam2I guess the only issue is the extensibility, like if we want to add a new keyword in future besides 'else', it wouldn't be possible because people might have used that as a variable name10:23
tristanbut it also make extensibility screwy10:23
tristanexactly10:23
ssam2but, it looks much nicer!10:23
ssam2hmm10:23
ssam2how would the condition/value dict look with an else condition?10:24
ssam2it seems like the body of the 'else' would be at a different level of indent, which is especially not nice10:24
tristanhttps://bpaste.net/show/43cf1b48b9a310:25
tristanssam2, actually it looks great10:25
tristanbecause it's the same dict as the condition itself10:25
tristanof course, the same can be written like this, which is more confusing: https://bpaste.net/show/bdb49e750f3210:26
tristanbecause the symbol is expanded and treated as a truthy/falsy value, it tends not to jump out in your face as much10:27
tristanas it would if it were 'conditional: pony'10:28
ssam2right, yeah that is nice10:29
tristanhrrm10:29
tristanWhat potential ways would be extend branching10:29
ssam2I guess 'else' here is just shorthand for "not the-other-thing"10:29
tristanyeah10:30
ssam2you could do away with it and just have "pony" and "not pony"10:30
tristanssam2, but it will suck as soon as your conditional is more complicated10:30
tristanMaybe conditionals are never more complicated anyway10:31
ssam2yeah10:31
ssam2i mean, we do want to discourage complex conditionals10:31
ssam2but on the other hand, if we don't add 'else' now we couldn't add it later10:32
ssam2i can't think of any other keywords we'd add, for what it's worth10:32
tristanI could see 'element.bst in debug_elements or global_debug' being a thing10:32
ssam2true10:33
ssam2https://bpaste.net/show/bdb49e750f32 does look really nice ...10:33
ssam2it gets my vote10:33
persiaAnother way to do a similar thing is to drop simple conditionals, and only permit swtich/case like statements, with a "default".10:33
persiaWhen there is only one entry in the switch/case, it ends up acting like a conditional.  When there are more, it ends up behaving differently.10:34
persiaAnd "default" for default values is semantically safe in most situations.10:34
tristanpersia, I keep thinking that I want switches too10:34
tristanhow wordy is it going to be ?10:34
* persia tries something10:34
tristanAnd will I get my fallthroughs :)10:34
tristanssam2, on the other hand, extensibility could potentially be added via other (?) symbols10:36
tristana switch could be a different thing10:36
tristanAlso I'm not sure that we want a switch as much as we want an if, elif, else10:37
persiahttps://bpaste.net/show/c89edc62ebc9 ish?10:37
tristanwith zebra and default as other list elements10:38
persiaWell, zebry, but yes.10:38
tristanheh10:39
* tristan likes zebries :)10:40
tristanpersia, unfortunately this is a bit more restrictive10:40
tristanthough10:40
tristanpersia, i.e.; conditionals happen at the dictionary level, any dictionary can contain only one (?)10:40
tristanpersia, the reason for having a list acceptable there, is to allow the user to have multiple conditionals, and let the user decide in which order they are applied10:41
persiaSo https://bpaste.net/show/43cf1b48b9a3 was never a possibility?10:41
tristanpersia, it was, however what's happening is the user specified 2 conditionals and applied them in their decided order10:41
tristanohhh10:42
tristanpersia, right, *that* was never possible no10:42
tristanI.e. it's just a sample and I was writing it out in different forms, but that's not parseable10:42
persiahttps://bpaste.net/show/8e0305c6b493 is closer to what I meant then, now that I understand that.10:43
tristanpersia, except that dictionaries are unordered10:44
tristanthere is no guarantee that in the second conditional, I can evaluate horsy before zebry10:44
persiaRight.  https://bpaste.net/show/bdb49e750f32 is best then10:45
tristanhmmmm, perhaps with evil hacks there could be10:45
tristanbut, it would be leveraging things outside of yaml spec for sure heh10:45
persiaWe'd definitely have to move "default" to the end, which parsing doesn't give for free, which is annoying.10:46
persiaBut isn't the same true for "else"10:46
tristanWe cannot control the user placing else after the conditional, we just suspect users wont write: else { foo } if (condition) {bar}10:47
tristani.e. else would be explicitly extracted from the dictionary10:47
tristanwhereas the expression is extracted as "the only key in the dictionary that is not 'else' "10:47
tristancannot, being a strong word here... we can actually use ruamel's knowledge of column/line to deduce it10:49
tristanbut eh....10:49
tristangetting more and more on the weird side ;-)10:49
persiaAh, you wanted rich fall-through.  Yeah, you can't have that.10:50
persiaYou can have cases, but only if they are fully discriminatory (my example was bad, beacause quaggas randomly become zebras or horses)10:52
persiaand, since we can't trust users to always be fully discriminatory, I assert simple if is the correct choice.10:52
persia(as the alternate may cause non-deterministic behaviour if someone has a quagga)10:53
tristanI know10:54
tristanSo here...10:54
tristan(?) is initially defined as a list of conditionals10:54
tristanWhere a conditional is a single key dictionary, who's value is a dictionary to be composited to the dictionary holding (?)10:54
tristanI.e., we disallow the case of a single conditional not in a list10:54
tristanssam2, if you want to write a single conditional, you have to write it as a list with one element10:54
ssam2i think the two extra characters involved wouldn't pose a problem10:55
tristanssam2, which is no more typing than otherwise (it's '  ' vs '- ')10:55
ssam2yeah10:55
tristanssam2, no two extra characters... looking at https://bpaste.net/show/43cf1b48b9a310:55
tristanSo10:55
tristanThat leaves the "parse the value of (?) as a dictionary instead of a list" door open for future extensibility10:56
ssam2yeah10:56
ssam2and effectively allows 'elseif' type things10:56
tristanWell, not sure about that10:57
tristanssam2, I.e. we can extend it to allow 'else if' things, with some extra typing, you mean ?10:57
tristanthat would certainly be true10:57
tristanin the simplistic form, you have a list of ifs and that's it; it's up to you to say 'not A and B' in the second conditional10:58
ssam2yeah, that's what i was thinking10:58
tristanRight10:58
ssam2but since you can only have a single `(?):` key in a dict, it's more flexibility than the non-list approach10:58
tristanwe could have (?) and a dictionary with 'exclusive:' and the exclusive is an ordered list of if/elif/elif...10:59
tristanbut we can leave that out for now10:59
ssam2yeah10:59
tristan(also note that say, a trailing 'True' expression at the end would effectively be a 'default')11:00
persiaHow does "trailing" help if we cannot guarantee an order when parsing?11:05
tristanpersia, we can guarantee the order of lists11:05
tristannot dictionaries11:05
tristanonly lists are ordered11:05
persiaThen all is good :)11:05
gitlab-br-botpush on buildstream@81-non-empty-read-only-directories-not-handled-during-bst-build-and-others (by Tristan Maat): 1 commit (last: Ensure that artifact file permissions are set in the right order) https://gitlab.com/BuildStream/buildstream/commit/23e1e11708621030d928215966795bccd78e312411:08
gitlab-br-botbuildstream: merge request (81-non-empty-read-only-directories-not-handled-during-bst-build-and-others->master: Ensure that artifact file permissions are set in the right order) #100 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/10011:08
gitlab-br-botbuildstream: merge request (81-non-empty-read-only-directories-not-handled-during-bst-build-and-others->master: Ensure that artifact file permissions are set in the right order) #100 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/10011:12
gitlab-br-botpush on buildstream@81-non-empty-read-only-directories-not-handled-during-bst-build-and-others (by Tristan Maat): 1 commit (last: Ensure that artifact file permissions are set in the right order) https://gitlab.com/BuildStream/buildstream/commit/95158527b47f5ae9963c7bbe04d0ae4d87d29ab211:12
ssam2i need some way of having an increasing counter in the Docker image tags11:14
ssam2i'm thinking the easiest approach is $(git rev-list --count master)11:14
ssam2it's guaranteed to increase on every change and requires no faff, the only problem is it can jump by more than 111:15
ssam2and maybe we'll need something cleverer once we start having stable branches of buildstream11:15
tristanIs a date stamp not good enough ?11:17
tristanI mean, this is something we'll be explicitly referring to in the .gitlab-ci.yml right ?11:18
tristanany reason it even has to be a number ?11:18
ssam2the problem with date stamp is, what if we do 8 builds in one day11:18
ssam2there will also be a "latest" tag11:18
tristanall of which resulted in a docker rebuild ?11:18
tristanso we committed the dockerfile 8 times ?11:18
ssam2it can happen11:19
ssam2i'm trying to ensure we have some kind of persistent label for each build11:19
ssam2so you can depend on a specific version if you want and know it won't change under your feet11:19
tristanabbreviated git sha ?11:19
ssam2possible, but then it's hard to know which is the latest11:19
ssam2docker tooling could help there, but i'm not sure it does in practice11:19
tristanLatest doesnt make sense really with multiple branches11:20
tristanregardless of naming11:20
ssam2true, it's kind of docker convention to have it though11:20
ssam2but you're right, 'master-latest' and '1.0-latest' would make more sense once we have stable branches11:20
tristanssam2, I guess it would be desirable also if it is possible to have `bst-here` derive the appropriate docker tag to use ?11:21
tristannot sure if that's possible, though11:22
ssam2we could allow the user to choose11:22
tristanprobably we need to update .gitlab-ci.yml & the bst-here script (if that's what we're really going to end up calling it), at the same time11:22
ssam2if we had a 'latest-stable' tag then bst-here could just pull that11:23
tristanMaybe we want to allow the user to choose, but I'm pretty sure we dont want to force them :)11:23
ssam2and it would automatically use the latest stable release11:23
tristanwouldnt be exactly correct, though; I would prefer to have to update it manually11:24
tristanat the same time as .gitlab-ci.yml11:24
ssam2but we control the latest-stable tag11:25
tristanbut we dont control when users upgrade buildstream11:25
ssam2we do if they're using the docker image11:25
tristanAnd ideally the dockerfile with the buildstream version you have, is the one which defines the image you use11:25
tristanDo we ?11:25
ssam2you just said you don't want to force them to choose which version to use, but now you want them to control when they upgrade11:25
tristanI didnt know that11:25
gitlab-br-botpush on buildstream@non-sandbox-builds (by Tristan Maat): 1 commit (last: Add %{script} format to `buildstream show`) https://gitlab.com/BuildStream/buildstream/commit/30d9012c528ebc42c2438cac89e3c065e3c63ef611:25
ssam2the docker image contains buildstream, so they use whatever version is in there11:26
tristanssam2, I was presuming that the docker image was something supporting of the user's installation/checkout of buildstream11:26
ssam2aha11:26
tristanNot that that is very important to me, though11:26
ssam2it could work that way, but i think people who choose the docker approach are exactly the sort to thing "I don't care what version i have as long as it works"11:27
ssam2*think11:27
tristanI guess so long as the script to run it remains simple and rarely changes; we only need to care about that script working with any docker image11:27
ssam2yeah; and the script is indeed simple11:27
tristansounds fine to me; maybe when we document this approach to using buildstream, we want to start with "download this script"11:28
tristaninstead of 'clone buildstream.git'11:28
ssam2ah yeah11:29
ssam2we could link to the latest git version of the script11:29
ssam2and then the workflow pretty much becomes "get the script, run the script"11:29
tristanWill we have bash completions ?11:29
ssam2there's two ways to do this I guess11:30
tristanAs I recall, the bst-here thing was a run once and enter build streamable environment11:30
ssam2yeah11:30
ssam2that seems the better way11:30
tristanCan we have that be a subshell which can be exited with exit and ^D ?11:31
ssam2yeah11:31
ssam2we can offer both approaches, but the 'wrap every bst command in bst-here' approach will be a bit slower, and will not have completions11:31
tristanawesome11:31
ssam2but yeah, docker has a 'interactive' mode that lets you run a shell as normal11:31
tristanRight, I dont really think we need to care about that; but doing something in the environment to make it apparent would be good11:31
tristanssam2, what I dont like is having to remember anything custom for exiting the env11:32
ssam2ah right. with docker it's a real subprocess, it's not like virtualenv11:32
tristanlike virtualenv, it has some kind of function you have to call to exit the env, which of course, I forget the name of11:32
gitlab-br-botpush on buildstream@options-refactor (by Tristan Van Berkom): 20 commits (last: doc/source/index.rst: Fix documentation to link the correct Sandbox module) https://gitlab.com/BuildStream/buildstream/commit/11c77a67006b34983d9af813560d5d9f6920c8cc12:04
persiaa concern about "I don't care what version I have as long as it works": isn't there a significant chance that one's artifact cache only functions with a specific version of BuildStream?  Does this mean that folk following master will have an incentive to freeze on a random version (perhaps a release)?12:10
ssam2i'm assuming that tristan's plan is to maintain a stable branch of buildstream that doesn't break compatibility of things like the artifact cache12:12
ssam2thus I expect folk to only follow master if they know the risks12:12
ssam2and to have `bst-here` default to following stable12:12
ssam2i guess moving from 1.0 to 2.0 or whatever can break stuff, not sure how we'd handle that12:13
ssam2maybe have bst-here-1.0, bst-here-2.0, etc. ?12:13
tristanssam2, that makes sense yes, no bumping of artifact version in stable branches12:14
tristanMoving from one stable branch to another should not *break* things; however a bump in the artifact version is not "breaking things"12:15
ssam2all true12:16
tristananyway, by virtue of regular stable branch policy (i.e. only bugfixes land here), artifact cache keys shouldnt ever change there12:16
* paulsherwood would hope that latest buildstream can support all old artifact versions, not just latest artifact version12:16
tristanAlso, we still need a way to checkout artifacts via metadata12:16
tristanpaulsherwood, I dont think there is any sense in trying to support every algo that was ever used; to *re-derive* old artifact cache keys12:17
tristanthat sounds absurdly expensive12:17
tristanHowever being able to deal with existing artifacts which dont match the current scheme, is totally possible12:18
paulsherwoodtristan: we're talking about a few if statements, in a few hundred lines of python. how can that be 'absurdly expensive'?12:19
tristanI think we're talking about 10 years of accumulative changes in various parts of a code base12:19
tristanIncluding policy for plugins which are not included in that code base12:19
paulsherwoodfor cache-key calculation?12:20
tristanYes12:20
tristanthis is of course, entirely orthogonal to format backwards compatibility12:20
paulsherwoodinteresting. how many versions have you bumped so far?12:21
tristanThe cache key algo has change quite a few times12:21
tristanThat or, reason to change it12:21
tristanHowever I'm holing off on bumping actual numbers pre 1.012:21
tristan(I would if there was an absolute need, but seems to not be), also; the versioning support for this landed after a few of the changes which would require bumps12:22
paulsherwoodso, for reproducing an old artifact (say in 10 years time) i guess you're saying use the old version of bst from that time?12:22
tristanaddition of metadata which buildstream needs to read back from an artifact, is one reason which absolutely requires a bump for our intermediate pre-stable dev purposes12:23
tristanBut last that happened, it was before we had the versioning12:23
tristanCertainly12:24
paulsherwoodlet's make sure that is documented, then, and that bootstrapping old builstream versions is locked down...12:26
paulsherwoodit would be a shame, in 10 years, to find that we could no longer bootstrap today's bst because (say) that version of ostree no longer works (for whatever reason)12:27
persiaConfiguring CI to reliably build systems with each released BuildStream is probably wise.  Those branches may not get many changes, but it helps to know if a point is reached where it is very hard to run the old version.12:27
persiaAnd if the old version is hard to run, then it makes sense to apply effort to make sure it *can* be used, to support folk who actually need multidecade support.12:27
tristanWell12:28
tristanNot that that CI would be a bad thing12:28
tristanBut I think we need to consider what "multidecade support" means12:28
tristanConsidering that a cache is so far by definition a cache, and not a store, I'm not really convinced that the key we use for that is what matters most12:29
tristanChecksumming and comparing the output data for a truly reproducible build, sounds more interesting12:29
tristanbut then, that itself could change with artifact bumps (especially if you consider the metadata encoded into an artifact as a part of that checksum)12:30
persiatristan: If we can be absolutely confident that the same source generates the same result with different buildstream versions, then I agree.12:30
persiaBut if we're changing the artifact versions, I'm fairly confident we're no longer producing the same thing.12:31
tristanIt's a generally unsolved problem, but rather an almost solved one by now12:31
persiaI'm willing to assume every upstream is reproducible, for the sake of this discussion.12:31
persiaMy issue is that *if* we have a different version of buildstream, we are no longer generating the same artifact.12:31
persiaTherefore, how could we possibly know we reproduced our result?12:32
tristanIn which case our biggest blocker to that I suppose is https://gitlab.com/BuildStream/buildstream/issues/3812:32
persiaAnd why use BuildStream, whern other tools preserve the reproducibility of the source?12:32
tristanpersia, preserving a key used for the purpose of caching the results, does not necessarily mean that the results are not reproducible from the same source12:33
tristani.e. those are not necessarily related12:33
persiatristan: How can I tell?12:34
tristanpersia, compare the actual output ?12:34
persiaIf I build X, and I get Y, and then I build X and I get Z, why should I believe Y == Z?12:34
persiaIf the artifacts are identical, I should be able to reuse them from cache.  If they are not, I cannot.  If I cannot, I would assume they are not identical.12:34
tristanpersia, you are trying to state that the folder name (cache key) under which buildstream stores the result, *is* the result12:34
tristanpersia, I'm contesting that statement12:35
paulsherwoodwe call it a cache-key for historic reasons, but it's not just used for caching... it's a way to identify an artifact12:35
persiaI7m suggesting that if we organise the structure based on an element we expect to change, we're confusing the users for no good reason.  If we expect identical results, let's use a key that is based on that identity, so users don't need to rebuild their cache because a release happened.12:36
*** bochecha has joined #buildstream12:36
persiaI don't really care about "cache key", only about the artifact.12:36
persiaAnd if the artifact remains identical, I don't understand why we have to change the URI for the artifact.12:36
paulsherwoodright... but the 'cache key' is an identifier for the artifact. and multiple identifiers may actually lead to the exact same set of bits12:37
tristanpersia, then consider this for instance: https://gitlab.com/BuildStream/buildstream/issues/8212:37
tristanpersia, if we start to store a manifest in order to optimize buildstream's performance, that manifest is not technically part of the build output; but it still requires a cache key bump12:39
persiatristan: does "cache key" perhaps conflate identity of the artifact and identity of the API to interact with the artifact?12:39
persiaIf so, are there any reasons that we could not take an existing cache, and run tooling against it to generate the new cache keys for the cached artifacts and add some hardlinks?12:40
tristanpersia, I rather think splitting the key in two is more sensible no ?12:46
persiatristan: I concur :)12:46
persiaA key, used for sorting things in the filesystem, linked to the identity of the bits in the artifact, and another key, used for API versioning.12:47
tristancurrently, as far as element configuration go, it is possible to add new features to your format (element configuration) while remaining backwards compatible with the unique keys (contributes to cache key)12:47
persiaThe extra advantage of that is that one can do richer negotiation and capabilities-based interaction with an API version key.12:47
tristanand that's certainly recommended12:48
tristanbut writing plugins is not fully documented yet12:48
gitlab-br-botbuildstream: issue #102 ("Run CI as non-root user") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/10213:31
tristantlater, thanks :)13:31
tlater:)13:32
tlatertristan: As an aside, I assumed the `--format '%{script}'` output was supposed to be piped into a shell to execute builds outside of the sandbox - but this won't work if the correct sources aren't in /buildstream/build.13:33
tlaterAm I misunderstanding the purpose of that feature?13:34
tristantlater, my thoughts are this; the useful part of this feature is just to show the project author what will be run for a build element13:35
tristanbeyond this; any mangling of it should be achieved by allowing some pre-emptive changes to variables before formatting13:36
tristanThat said, /buildstream/build is rarely to never expanded in scripts13:36
tristanit will however want to install in /buildstream/install13:36
tristanHmmm13:36
tristanGah, my usefulness just flew out the window :-/13:36
tristanNow I realize the script will generate something... without the configure-commands:, build-commands: etc13:37
tristanhmmm, maybe it's still useful13:37
tlatertristan: It's useful for what you want, it just doesn't exactly do what we intended it to do :)13:38
tristanI intended it to show something useful to a project author who wants to know whats going on13:38
tristanwith full knowledge that someone will think of abusing it for something pointless13:39
persiatlater: I think of it as more useful as a means to get an overview of what is going to happen, so I can run a *single command* by copy&paste in my terminal to go through the next step of my source whilst I'm working on it, without needing to wait for a full sandbox-create, build, report cycle.13:56
persiaOnce things build properly and some local test runs, I can commit, and then call buildstream normally.13:57
tristanCould be nice in conjunction with `bst shell --build <element.bst>`13:58
tlaterHm, alright, that makes sense. I had another look at the scripts too, and it seems that the $SRCDIR can just be set to something, so this does work as a build script if need-be.13:58
tristanfool around with editing bst file and running `bst show --format %{script}` in a separate terminal13:58
gitlab-br-botbuildstream: merge request (non-sandbox-builds->master: Add %{script} format to `buildstream show`) #102 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/10214:01
gitlab-br-botpush on buildstream@options-refactor (by Tristan Van Berkom): 5 commits (last: context.py: Now expects cli_options in the constructor) https://gitlab.com/BuildStream/buildstream/commit/d811c729ac7550b114413fd257d7b76b98b99cf114:01
gitlab-br-botbuildstream: merge request (non-sandbox-builds->master: Add %{script} format to `buildstream show`) #102 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/10214:02
gitlab-br-botbuildstream: merge request (non-sandbox-builds->master: Add %{script} format to `buildstream show`) #102 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/10214:02
gitlab-br-botbuildstream: merge request (non-sandbox-builds->master: Add %{script} format to `buildstream show`) #102 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/10214:02
tlaterAlright, !102 is waiting for a review. I think it might need a bit more documentation, but I'm not sure where to put that.14:03
tristantlater, for now the `bst show` formats are unfortunately only documented in `bst show --help`14:05
tristanbut it's a bad situation14:05
tristanespecially because of the formatting bugs with generating man pages and html documentation with the click docstrings14:05
tlatertristan: Yeah, I added it to that, but I don't exactly want to put a wall of text explaining environment variables there.14:05
tristantlater, omg no - we're not going to encourage abuse of that by specifically documenting the weird stuff you can do with it14:06
tlaterHeh, alright, then this should be fine :)14:07
tristantlater, can I see what a sample output looks like ?14:07
tlatertristan: It's not the neatest because of bash being weird with subshells, but I'll add that output to the issue14:07
tlaterI'll also rebase, didn't realize I was behind again14:08
tristan:-/14:10
tristanAh right, each command is expected to be it's own shell14:11
tristanthat is unfortunate indeed14:11
gitlab-br-botbuildstream: merge request (non-sandbox-builds->master: Add %{script} format to `buildstream show`) #102 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/10214:11
tlaterIt's worse than that, since chaining multiple commands in a subshell can sometimes make bash miss the second ')' - so we need a newline before we close subshells14:12
tristanbochecha, hmmm, I'll have to dig in deeper to that `bst shell` issue, fwiw interactive shells in user namespace is non-trivial and "doing it properly" might be our only recourse14:14
gitlab-br-botpush on buildstream@non-sandbox-builds (by Tristan Maat): 4 commits (last: sandbox.py: Fixup placement of main Sandbox docstring) https://gitlab.com/BuildStream/buildstream/commit/03a646e708d3559b3e0f06c0103b76ef8290872e14:14
gitlab-br-botbuildstream: merge request (non-sandbox-builds->master: Add %{script} format to `buildstream show`) #102 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/10214:14
tristanwhere I think "doing it properly" involves something with an additional helper process delivering data to/from the console in the user namespace14:14
* tristan has been up to his ears in this last minute project options turnaround... and needs to reproduce a build to debug issue #9814:15
tristanjjardon[m], fwiw... there is a whole "thing" going on presently, and for the last week, about frustration with yocto and inability to properly generate a correctly targetted native compiler14:20
tristanjjardon[m], as the leader of the replacing yocto initiative, might be nice if you hang out in #flatpak :D14:20
*** tlater has quit IRC14:21
jjardon[m]mmm, am I not there already?14:22
tristannope14:22
tristanunless you changed your nick :)14:22
jjardon[m]lets fix that :)14:22
*** tlater has joined #buildstream14:25
gitlab-br-botbuildstream: Tristan Maat created branch 102-run-ci-as-non-root-user14:33
gitlab-br-botpush on buildstream@102-run-ci-as-non-root-user (by Tristan Maat): 1 commit (last: TEST COMMIT) https://gitlab.com/BuildStream/buildstream/commit/93b3d42bb49d8b70d22708aadd902256481e98a614:44
gitlab-br-botpush on buildstream@102-run-ci-as-non-root-user (by Tristan Maat): 1 commit (last: TEST COMMIT) https://gitlab.com/BuildStream/buildstream/commit/2ec492dd187e979a31ee4ada352d0b62b4027cbb14:47
gitlab-br-botpush on buildstream@102-run-ci-as-non-root-user (by Tristan Maat): 1 commit (last: TEST COMMIT) https://gitlab.com/BuildStream/buildstream/commit/d7d980abef62e735785ae493a8566c9ffc869a7e14:49
gitlab-br-botpush on buildstream@102-run-ci-as-non-root-user (by Tristan Maat): 1 commit (last: TEST COMMIT) https://gitlab.com/BuildStream/buildstream/commit/4a7901c4a911cd15351ec1a673557c90bce0833114:55
gitlab-br-botpush on buildstream@102-run-ci-as-non-root-user (by Tristan Maat): 1 commit (last: TEST COMMIT) https://gitlab.com/BuildStream/buildstream/commit/bbd7730f73eb278555ac3e3d1c6f62347e451c3314:59
*** tristan has quit IRC14:59
tlaterssam2: Is there something in the docker image that prevents me from switching users? https://gitlab.com/BuildStream/buildstream/-/jobs/3493111615:23
tlatersu Also doesn't appear to work15:23
ssam2there are no users, just root15:26
ssam2that's the Docker way15:26
ssam2you could add users if you need one for something15:26
benbrownThat's what tlater has done in that pipeline ;)15:27
ssam2oh right15:27
ssam2it's hard to debug without seeing what `whoami` actually outputted15:28
tlaterssam2: It's root, I made sure it was in another run15:28
ssam2hmm ok15:28
tlaterNo strange newlines or anything15:28
* tlater would try locally, but debian refuses to install docker15:29
ssam2weird15:29
ssam2you could set up a VM on http://nebula.ducie.codethink.co.uk/ with an OS that is capable of running Docker, perhaps15:29
benbrownPerhaps each command is run as the runner's configured user (which is likely root by default)?15:30
tlaterGood point, benbrown15:30
tlaterAlthough usually changes to the environment work, such as cd15:30
* tlater attempts15:30
ssam2ah it maybe that `sudo -s` fails because you have no stdin15:30
tlaterssam2: That wouldn't explain why su fails15:31
ssam2no it wouldn't15:31
ssam2it's also possible that there's some capabilities or user namespaces thing preventing any change of UID15:31
benbrowntlater: Aye, I'm just guessing :)15:31
ssam2although given that bwrap works inside the container, it can't be too much of an issue15:32
ssam2hmm, but do we do nested user namespaces with bwrap?15:32
gitlab-br-botpush on buildstream@102-run-ci-as-non-root-user (by Tristan Maat): 1 commit (last: TEST COMMIT) https://gitlab.com/BuildStream/buildstream/commit/08116bb9996cfeae0f8c8ee716e5c62a219d8dd815:32
ssam2i think it's worth spending time reproducing this locally rather than theorising, anyway15:32
tlaterssam2: Reproducing might require running a docker-runner instance15:33
tlaterMight be fastest doing it on the CI15:33
ssam2worth trying it in a local docker container15:33
benbrowncan't reproduce with just docker15:33
benbrownfyi15:33
ssam2ah, right15:33
tlaterta benbrown :_15:33
tlater*:)15:33
gitlab-br-botpush on buildstream@102-run-ci-as-non-root-user (by Tristan Maat): 1 commit (last: TEST COMMIT) https://gitlab.com/BuildStream/buildstream/commit/be07c45b349aed8ed106f890bb2cbd59e0a49a0b15:39
tlaterbenbrown was right, it's probably executed by the specific user somehow :) I was pretty sure it's just a docker thing, but apparently not.15:40
gitlab-br-botpush on buildstream@102-run-ci-as-non-root-user (by Tristan Maat): 1 commit (last: TEST COMMIT) https://gitlab.com/BuildStream/buildstream/commit/9f3fd6f1e23d14eeaa80fbd594eab7a8440dd72615:43
gitlab-br-botpush on buildstream@102-run-ci-as-non-root-user (by Tristan Maat): 1 commit (last: TEST COMMIT) https://gitlab.com/BuildStream/buildstream/commit/cf5b73ebcd2e7d21aa101ea0aeebf58bf1b783ca15:46
gitlab-br-botpush on buildstream@102-run-ci-as-non-root-user (by Tristan Maat): 1 commit (last: TEST COMMIT) https://gitlab.com/BuildStream/buildstream/commit/7b0ee298566cd370ce3d969f2a36a7a8af53122015:52
*** tristan has joined #buildstream16:03
gitlab-br-botpush on buildstream@102-run-ci-as-non-root-user (by Tristan Maat): 1 commit (last: TEST COMMIT) https://gitlab.com/BuildStream/buildstream/commit/daafae01fb64f3e1a849b3ab07163d07aed2079616:05
gitlab-br-botpush on buildstream@102-run-ci-as-non-root-user (by Tristan Maat): 1 commit (last: TEST COMMIT) https://gitlab.com/BuildStream/buildstream/commit/1af988506ecc24e28ef9645b37ed081b7f5f66e516:15
*** ssam2 has quit IRC16:24
*** ssam2 has joined #buildstream16:27
gitlab-br-botpush on buildstream@81-non-empty-read-only-directories-not-handled-during-bst-build-and-others (by Tristan Maat): 1 commit (last: Ensure that artifact file permissions are set in the right order) https://gitlab.com/BuildStream/buildstream/commit/ba10db7e98f948e14abf9bab3232a8ad466b763616:29
gitlab-br-botbuildstream: merge request (81-non-empty-read-only-directories-not-handled-during-bst-build-and-others->master: Ensure that artifact file permissions are set in the right order) #100 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/10016:29
*** jonathanmaw has left #buildstream16:40
*** jonathanmaw has joined #buildstream16:40
*** xjuan has joined #buildstream16:58
*** jonathanmaw has quit IRC17:02
*** ssam2 has quit IRC17:02
*** tlater has quit IRC17:17
*** anahuelamo has quit IRC17:18
*** jude has quit IRC18:06
*** jude has joined #buildstream19:08
*** jude has quit IRC21:37
*** xjuan has quit IRC23:14

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