IRC logs for #buildstream for Thursday, 2018-04-05

gitlab-br-botbuildstream: merge request (chandan/close-all-workspaces->master: WIP: _frontend/cli.py: Add option to close multiple workspaces) #357 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/35700:09
gitlab-br-botbuildstream: merge request (chandan/close-all-workspaces->master: WIP: _frontend/cli.py: Add option to close multiple workspaces) #357 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/35700:23
gitlab-br-botbuildstream: merge request (chandan/close-all-workspaces->master: WIP: _frontend/cli.py: Add option to close multiple workspaces) #357 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/35700:49
gitlab-br-botbuildstream: merge request (chandan/close-all-workspaces->master: WIP: _frontend/cli.py: Add option to close multiple workspaces) #357 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/35701:15
gitlab-br-botbuildstream: merge request (chandan/close-all-workspaces->master: WIP: _frontend/cli.py: Add option to close multiple workspaces) #357 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/35701:51
gitlab-br-botbuildstream: merge request (chandan/close-all-workspaces->master: _frontend/cli.py: Add option to close multiple workspaces) #357 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/35701:52
*** tristan has joined #buildstream04:58
gitlab-br-botbuildstream: merge request (tristan/fix-workspace-build-assertions->master: Fix workspace build assertions) #358 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/35806:04
tristanjuergbi, please check https://gitlab.com/BuildStream/buildstream/merge_requests/358 asap06:05
tristanjuergbi, that fixes the infamous assertion :)06:05
tristanWhile I'm at it... maybe I should also remove that pointless `if ...: return` statement which is at the very end of Element._update_state()...06:06
gitlab-br-botbuildstream: merge request (tristan/fix-workspace-build-assertions->master: Fix workspace build assertions) #358 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/35806:16
juergbitristan: the change looks sane, calculate_cache_key() will already return None if the cache key of one of the dependencies is still missing06:23
juergbitristan: the updated test reproduces the issue? does this mean that all non-strict workspace builds hit this?06:26
tristanjuergbi, I suppose it means that, I can confirm though that the updated test indeed hits the assertion06:29
tristandefinitely tried that06:29
juergbithe pointless return at the end is to keep the code structure in line with the other cache keys. you can remove it if you prefer06:29
juergbiI thought it was something much harder to hit, oh well, thanks for the fix06:29
tristanand tried a build of glade from gnome-build-meta as well as the tests for good measure06:29
tristanI'll leave the return at the end :)06:29
* tristan thought it was much harder to hit too06:30
tristanbut I suppose it's proof that our coverage is not all that great06:30
tristanI've hit some other bugs along the way while trying to reproduce06:30
juergbior that we have too many code paths ;)06:30
tristanlooks like tracking on workspaces is breaking06:31
tristanyes, I've been trying to reduce codepaths too, we're not churning enough with addition of features06:31
tristanincreasing technical debt as we go along06:31
tristanI've cleaned up some redundant things last weekend at least... have to keep refactoring thing06:32
tristanAlso, I would like to have debug flags, similar to GTK_NOTE()06:33
gitlab-br-botbuildstream: issue #316 ("Assertion error when building in non-strict mode") changed state ("closed") https://gitlab.com/BuildStream/buildstream/issues/31606:34
gitlab-br-botbuildstream: merge request (tristan/fix-workspace-build-assertions->master: Fix workspace build assertions) #358 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/35806:34
tristanthat could help us collect information when users are able to reproduce something that we cannot easily reproduce06:34
tristanbut, maybe overkill for now06:34
juergbisounds generally useful. yes, depends on how often we have cases that are not obvious to reproduce06:35
juergbitristan: btw: have you seen my latest FUSE test result?06:35
tristanI saw a message roll by !06:35
tristanSounds exciting !06:35
tristan6% is... non negligible but... still great !06:35
juergbiyes but if you can cut down staging time instead, it may be very close06:36
tristanAhhhh of course !06:36
tristanWe need fuse to be able to do that stage on demand stuff anyway06:36
tristan(or similar solution)06:36
tristanso it could even be a net profit :)06:37
tristanwell, depending06:37
juergbiindeed06:37
tristannot for webkit :)06:37
tristanthen again, I wonder how much this impacts webkit, which is very CPU intensive06:38
tristanI expect that the performance loss is possibly less06:38
tristanmore CPU less I/O... maybe ?06:38
juergbithe impact is larger for heavy parallel build06:38
tristan...heavy parallel builds which write a lot of small object files, I would think06:39
tristan...heavy parallel builds which spend more time processing than writing... different ?06:39
juergbiwell, as is right now I've only tested FUSE for the rootfs06:39
juergbiso the object file writing would be irrelevant06:39
tristanAhh right I see06:39
tristanso this is performance loss due to reading through fuse06:40
juergbihowever, I would actually like to see FUSE used for workspace builds to keep the object files (and co.) separate from the pristine workspace sources06:40
juergbithis would allow us to simplify some workspace build aspects06:40
tristaninteresting idea06:40
juergbisuch as the one we hit in this bug06:40
juergbibtw: this was still with single-threaded FUSE layer06:41
juergbijust making use of all FUSE optimizations06:41
juergbiso we could possibly even further lower the overhead06:42
juergbiand the integration part was still using pyfuse, so that might get slightly faster with the optimized FUSE as well06:42
tristanjuergbi, is this still using the python thing ?06:42
tristanor separate C library ?06:42
juergbino, this is a separate C binary that uses the lower level FUSE interface06:42
tristanThe low level C interface is still available in python06:43
tristanWell, C is probably better in this case, but distribution story with that is complicated by this06:43
tristanwith pure python we reach all users immediately without pain06:44
juergbiyes, that's indeed an issue. however, one reason for C was also that it will be needed by remote workers which will theoretically be independent of BuildStream06:44
juergbinot sure about the overall distribution story at this point06:44
tristananyway it sounds promising, technically it doesnt add onerous dependencies either, just the technique is complicated06:45
juergbibtw: did you mean the FUSE class with lower level interface?06:46
juergbithat still corresponds to the higher level C interface (path-based)06:46
juergbiI've also used libfuse 3, not sure how much this makes a difference or whether this would be a dependency issue06:46
juergbianyway, was just a proof of concept due to the impact on remote execution architecture06:47
tristanjuergbi, that is one possibility, but with the fuse.py which we've copied into our repo (the upstream we needed to fork for some multiplatform reason, bsd ? I forget...)... that uses the C library directly from python06:48
juergbiah, upstream has two modules, fuse.py and fusell.py, the latter is the low level interface that we don't have06:49
juergbiSafeHardlinks was already much slower than bindfs in earlier tests, though, both using the high level interface06:51
tristanright, see buildstream/_fuse/fuse.py06:54
tristanit uses python ctypes06:54
tristanbut yeah, it will inevitably be slower06:55
tristanjuergbi, from what I recall from reading the underlying C code, there was some problems with how the API is designed wrt syncrhonizing the unmounting, and we need to send it a signal and "trust"06:56
tristanif libfuse 3 fixes that API, that would also be nice :)06:57
juergbinot sure whether anything changed in this regard06:57
juergbifor this test I simply called fusermount -u and let that deal with it06:57
tristanso for now I have to fix tracking on junctions...06:59
tristanlooks like we're not saving the result of tracking junctions; I had to actually write the ref into the junction element, even though the project uses project.refs :-S06:59
tristan(talking about too many code paths)07:00
*** noisecell has joined #buildstream07:05
gitlab-br-botbuildstream: merge request (tristan/private-refactor-3->master: More fixes for private symbol policy and code consistency) #359 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/35907:44
*** toscalix has joined #buildstream08:07
*** jonathanmaw has joined #buildstream08:09
gitlab-br-botbuildstream: merge request (tristan/private-refactor-3->master: More fixes for private symbol policy and code consistency) #359 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/35908:09
gitlab-br-botbuildstream: merge request (tristan/fix-workspace-printing->master: fix workspace printing) #360 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/36008:36
*** bethw has joined #buildstream08:55
*** dominic has joined #buildstream08:56
gitlab-br-botbuildstream: merge request (tristan/fix-workspace-printing->master: fix workspace printing) #360 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/36008:59
tristantlater, if you're around, after sleeping on it, I think we should retract some of what we discussed yesterday09:01
tristantlater, while it seems a good idea to stamp out the artifacts at build initialization time such that they are "used now" right away, I fear that this will introduce too much complexity, considering that in some build planning modes, we dont know which artifacts we're going to use *yet*09:02
tristantlater, unless you have an approach that is very simple... lets not go down that path09:02
tlatertristan: We need to know which elements will be used anyway to ensure we don't remove the artifacts for a single pipeline09:16
tlaterTwo running instances of buildstream doesn't really change that09:17
tristantlater, as I understand, that is much more easily discovered along the way, though right ?09:17
tlaterThat's the question - I wasn't actually aware that the build pipeline might change during the build09:17
tristanI.e. we dont know what artifact cache key we're going to use in the case of non-strict09:17
tlaterI went with simply marking both the strong and weak cache keys as "in use"09:18
tristanif we download the weak cache key, we dont know the strong key it contains until it's pulled09:18
tristanhmm09:18
tristanHow do you mark the ref as used when you dont yet have the artifact ?09:19
tlatertristan: As juergbi pointed out to me, there's no value in treating them differently anyway09:19
tristanI guess that's just a non-issue09:19
tristanbecause you dont have it, so it cant be deleted, once you get it and extract it, it will be used09:20
tristanalso, I presume you consider that a downloaded artifact might have a ref dating last week09:20
tlatertristan: But it will be created during the build, so the first element that is built might get deleted eventually09:20
tlatertristan: That case I do consider, all artifacts are marked with a new mtime when they're contributed to the cache09:20
tristanalright, if bumping mtime at initialization time is not too complicated, lets keep it in09:21
tlaterIt's actually really simple :)09:21
tlaterI'm just concerned I'm missing a few edge cases now....09:21
tristanbut if we can; lets try to keep artifact cache stuff related things in _artifactcache/09:22
tristanturning all that hectic stuff that goes on in _pipeline.py at initialization time into a single ArtifactCache.init() call is a general goal09:22
tlatertristan: Most of it is, though perhaps I should include a bit of a refactor in this branch.09:25
tristanif it's not too onerous / dangerous, cleanup of pipeline is a pain point I think09:26
tristanI made a stab at separating all the code which plots out the actual element lists from being tangled with the pipeline commands09:27
tristanbut I got side tracked and it's dead now09:27
tristanthe way except elements works in there is pretty confusing09:28
tlaterYeah, I think except should really be integrated in the original computation09:28
tlaterScheduling algorithms don't tend to have except clauses though, so it's a bit of a unique case09:29
tristanWe need a strong set of clear tools for calculating the lists and except intersections; that is probably suitable for Pipeline.py09:29
tristanThen we probably need the "main" stuff that pipeline.py does separately, and fed clear lists; maybe the deps_elements() + except elements stuff could all be worked out using core helpers from cli.py or app.py, before feeding it to the machine which processes them09:30
* tristan had something called a PipelineSelection() object, from which another could be created using except elements09:31
tristannot sure it's the sanest approach, though09:31
tristanjmac, mind if I just push a quick one line fix for benchmarks issue 4 to buildstream master ?09:53
tristancovering it in CI is difficult for now09:54
adds68Hi, we have encountered an error during a build stage for glib-network09:55
adds68I'm wondering if this has been seen before by anyone here09:55
adds68" _lzma.LZMAError: Corrupt input data"09:55
adds68Build log for more context: https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/jobs/6093298209:55
gitlab-br-botbuildstream: merge request (jmac/performance-ci->master: Add benchmark to CI test and document CI.) #341 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/34109:57
tristanadds68, what is the tarball name ?09:58
tristanadds68, and is this a duplicate of https://gitlab.com/BuildStream/buildstream/issues/338 ?09:59
adds68tristan, url: https://download.gnome.org/sources/glib-networking/2.54/glib-networking-2.54.1.tar.xz09:59
tristanok, so it's not an lzip, it looks like dup of 33809:59
tristanadds68, check the file size in your cache, I suspect it is unreasonably small10:00
jmactristan: No objections (if it's not already done)10:00
tristanjmac, done, commented on benchmarks issue :)10:00
adds68tristan, why would it being small, cause such an error?10:02
tristanadds68, did you read 338 ?10:02
adds68tristan, yes, but it isn't clear as to why the size is important10:03
tristanjmac, I should just point out, that running buildstream on a system without user namespaces is only marginally supported; artifacts from such systems are untrusted and should not be shared as I understand10:03
adds68Unless it relates to the failure to download the complete file?10:04
tristanjmac, which means, it's probably not ideal to be running benchmarks without proper support10:04
tristanadds68, right10:04
jmactristan: OK, good to know - I don't know why we run without namespace support tbh10:04
adds68tristan, ack, cheers10:04
tristanadds68, what I suspect is that, the file was first downloaded and then cached in your source cache, and then tracking it a second time downloaded just the response that the etag was correct and there was no need to redownload, then we serialize that response into a file and call it a tarball10:05
tristanpalmface!10:05
tristananyway, needs investigation, I am only aware of it since this morning10:05
adds68tristan, haha, brilliant, at least it's been made aware10:06
tristanwe could really use a local http server like I think we do for the artifact push/pull tests, to test our source fetching/tracking :-/10:08
tristancurrently we use file:// urls across the board10:08
adds68tristan, could you not use something like SimpleHTTPServer?10:12
adds68tristan, to server those files currently behind those file:// urls?10:13
skullmandepends on how conformant you need it to be10:13
* skullman has had issues with it in the past10:13
skullmanthough it was way more pleasant to hack it up a little to start on an ephemeral port and add a way to report that, than try to get any of the more featureful HTTP servers to start on an ephemeral port10:14
tristanwhatever it is, it should probably be the same thing we use for testing the artifact push/pull10:20
tristanbut, in this particular case, would be nice to have etag support10:20
*** aday has joined #buildstream10:22
* tlater finds this bug unreasonably amusing10:30
tristantlater, the tarball thing ?10:31
tlaterYep10:31
tristanI know, I'm rotf10:31
tristanexcept for the fact that I'm probably going to be the one who has to fix it...10:32
tristanand probably needs to be fixed last week...10:32
tlaterStill worth the giggle imo10:32
tristan:)10:32
tristanjuergbi, bst show: Error loading pipeline: Subproject fetch needed for junction.bst10:32
tristanjuergbi, while reproducing the last thing, I ran into some hurdles reproducing the artifact assertion thing to initially setup the subproject...10:33
tristannow I'm adding test cases for junctioned pipelines to all the frontend tests10:33
tristanjuergbi, so I'm thinking maybe it's a good time to consider what are the correct behaviors for all of this...10:34
juergbiok, sure10:34
tristanI guess this one is sane... but feels a bit weird, maybe we can improve that message with something more helpful ?10:34
juergbii.e., mention how to explicitly fetch? makes sense10:35
tristanfor bst show, we have --downloadable for refreshing the downloadable state10:35
gitlab-br-botbuildstream: merge request (jjardon/getting_started->master: Add getting started section) #323 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/32310:36
tristanso I'll add a suggested command there, and we probably also want to distinguish between whether the junction also is missing a ref10:37
tristanjuergbi, while refactoring initialization, I notice some commands do automatically fetch the subprojects as a part of initialization... that would be build I guess ? perhaps also fetch and track ?10:37
tristanjuergbi, I'll just go over the whole thing and lets take another look together in review10:38
juergbiyes, Context has fetch_subprojects parameter10:38
juergbiwe discussed this initially10:38
juergbiso we didn't want to do implicit fetching for commands that are normally expected to complete quickly / the user is waiting on10:39
juergbibut anything that spins up a pipeline should just implicitly fetch10:39
tristanthat sounds reasonable to me indeed10:40
tristanwe might still want to change it10:41
tlaterskullman: I think your hanging tests fail because of this: https://gitlab.com/BuildStream/buildstream/blob/master/buildstream/sandbox/_mounter.py#L10110:41
tlaterSpecifically, I think that because _signals.terminator will only catch a certain set of exceptions, and the function executed under it is a context manager and therefore can practically throw any python exception, we can end up never calling cls._unmount. This is makes debugging hard, because instead of an exception you end up with a stuck child process.10:41
tristani.e. if the user git clones a project with subprojects and starts with `bst show`, the first time - it might be more generous to do things automatically10:41
* tlater just hasn't been able to prove that that is the problem for lack of priority :|10:42
juergbiyes, the current behavior may not be ideal10:48
juergbimaybe we should rather make it easy to abort the fetching if it takes a while? not sure10:48
tristaninteresting11:08
tristanjuergbi, looks like the source(s) for a junction are never added to the junction element ?11:09
tristanhmmm, I'll find these things out as I go along, seems though that we have a lot of separate code paths here11:09
tristanprobably the root cause for workspaced junctions not working11:10
juergbias they are already used as part of the loader, there are definitely some differences to regular elements11:13
juergbimaybe we can streamline it a bit11:14
*** tiago has quit IRC11:56
*** tiago has joined #buildstream12:06
skullmantlater: ah, I see what you meant now. I'll have a prod at that.12:13
tlatertristan: About our node get function: https://gitlab.com/BuildStream/buildstream/blob/master/buildstream/_yaml.py#L32812:26
tlaterIt's definition means that setting default_value to 'None' means that buildstream will error out, which is annoying to call into12:26
tlaterApparently the default way of handling this sort of case is to use a "sentinel": https://stackoverflow.com/questions/13287887/using-none-as-parameter-to-keyword-argument12:27
tlaterCould we do that? It's annoying me to work around this every time I need a default value to be None12:27
tristanNone is None12:40
tristanExplicitly setting things to None is normally meaningless12:40
* tristan looks12:41
tlatertristan: The point is that sometimes you want to use None as a meaningful value, and unfortunately our node_get doesn't allow that atm12:41
tristanRight12:42
tlaterMy current predicament is that I want a cache-quota, but that cache-quota might be unset12:42
tlaterSo now I have to try except and work with LoadError to get that12:42
tristanSo we use self.node_get(... default='') or None12:42
tlaterThat's ugly in cases where you want a string...12:42
tristantlater, it looks like an API compatible change to me12:42
tristantlater, if you want to do it, I want you to give me a branch which changes our usage of it across the code base.12:43
tlaterYep, that makes sense12:43
* tlater considers spending a few minutes searching through the codebase while waiting for tests12:43
tristanthere are probably not too many cases to update in upstream; I'd hazard a guess of well under 50 lines, limited to about 5 or 10 files12:47
gitlab-br-botbuildstream: merge request (214-filter-workspacing->master: Make workspace commands on a filter element transparently pass through to their build-dependency) #317 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/31712:47
tristanyou'd want to catch them at both levels, where project & context use _yaml internal API directly, and plugins use the public Plugin.node_get() accessor12:48
tristanand maybe Element.node_subst() also12:48
tristansounds like a generally nice improvement though12:48
tristantlater, there might be a docstring with an example sitting around in element.py and/or plugin.py to update for that too12:49
gitlab-br-botbuildstream: merge request (214-filter-workspacing->master: Make workspace commands on a filter element transparently pass through to their build-dependency) #317 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/31712:49
tlaterAh, that would explain how it caught on12:49
tlaterI'll keep an eye out for it12:49
tristanNot sure if anyone has been looking at those docs :)13:02
tristanIt caught on mostly from looking at the code for examples I would expect13:02
*** xjuan has joined #buildstream13:07
paulsherwoodif i want to setup a new ci pipeline for a buildstream project, is there a recommended default docker image to use?13:11
*** aiden has quit IRC13:12
*** aiden has joined #buildstream13:13
tlaterpaulsherwood: The recommendation will be the flatpak-sdk as soon as that becomes available - for the time being, if you're aiming to build a project that wants to use the x86image, there's buildstream/image-tools13:14
paulsherwoodtlater: ok i'll try that, thanks13:15
tlaterpaulsherwood: As a word of warning, that image uses alpine and hence busybox/musl, so it might not work with all projects13:16
tristantlater, I dont think you and paulsherwood are talking about the same things13:17
tristanapples and oranges13:17
tlaterOh, whoops13:17
tlaterYeah, you're right tristan13:17
tristantlater, I suspect we are talking about a docker image to run buildstream on, like for gitlab13:17
* tlater misread, nevermind me13:17
tristanpaulsherwood, buildstream/buildstream-fedora:master-56-5d7ee17 is probably good, or buildstream/buildstream-fedora:latest13:21
tristanpaulsherwood, the former is the last specific version we were using in CI before downgrading python, the later is a "latest" tag which is automatically updated13:22
tristanpaulsherwood, they are both generated from: https://gitlab.com/BuildStream/buildstream-docker-images13:22
tristana separate project whos' purpose in life is to generate such supporting docker images13:22
tristana separate repo, rather13:22
tristannote, those above strings I mentioned are both appropriate for "image: " in a .gitlab-ci.yml file13:24
paulsherwoodtristan: correct, thanks13:28
tlatertristan: Hm, I think the node_get change is going to be a bit harder, some of the plugins seem to rely on something treating '' as None and I can't find it13:30
gitlab-br-botbuildstream: merge request (tristan/junction-fixes-and-tests->master: junction fixes and tests) #361 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/36113:30
paulsherwoodhmmm.... https://paste.baserock.org/amapapihox13:30
paulsherwoodthat's not a good thing13:31
tristanpaulsherwood, that was fixed this morning, and broken yesterday13:31
paulsherwoodheh13:31
tristanpaulsherwood, it is also an indicator that you are on a host which does not support real user namespaces13:31
paulsherwoodso which image do i need?13:31
tristanHmmm, I wonder if this is a problem with the runner, not the image13:31
paulsherwoodin the real world i don't get to control which kernel runs on my ci environment13:32
tristanuser namespaces need to be in the kernel13:32
paulsherwoodthat's a bug, then13:32
tristanI would not agree, it's simply a requirement to provide proper isolation without being root13:33
tristanthe real world needs to catch up, then, we have it for our CI, I'm not 100% sure how it's being ensured, though.13:33
paulsherwoodso i'm defeated at this point. i'll have to use something else13:34
tristanfwiw, we added that hack specifically for arch linux13:34
tristanWe support it, but we cannot say it's trustable without user namespaces on host kernel, I think one of the driving reasons to taint the artifacts (avoid pushing them), is that we can't guarantee build user UID = 013:35
tristanwhich can mean that artifacts can differ depending on what random UID is in use13:36
paulsherwoodadd a warning, then.13:36
paulsherwooddon't crash.13:37
jmacThat's what we fixed this morning13:37
jmacIt would normally show the warning and continue13:37
paulsherwoodah, ok. so i need to update buildstream/buildstream-fedora:latest ? or get a different image?13:38
jmacI know little about the images, unfortuntaely13:40
tlaterpaulsherwood: The images are rebuilt every night, I think, it's possible the image hasn't been updated yet.13:41
tlater8 hours ago is the last one, apparently13:41
tlaterpaulsherwood: I can trigger the CI for you and rebuild the image, if you like13:42
tlaterMight take a little bit to get an updated image though13:42
tristantlater, does the image include buildstream itself ? (I know next to nothing about the image and docker)13:42
tlatertristan: The fedora one does, yes13:42
tristanI see13:42
tlaterIt's also used for bst-here13:42
tristanpaulsherwood, indeed, that crash is happening *while printing a warning* :)13:43
tristantlater, so I guess it also has all deps we want for existing plugins (git, bzr, tar...) ?13:43
tristananyway, I expect it would13:44
tlatertristan: Pretty sure it does, yes13:44
tlaterIt's why we needed to update all of them when we added that dpkg dependency13:44
tlaterArpy I think?13:44
tristanpaulsherwood, jjardon[m] is the whiz kid when it comes to gitlab, I might rather follow his example here: https://gitlab.com/freedesktop-sdk/freedesktop-sdk/blob/master/.gitlab-ci.yml13:45
* tlater just double checks that this didn't change since he last looked at the repo and runs the builds again so we have a fresh bst for paulsherwood :)13:45
tristanWhich uses explicit tags and shas to be in control of exactly what is in use13:45
tristan(rather than using "latest" of anything)13:46
gitlab-br-botbuildstream: merge request (tristan/junction-fixes-and-tests->master: junction fixes and tests) #361 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/36113:47
tristanjuergbi, I just merged some fixes for corner cases and a large amount of junction related frontend tests with that above MR, didn't get to streamlining anything regarding loading of elements yet13:48
tristanand I dont think it fixes the workspace issue, but it does fix some other things, specifically project.refs (my fault for having missed some of that)13:48
tlatertristan: This dependency that I want to add for parsing data sizes also happens to have a is_tty() call like blessings13:50
tlaterPerhaps we could replace that? I think you mentioned you wanted to get rid of blessings at some point13:50
jjardon[m]paulsherwood: my ArchLinux doesn't have namespaces enabled and bst works fine (tristan fixed that some time ago); if you are using runners with docker you have to run then in privilege mode, but that's a separate problem13:51
*** tristan has quit IRC13:51
jjardon[m]paulsherwood: Is this in a public repo so I can take a look?13:51
juergbijjardon[m]: It seems Arch kernels have user namespaces enabled these days. They are disabled for non-root by default but if bwrap is installed setuid-root, buildstream can still use them13:55
jjardon[m]juergbi: oh, ok. I alwasy get the "bwrap: No permissions to creating new namespace, likely because the kernel does not allow non-privileged user namespaces. On e.g. debian this can be enabled with 'sysctl kernel.unprivileged_userns_clone=1'." warning when I try to build13:56
paulsherwoodhttps://paste.baserock.org/aruqowixec13:56
paulsherwoodjjardon[m]: i'm on a private ci envonment, that i don't control13:56
paulsherwoodthat traceback is much longer than my bst file13:57
juergbijjardon[m]: ah ok, so I guess bwrap is not installed setuid-root on Arch13:57
*** jjardon has joined #buildstream13:58
juergbipaulsherwood: issue with project name with space?13:58
juergbiI thought we added at least detection for this at some point but maybe this slipped13:59
*** tristan has joined #buildstream13:59
paulsherwoodreally?13:59
* paulsherwood is speechless :)13:59
juergbijust a guess. at least there used to be an issue. don't know whether that's still the case14:00
paulsherwoodyes. that 'fixed' it.14:01
juergbijmac: iirc, you noticed the project or element name with space issue at some point. Did you file an issue?14:02
paulsherwoodwhile we're on, can we properly fix this so that i don't even need to create a project.conf?14:02
paulsherwoodjust use the name of the bst file if no name found?14:03
paulsherwoodfwiw i did try "name with quotes"14:04
juergbiThe name of the .bst file would be bad as then you'd get different project names when building different targets14:04
juergbiWe could default to the basename of the project directory14:04
paulsherwoodok, that then :)14:04
jmacjuergbi: I did, let me check14:05
tlaterIs the project name really the only required key?14:05
paulsherwoodaccording to my hello-world experiments, yes14:05
juergbipaulsherwood: It's not a parsing issue. It might be OSTree not supporting spaces in refs at all and we don't do any name mangling (or validation, apparently)14:05
juergbiyes, that's indeed the only one that is really required14:05
tristanjuergbi, what is the basename of the project directory, you can git clone or (whatever you used to store your project) to any directory you want, and then move it over to a temporary directory14:06
juergbiIn practice I'm not sure how far you'll typically get without anything else14:06
paulsherwoodbasename of project directory might include spaces...14:06
tristansounds like just really bad idea and error prone14:06
juergbitristan: Yes, if you rename it, you have to deal with not being able to reuse the cached artifacts etc.14:06
paulsherwoodjust put a default name for all unnamed projects?14:06
juergbiAlso wouldn't allow per-project user config14:07
tlatertristan: Isn't that equivalent to changing the project name in project.conf?14:07
tristanI rename checkouts of stuff all the time14:07
tristanI wouldnt want that to effect the content of what it was14:07
jmacjuergbi: Hmm, no, there doesn't appear to be an issue for it14:07
juergbiWe could possibly support unnamed projects14:08
*** dominicb has joined #buildstream14:08
paulsherwoodjust warn: please name your project, we'll call it "Trevor" for now.... or similar?14:08
*** dominicb has quit IRC14:08
juergbiNot sure whether it'd be worth it14:08
tristanit's a possibility, and an invitation to namespace clashing14:08
paulsherwoodjuergbi: it's worth it to remove this friction for new driveby user14:08
juergbiWith a persistent warning, it seems fine with me14:09
juergbiWould be easy to add and reduce the starting hurdle14:09
paulsherwood+114:09
tristanhttps://gitlab.com/BuildStream/buildstream/blob/master/buildstream/_artifactcache/artifactcache.py#L142 <-- should really be avoiding the space causing a crash14:10
tristanspace is not a letter or a digit14:10
juergbitristan: it only does that for element name, not project name...14:11
tristanahhh14:11
gitlab-br-botbuildstream: merge request (cmake-ninja->master: WIP: plugins/elements/cmake.yaml: allow using ninja instead of make (#279)) #362 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/36214:11
* tristan is at end of day and last time I hung out, chicken place was sadly closed14:11
tristanI'll fix it later unless tlater or juergbi or someone beats me to the punch...14:12
gitlab-br-botbuildstream: merge request (135-expire-artifacts-in-local-cache->master: WIP: Resolve "Expire artifacts in local cache") #347 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/34714:13
gitlab-br-botbuildstream: merge request (135-expire-artifacts-in-local-cache->master: WIP: Resolve "Expire artifacts in local cache") #347 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/34714:14
gitlab-br-botbuildstream: issue #339 ("Can't use project names with spaces in") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/33914:18
jmacRaised https://gitlab.com/BuildStream/buildstream/issues/339 to cover the project name with spaces issue14:19
gitlab-br-botbuildstream: merge request (135-expire-artifacts-in-local-cache->master: WIP: Resolve "Expire artifacts in local cache") #347 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/34714:21
gitlab-br-botbuildstream: issue #340 ("If no project name found (eg because no project.conf) set it to a default, with a warning") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/34014:26
gitlab-br-botbuildstream: merge request (unused-workspaces->master: _pipeline.py: correct reporting of unused workspace) #363 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/36314:29
gitlab-br-botbuildstream: merge request (unused-workspaces->master: _pipeline.py: correct reporting of unused workspace) #363 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/36314:44
*** ernestask has joined #buildstream14:50
tristanthanks jmac14:51
tristanwhile walking to the chicken place and back, I had a thought that, a nicer way to deal with absent project.conf, is an interactive session which is triggered when bst is invoked which creates one if it is absent14:52
tristanthen we ask only a few questions with sane defaults, and at least get the user to decide on a name (sane default for required format version would be the current format version, and recommend storing elements in an elements/ subdirectory)14:53
tristanseems like an easy user friendly way of handling lack of project.conf14:53
tlaterAh, going the npm route15:04
tristanthere are a few tools I've seen do that, some of them more pleasant to use than others15:07
tristanbut I think if we keep it down to 3 questions, with only project name asking for a specific value, it will be more pleasant than annoying15:08
tristanalong with an initial question of course "BuildStream has not detected a project in the directory: ... Would you like to create one here ?"15:08
* tlater agrees, this is a neat way to get new users bootstrapped too - it's actually one of the few features about npm I somewhat like :)15:08
tlaterThough npm does go way too far with the initial bootstrapping.15:09
tristanI've on the other hand witnessed some very long sessions which made me want to give up15:09
gitlab-br-botbuildstream: merge request (135-expire-artifacts-in-local-cache->master: WIP: Resolve "Expire artifacts in local cache") #347 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/34715:19
paulsherwoodtristan: what if user is CI ????15:19
gitlab-br-botbuildstream: merge request (135-expire-artifacts-in-local-cache->master: WIP: Resolve "Expire artifacts in local cache") #347 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/34715:20
* paulsherwood doesn't like the 'interactive session' idea **at all**15:21
tlaterpaulsherwood: We already have a bit of interactiveness buildstream - there's a --no-interactive flag, and buildstream automatically disables interactiveness when appropriate.15:22
tlaterI'm guessing we'd still go with a default name in that case?15:22
*** noisecell has quit IRC15:24
* paulsherwood hopes so15:24
paulsherwoodwhat is --no-interactive set to by default?15:24
persia--no-interactive is not set by default15:25
paulsherwood:/15:25
persiaThe idea being that it isn't hard to add to a script for non-interactive stuff, but humans would get annoyed having to type --interactive all the time.15:25
jmacIt will also set no-interactive if stdout is not a terminal, which is common to a lot of unix utilities15:25
juergbiyes, so it should typically do the right thing by default15:26
paulsherwoodoh, ok.15:26
tlaterDoes that get set in paulsherwood's CI case though? I suppose it depends on what the CI tool does.15:27
juergbiif no stdin is connected, we should do the right thing15:27
juergbiand I don't expect CI to connect stdin15:27
juergbiotherwise I consider this a bug15:28
juergbiI like the interactive setup, as long as it's kept really short. Maybe not even ask about the format version, just set it (+ print a message).15:28
persiaMost CI systems I've seen do connect stdin: they just never send anything over it.15:28
juergbisounds odd, but whatever the details, I believe BuildStream's autodetection works so far15:29
persia(there are too many things that break trying to open stdin, even if they don't need any content from it)15:29
juergbiI would have expected /dev/null15:29
persiaThat might be true at the origination point, but once you get into orchestration, often there are needs for "interactive" articulation points.15:31
persiaFor example, if I have a CI tool that instantiates a system, makes an ssh connection to the system, and runs some commands, <stdin> is defined from the perspective of the commands being run, even if the CI tool has /dev/null as <stdin>15:32
juergbiright but you should still immediately get EOF when trying to read from stdin, afaict15:35
*** bethw has quit IRC15:47
tristanHow would you be a fly by user creating a project for the first time, ... in CI ?15:57
tristanpaulsherwood, the great part of the solution, is that it *forces* the user to choose a project name, without them hitting the problem of not having a project.conf15:58
persiatristan: Generally a first-time-project in CI would indicate a bug :)16:04
tristanTo be clear: Defaulting to a hard coded project name is undesirable becuase the whole point of a project name is to distinguish multiple projects from eachother16:08
tristanHaving a default project name is an invitation for users to ignore that, which will be a cause for greater headaches down the road16:09
tristanSo, I'm trying to get to the bottom of this dislike of project names and project.conf in general; project.conf is an essential part of the source code of a buildstream project; as it stands, you dont have a project if you dont have a project.conf, even if the only _mandatory_ thing you must declare there is a name, it's very undesirable to not have one16:11
tristanso we would do better to educate the user of it's usefulness early on, than to invite the user to ignore it16:11
tristanfor instance, the default for the format-version is always 0, it's quite undesirable to not set that to a number, unless you *really* only use features available in format 016:12
tristannot setting format-version, but using features not available in format 0, means people who build your project, will not get a helpful abort at startup, but instead an error that such-and-such is an invalid YAML key16:13
* paulsherwood will wait and see :)16:13
gitlab-br-botbuildstream: merge request (jennis/136-expire-remote-cache-artifacts->master: WIP:136 expire remote cache artifacts) #364 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/36416:22
jmacI have a bit of a mystery with the artifact cache here16:23
jmacI've populated a remote cache by doing one build, then wiped the local ostree and ran the build again16:24
jmacbuildstream says it's downloaded all the artifacts and finished the build in 30 seconds16:24
jmacBut there's nothing in the https-server logs saying anything has been requested16:24
gitlab-br-botbuildstream: merge request (135-expire-artifacts-in-local-cache->master: WIP: Resolve "Expire artifacts in local cache") #347 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/34716:24
jmacEverything is 404s, e.g. 10.24.4.120 - - [05/Apr/2018 17:07:29] "GET /artifacts/objects/d2/b65a78c4ab97ae6e6d625e09e634b4105f2f5304765dee59a84ab70304c62c.commitmeta HTTP/1.1" 40416:25
jmacSo where is my local BuildStream instance getting the artifacts from?16:25
gitlab-br-botbuildstream: merge request (135-expire-artifacts-in-local-cache->master: WIP: Resolve "Expire artifacts in local cache") #347 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/34716:25
gitlab-br-botbuildstream: merge request (135-expire-artifacts-in-local-cache->master: WIP: Resolve "Expire artifacts in local cache") #347 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/34716:29
tristanjmac, good question: https://gitlab.com/BuildStream/buildstream/issues/27516:31
tristanjmac, I might guess that you might have one configured in your ~/.config/buildstream.conf16:32
jmacNope, no ~/.config/buildstream.conf. It's a new server I set up today so very unlikley to be in any old configuration files.16:34
tristanso the project declaring the elements is the one who defines it, but if you have junctions going on, then it can be downloading from multiple places16:36
tristanwe really need easy to fix 275 fixed16:36
tristanthen we could look at it and clearly see: Does what we did here really make sense ?16:36
jmacWell I'm about to do that locally so I'll make it into a merge request if I find out16:37
tristanthanks :)16:37
jmacThe URL is ultimately composed by OSTree itself though, not by BuildStream16:38
tristanthere is also multiple artifact caches configured for a single project as a possibility, I clearly recall the use case for it, but cannot vouch for it having been implemented exactly that way16:38
tristanOh *that*, is annoying, but on the BuildStream side of things... I would say that it's sensible to trust the artifact server and just print the ssh url if an ssh url is configured16:39
*** toscalix has quit IRC16:39
gitlab-br-botbuildstream: merge request (135-expire-artifacts-in-local-cache->master: WIP: Resolve "Expire artifacts in local cache") #347 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/34716:39
tristanjmac, I think the usual case is that a project is configured with https URLs (because everyone has read access), and ssh URLs usually only go into a buildstream.conf file (the few who have push access)16:40
tristanbut not every case is usual16:40
*** dominic has quit IRC16:41
jmacThat's the case I have, anyway16:42
tristanI supposed its sensible for a concentrated work group or proprietary project indeed (to have all users use the ssh protocol and manage their access rights centrally)16:49
tristannot really designed for security though16:50
tristan(no prevention of a user using an https url if that one is available on the internet)16:50
gitlab-br-botbuildstream: merge request (135-expire-artifacts-in-local-cache->master: WIP: Resolve "Expire artifacts in local cache") #347 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/34717:07
gitlab-br-botbuildstream: merge request (135-expire-artifacts-in-local-cache->master: WIP: Resolve "Expire artifacts in local cache") #347 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/34717:09
*** jonathanmaw has quit IRC17:19
* paulsherwood wonders if anyone has used bst to create cloud-style things yet? e.g. kubernetes infra17:24
tristanpaulsherwood, possibly that guy brejoc who wanted a solution for building web frameworks on docker many months ago; we should probably have a docker image creating element for that sort of thing18:00
paulsherwoodtristan: ack18:01
paulsherwoodi'm guessing i could start from a baserock system if i want to roll my own?18:02
paulsherwood(i.e. using buildstream)18:02
tristanI dont see what would be complicated about rolling out images, it's just a question of understanding the delivery/distribution format of the thing18:02
tristansimilarly to flatpaks, I presume it might involve adding some special metadata files18:03
gitlab-br-botbuildstream: issue #341 ("argument path resolution is illogical") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/34118:13
gitlab-br-botbuildstream: issue #342 ("Provide a way to initialize a new project") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/34218:14
jjardon[m]docker images are now defined in a open spec, so other tools can create them: https://github.com/opencontainers/image-spec18:24
jjardon[m]probably better to tell bst to call external tools though, intead reimplement everything18:25
jjardon[m]similar to what packer does: https://www.packer.io/docs/builders/docker.html18:26
gitlab-br-botbuildstream: issue #343 ("initial cache-key resolution should display whole key, not just a short SHA") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/34318:50
jjardon[m]Is anyone here aware of any change from 1.0.x to 1.1.x that could make the conversion scripts to break? https://gitlab.com/BuildStream/defs2bst/issues/218:52
*** Prince781 has joined #buildstream18:58
*** Prince781 has quit IRC19:00
tristanjjardon[m], we should be compatible with 1.0.x, if anything has broken, it may have been user configuration about artifact caches, which I think was communicated pretty clearly at the time of the 1.0 release19:06
jjardon[m]tristan: we are using 1.0.x; it breaks when we try to use 1.1.219:08
tristanmaaaybe we screwed up, but lets see what those incompatibilities are, and see if we should address them in bst rather than the conversion19:08
tristanjjardon[m], exactly, 1.0.x is supposed to be stable; so if 1.1.x doesnt work with 1.0.x, that is a failure19:08
tristanthere may be some failure, but lets see what they are before deciding to call it a problem with the conversion script19:09
jjardon[m]yeah sure: there is a full log of the failure in the issue I opened above19:10
tristanI only saw a successful conversion log19:10
tristannot a build log where bst fails on the converted result19:10
jjardon[m]tristan: oh sorry, copied the wrong link19:13
jjardon[m]fixed now19:13
tristanoh that is weird, it looks like it's the defs2bst that's breaking19:23
tristanjjardon[m], maybe it tries to use buildstream internals19:24
tristanthen it would be defs2bst indeed which would have to be fixed19:24
tristanI dont see buildstream in the stack trace though19:24
tristanjjardon[m], maybe something besides buildstream changed ? ruamel.yaml ?19:25
tristanor maybe the stuff being converted changed near the same time, and you hit something not well supported19:25
jjardon[m]I have just run exactly the same commit but with bst 1.0.1 and the conversion works19:27
* jjardon[m] goes for dinner, will dig more later19:27
tristanstrange, I dont see how buildstream version can effect that off the bat, but requires investigation19:28
tristanand not at 4:30am :)19:28
paulsherwood:)19:28
*** Prince781 has joined #buildstream19:52
*** ernestask has quit IRC20:35
*** aday has quit IRC20:38
*** valentind has quit IRC20:39
*** valentind has joined #buildstream20:40
*** valentind has quit IRC20:45
*** valentind has joined #buildstream20:45
*** Prince781 has quit IRC20:46
*** valentind has quit IRC20:49
*** valentind has joined #buildstream20:49
*** Prince781 has joined #buildstream20:51
*** Prince781 has quit IRC20:55
*** valentind has quit IRC21:00
*** valentind has joined #buildstream21:00
*** valentind has quit IRC21:05
*** valentind has joined #buildstream21:06
*** jsgrant has joined #buildstream21:18
*** jsgrant has quit IRC21:20
*** xjuan has quit IRC22:33
*** mohan43u has quit IRC22:47
*** mohan43u has joined #buildstream22:51

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