IRC logs for #buildstream for Monday, 2018-09-10

*** mohan43u has joined #buildstream04:40
*** tristan has joined #buildstream04:48
*** tristan has quit IRC05:01
*** tristan has joined #buildstream05:34
*** ChanServ sets mode: +o tristan05:36
*** leopi has joined #buildstream06:14
*** brlogger has joined #buildstream06:56
gitlab-br-botbuildstream: merge request (tristan/fix-cache-exclusivity-1.2->bst-1.2: Tristan/fix cache exclusivity 1.2) #779 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/77906:57
*** iker has joined #buildstream07:01
*** iker has quit IRC07:02
*** iker has joined #buildstream07:06
gitlab-br-botbuildstream: merge request (tristan/fix-cache-exclusivity->master: _scheduler/queues: Mark build and pull queue as requiring shared access to the CACHE) #775 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/77507:16
tristanjuergbi, I would appreciate it if you could look over my latest cleanup job07:19
*** leopi has quit IRC07:20
*** leopi has joined #buildstream07:21
tristanSheesh, and it's not the end of it :'(07:24
tristanWhy are we adding more state to Element ? Element._build_log_path ? (not even local private with double underscore, but has an accessor ?)07:25
tristanThis can be returned through Element._assemble(), it's only used in BuildQueue, which calls Element._assemble()07:25
tristanNo reason to pollute the element with more state for this... and that's ignoring the "# Bypass queue processing entirely the first time it's tried." ... wtf ???07:26
tristanThat looks like fallout from caching failed builds, bst-1.2 is unaffected by that madness07:27
tristantlater[m], btw, I was able to preserve the never_delete_dependencies test case by configuring it with "builders: 1"07:28
tristantlater[m], I think that's a good middle ground for now; accept that we will keep queueing build jobs after assessing that we *might* have to cleanup, until we know that we *must* cleanup07:29
tristanin practice, it hardly makes a difference, the cache size calculation is much quicker than a build07:30
tristantlater[m], interestingly, ArtifactCache.append_required_artifacts() approach is *also* broken07:31
tristanI will change that to ArtifactCache.mark_required_elements(), and check their keys at cleanup time instead07:31
tristantlater[m], `bst build --track-all core.bst` for instance... results in deleting required artifacts - because cache keys are not calculated yet07:32
tristanAlso, I've found the source of non-determinism of pylint; we need to pin astroid, mccabe, and isort07:33
tristanThose specific deps effect the behavior of pylint, I'm less convinced about isort but the others definitely07:34
*** finn has joined #buildstream07:47
*** toscalix has joined #buildstream07:49
*** tiagogomes has quit IRC07:53
gitlab-br-botbuildstream: merge request (tristan/fix-cache-exclusivity->master: _scheduler/queues: Mark build and pull queue as requiring shared access to the CACHE) #775 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/77507:54
*** tiagogomes has joined #buildstream07:56
ikerskullman, that's the error I was talking about on Friday https://paste.gnome.org/peqxmp83b08:03
*** rdale has joined #buildstream08:05
ikerhttps://paste.gnome.org/ph3xnjkxk08:06
tiagogomes!779 conflicts a lot with !67108:08
tristantiagogomes, I expect it would08:08
tristantiagogomes, assuming 671 were the optimizations you had08:08
tiagogomes671 it had some cleanups as well08:09
tristantiagogomes, that said; 779 does not do any further optimizations on what is there08:09
tiagogomesLike having assemble returning the bytes were on my PR08:09
tristantiagogomes, sorry for duplicating that detail08:10
tiagogomesOr protecting setting the cache on success=True only08:10
tristanI do expect you will have to re-implement what it was you were doing08:10
tristantiagogomes, it's already done; I'm more concerned that this is happening at all08:11
tristanrather than who gets to be the one who fixes it08:11
toscalixtiagogomes: can you elaborate in the MR about the deduplicate files, so I can modify the paragraph you are referring to08:11
tiagogomesutils._get_dir_size(assembledir) is also wrong due the file deduplication stuff on the CAS08:11
tristanThis nonsense of get_artifact_cache().cache_size = foo, should *never* have landed08:11
tristantiagogomes, that is intentionally that way, I did not change it08:12
tristantiagogomes, if that is going to change, we'll discuss that08:12
tiagogomesyeah, that's too ugly (modifying the member directly)08:12
tristanIt completely breaks modularity, people are making life difficult for themselves by placing bandaid over bandaid, addressing only symptoms08:13
tristanThe first thing people should be thinking of is "How does this change make *sense*, how does this buy me clarity ?"08:13
tristanRegressions and bugs we can deal with08:13
tristanA slowly churning spaghetti will send the codebase into a deadend08:13
* tristan will writeup a mail on this subject, we need to do better, both in review and while coding08:14
tiagogomesand it is too early in the morning for spaghetti in UK08:14
* tlater[m] wonders what scone code looks like08:16
tristankind of like a cross between a cookie and a muffin I guess ?08:16
paulsher1oodmucky?08:19
tristantiagogomes, one of the more scary things I found was CasCache.commit() doing: self.cache_size = None08:20
tiagogomesyeah, and the tests were failing if you removed that08:21
tristanI know, your branch probably fixed that with proper mutator/accessor too, it's obvious08:21
tristanOf course, because you now had separate 'estimated_size' and 'cache_size', which do subtly different things; and setting it to None force triggers a re-calculation later08:21
tristanAnd of course, you have to read bits of code in 10 files to have any chance of figuring out what is going on08:21
tiagogomesyup08:22
tristanAt which point you wonder, what is intended here ?08:22
tristanThen you realize; nothing is intended08:22
tiagogomesI gave up of trying to reason about the code. Merged 'estimated_size' and 'cache_size' and cleaned the code so that pull and build have identical code paths when changing the cache size08:23
tristanAnother thing was elementjob.py and queue.py base class, sharing the 'cache_size' implicitly; removing that breaks tests because the self.cache_size = None, is later captured in the main process08:24
tristanExcept when you step back and think about it; it really is *only* the BuildQueue job which needs to report anything back, and all logic happens in the main process anyway08:24
tristanWell, CacheSizeJob also of course08:25
tristanSo there are two distinct points, where we anyway have a codepath for reporting these08:25
tristanI'm seeing a regression; the elements in the pipeline shown at session startup are no longer showing the elements with unresolved cache keys08:31
tristanFor instance, `bst track --deps all foo.bst`... shows at startup "Pipeline" ... <blank stare> ... "[....] Track START ..."08:31
* tristan has cleanup running, and: while sleep 1; do echo `cat ~/.cache/buildstream/artifacts/cache_size` ; done09:02
tristan... slooowly going down09:02
tiagogomesinsert here <you can not have file deduplication without slow pruning> meme09:07
*** abderrahim has quit IRC09:11
*** abderrahim has joined #buildstream09:12
*** phildawson has joined #buildstream09:14
tristanWell, it wasnt *that* bad this time around09:16
tristanAnd... no crashes or anything bad09:17
tristanThere were multiple cleanup jobs, harmless but annoying09:17
tristanThey will be fixed by the FIXME comment I added in the scheduler; it needs to ensure that there is only ever one CacheSizeJob pending at a time09:17
tiagogomesOr just get rid of the cache size job and dynamically update it all the time :)09:18
tristanOk well, I've tested this now and found the edge cases, I'll fix `bst build --track-all` in a separate MR09:18
tristantiagogomes, Yeah I'm not holding my breath09:19
tristantiagogomes, in fact, I'm not entirely sure which is more optimal, if we had ->commit() tell us the size by which the cache actually increased, we're basically trading stat() syscalls from one place to another09:20
tristanthen again, since we do them at ->commit time for the estimates anyway, it should be cheaper to have ->commit return the number of actual bytes added09:20
tristanThat is also tricky though, because of concurrent commit()09:20
tristanMultiple parallel commits do not *possibly* add the same file multiple times, they are *likely* to09:21
tiagogomestristan but the syscalls would be over the new files that were added only, and not the full artifact cache, so it scales much better09:21
tristanIt would still be imperfect, though; how do you ensure that separate calls to ArtifactCache->commit() do not report added size for the same deduplicated object ?09:22
tiagogomesMy MR handles that case09:22
tristanMaybe with the atomicity of renaming the files into place it becomes possible ? but there is still a race09:22
gitlab-br-botbuildstream: merge request (tristan/fix-cache-exclusivity-1.2->bst-1.2: Tristan/fix cache exclusivity 1.2) #779 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/77909:22
gitlab-br-botbuildstream: merge request (tristan/fix-cache-exclusivity->master: _scheduler/queues: Mark build and pull queue as requiring shared access to the CACHE) #775 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/77509:23
tiagogomesBasically try the rename, if file exists, don't add up the bytes09:23
tristanAh atomic rename can tell you if it did replace or not09:23
tristanRight, that makes sense indeed09:23
tiagogomesHold on a sec09:24
tiagogomesAh, I remember now09:25
tiagogomesWe don't rename to the file destination, but rather link, which gives a FileExistsError if already exists09:26
tiagogomesI think my code is safe09:26
tristanThere is no way that linking a file would not be an atomic syscall, however it *does* imply new constraints on the CAS machine's FS09:28
tiagogomesWhich constraints? That the FS must support hardlinks?09:29
tristanI.e. I suspect that with the current design, all file attributes are intended to be carried separately to the objects; while the current implementation (at a glance of `ls case/objects` reveals), this is not yet being done09:29
tristanSo identical executable and non executable files are stored separately09:29
tristantiagogomes, Yeah, I sort of expect this to be a portable implementation09:30
tristanat least the store, with file linking, it becomes non-portable; unless I'm missing something else which causes it to already be non-portable09:30
tristan(I know we already link at checkout/stage time, but I think this is a separate detail from the store; and I suspect jmac and juergbi are already thinking about portability with their virtual directory design)09:32
*** lachlan has joined #buildstream09:34
*** cs-shadow has joined #buildstream09:37
tiagogomesThe code looks portable, assuming the link does a copy on unsupported file systems09:38
gitlab-br-botbuildstream: merge request (mac_fixes->master: WIP: Resolve "os.sched_getaffinity() not supported on MacOSX Blocks #411") #726 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/72609:42
tiagogomesBut as it stands, it would be less safe is copy was used09:43
tristantiagogomes, the copy/link is *out* of the artifact cache as far as I know; if there is a possibility of copy from the CAS objects to the extract/ directory, that is a problem, it should go into a tmp directory and then get atomically renamed into place09:46
tristancopy/link into the build directories are already guaranteed to be unique09:46
tristanbut copy is *sloooow*09:46
tristanThat said, builddir != artifactdir (on separate volumes) in the user config should be well supported, but remains untested; it is anyway *sloow* if used09:47
tiagogomesThe CAS does some link operations, which might fallback to copy operations in some filesystems09:53
*** alatiera_ has joined #buildstream09:54
tristanIt's unclear to me at this time whether those can be considered safe or not09:54
tristan(when falling back to copy)09:54
tiagogomesThey probably aren't, as there could be two processes writing data to the same file simultaneously09:55
tristanright, that would mean that if it's happening at CAS -> extract/ time, it should be happening in CAS -> extract-tmp452355/ with a final os.rename into the intended extract directory (for copy safeness)09:56
tristanLike we do in most places actually09:57
tristanI think we were actually doing that with ostree09:57
gitlab-br-botbuildstream: merge request (juerg/cas-batch->master: WIP: _artifactcache/casserver.py: Implement BatchReadBlobs) #785 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/78509:57
tristanSo I'm surprised if we're not doing that with CAS09:57
tiagogomesThen there's also the issue of multiple bst instances running in parallel. So I don't think we can dodge having to use flock09:58
tristanYes yes, that is something we've been putting off09:59
tiagogomesThe code would have to be reworked a bit, because you can't os.rename a file created with tempfile.NamedTemporaryFile09:59
tristanThe temporary directories however should be unaffected by this detail09:59
tristanThe cleanup of CAS, not so much09:59
tristanTemp dirs we use in source caches and the like are created with support from the OS which guarantees us atomicity/uniqueness09:59
juergbitristan: CAS uses os.rename for extract atomicity10:01
tristantiagogomes, tempfile.NamedTemporaryFile appears to be used only in CAS, actually10:01
juergbitiagogomes: but os.link can be used10:01
tristanjuergbi, Yes I would be surprised if it did not10:01
juergbiah, need to read scrollback...10:01
tiagogomesjuergbi the point is, we can't be sure that os.link does an atomic hard link, and not just a plain copy on some filesystems10:02
juergbieh, no, that would be incorrect10:02
juergbiPOSIX guarantees it10:02
juergbitheoretically, the filesystem could not support hardlinks, but then this would completely fail10:02
juergbithat's not an issue on any supported platform, though, is it?10:02
juergbi(and I don't think we care about FAT filesystems on linux for buildstream cache or anything like that)10:02
tristanjuergbi, I think we're moving towards portability and such - and it should be our aim10:03
juergbiWindows has tons of other limitations. atomic rename of open files also doesn't exist, at least not always, etc10:04
* tlater[m] wonders if the Windows-Linux thing works with ext4 or fat10:04
tristanjuergbi, even though for *now* we're just doing puny remote execution only on windows, we will have win32 builds right ?10:04
tristanatomic rename has always existed on windows hasn't it ?10:04
Kinnison99% of systems running WSL will be running NTFS anyway, not FAT10:04
juergbiat some point this would be nice, yes10:04
juergbitristan: no, I think regular rename still doesn't guarantee that10:04
* tristan recalls using atomic rename for a self extracting installer / updater in the 90s, on windows10:04
tristanNot atomic ?10:05
tristanJust "probably atomic" ?10:05
*** lachlan has quit IRC10:05
juergbithere is no such thing...10:05
juergbithe whole point of atomic is that it avoids race conditions10:05
juergbihttps://lwn.net/Articles/682988/10:05
tristanSo *anyway*, dont we at least have atomic rename on NTFS ?10:06
KinnisonOne of the safest most atomic things is mkdir() sadly10:07
Kinnisonit even works on NFS :-D10:07
tristanI mean, disregarding WSL, which doesnt really interest me at all; I mean for building windows software on windows platforms10:07
juergbitristan: yes, afaik, NTFS itself supports it10:08
juergbiand it might be exposed in some APIs but I don't know otoh10:08
juergbibut Windows local builds will be very tricky in any case10:08
juergbi(I'm thinking of the bootstrap issue)10:08
juergbiso I try to focus on more realistic things for now10:09
tristanjuergbi, I don't expect we'll get bootstrapping done, but I expect we'll be able to build on vendor SDKs and such10:09
tristanUnless we can convince Microsoft to relinquish their C library and compiler, bootstrapping wont happen10:09
tristanBut the use case "I have an App, and I want to build it on windows, OSX and Linux, using BuildStream and a unified set of build metadata with some conditional statements", is certainly something to aim for10:10
juergbiyes, it would definitely be useful10:11
juergbiI don't see it as short term goal, though10:12
tristanI don't think it's that dramatically out of reach10:13
tristanThe question is only, if we code with the idea in mind that "We are linux only; a port to Windows will *have* to be a big deal that requires a lot of funding/resourcing" then we are much less likely to ever get it done10:14
tristanSandboxing and everything will be tricky on windows though, that is true on it's own; probably not much more than BSD, though10:14
tristanPathing (i.e. os.path.join()) is probably our biggest obstacle10:15
juergbiin general I agree that it's better to write portable code from the beginning. however, as long as we know it doesn't work yet, I don't think we should do lots of extra work for unsupported platforms10:15
tristanjuergbi, This relates back to the decision of whether to rely on os.link() working or not10:16
juergbiNTFS actually supports hardlinks..10:17
tristanI mean, at least that's how it came up - does it ?10:17
tristanThat is interesting10:17
juergbiand Python 3.2+ os.link() works on Windows10:17
*** lachlan has joined #buildstream10:21
tiagogomesjuergbi what does POSIX exactly guarantees? That the the syscall works and the FS driver just doesn't just do a copy?10:23
tristanWow, more regressions - ^C my build and terminate... the session ends with FAILURE, and shows 4 failures in the build queue10:25
tristanThose were not failures, they were terminated, there is code in app.py to ensure that doesnt happen10:25
* tristan thinks he should solicit qinusty to fix these logging regressions10:26
tiagogomesI've addressed your comments on https://gitlab.com/BuildStream/buildstream/merge_requests/678 btw10:30
tristantiagogomes, I don't understand test_use_of_protected_var_project_conf10:37
tristantiagogomes, How is 'sources' and 'elements' in the plugins section a protected variable ?10:37
tiagogomesI don't understand your last question. Sources and elements plugins can declare some specific variables on project.conf. The test is exercises that using a protected variable there is disallowed10:40
tristantiagogomes, How can source and element plugins introduce protected variables, though ?10:41
tiagogomesname: foo10:41
tiagogomeselements:10:41
tiagogomes  cmake:10:41
tiagogomes    variables:10:41
tiagogomes      max-jobs: 210:41
tiagogomesproject.conf example ^10:41
tristanAh, so you validate it there directly10:42
tristanI see10:42
tiagogomesI validate everywhere where variables are defined10:42
tristanexcept that in the test case, the protected var is 'sources' or 'elements'10:43
tristanhttps://gitlab.com/BuildStream/buildstream/merge_requests/678/diffs#36aa50e17b25fc1aabcf9e316de484ba4592aeae_411_42610:43
tristantiagogomes, I don't understand that10:43
tristanohhh no10:43
tristantiagogomes, I'm misreading the test case, now I get it10:43
tristantiagogomes, made only one comment, but the docs could also lose the newline between the ~~~~~~~~~~~~~~~ title and the beginning of the section, to be consistent with how we write docs everywhere10:51
tristantiagogomes, Also, I just filed https://gitlab.gnome.org/GNOME/gnome-build-meta/merge_requests/7610:51
tristanWe need to ensure that freedesktop-sdk is also updated before we introduce this in bst-1.210:52
tristanSo maybe we can merge master first, and keep track of downstreams before forcing an error on them10:52
tristanI think valentind already updated the llvm6 build to explicitly do -j2 for their purpose rather than hijack max-jobs10:53
*** lachlan has quit IRC10:55
tiagogomestristan, I prefer not_get_configuration_variables because it is identical to node_get_project_path10:59
tristantiagogomes, I find node_get_configuration_variables to be pretty loaded, I can't tell what it's doing; looks quite obscure11:01
tristanvariables = node_get(node, 'variables') && node_validate_variables(variables), looks very clear an readable11:01
juergbitiagogomes: POSIX guarantees that it creates a hardlink (or fails). hardlinks have different semantics than copies (content changes affect all links), so fallback to copy would be completely wrong11:03
tiagogomesI don't see a problem of having a more specialized node_get. You always have to have a separate function to validate it11:03
tiagogomesAnd by having specialized node_get, you can write self.some_member = node_get_some_specialized_method(…)11:04
tiagogomesjuergbi ack11:04
*** lachlan has joined #buildstream11:05
tristantiagogomes, Its okay to have 2 lines of code in a couple places instead of one; what is not okay is having to go all the way to _yaml.py and read the docs comment to understand the purpose of the function11:07
tristanThe latter, is at least more important than the former11:07
tristantiagogomes, the return value of this validation routine, is also only observed in one of the conditions where it is called11:07
*** bochecha has joined #buildstream11:11
tristantiagogomes, actually, I wonder if we should be checking it in so many places manually at all11:13
tristantiagogomes, Wouldn't it be better to just have a single check, after having composited the Element.__variables, which says:11:14
tristanIf the is a node provenance, then it was set in some configuration, and it's an error, raise the error with the discovered unexpected provenance11:14
tiagogomesYou loose provenance if you do that11:14
tristanWhat do you mean ?11:15
tristantiagogomes, If you have found a place where you lose the provenance, then *that* is a serious bug on it's own11:15
*** lachlan has quit IRC11:15
tiagogomesIf you composite everything and validate, how do you know that the offending variable is in project.conf, the plugin defaults or in some bst file11:15
tristantiagogomes, provenance is designed exactly such that we know where everything came from, after composition11:15
tristanprovenance carries it, that is exactly what Provenance is for11:16
tristantiagogomes, https://gitlab.com/BuildStream/buildstream/blob/master/tests/yaml/yaml.py#L167 tests the provenance pretty heavily, though; I think it works11:17
tristaneven with list prepend/append and all the whacky combinations, we always know where the winning config originally comes from in any composition11:18
tiagogomesBut max-jobs et friends will be always in the final composition right? How can I validate that they were not set beforehand11:20
*** lachlan has joined #buildstream11:21
tristantiagogomes, you can just check node_get_provenance()11:25
tristanit it returns None, or... maybe a dummy Provenance which is added by _yaml.node_composite(), then we're golden, we know it didnt come from yaml11:25
tristantiagogomes, if it has a provenance with a filename, then we know it's an error11:25
tristantiagogomes, right, if it's a provenance from `ensure_provenance()`, then it means we automatically added it in composition11:26
tristanI think None is impossible at that stage11:26
tristanso basically a provenance with filename == '', means it was never set in yaml11:27
tiagogomesIt might work then. But it is not better to validate early11:31
*** lachlan has quit IRC11:32
tristantiagogomes, commented on the issue, we should use that method11:35
tristanAnd it is early11:35
tristanReally, sprinkling the checks around pre-composition is paranoid, since it is already intended to work this way (and quite heavily tested)11:36
tristanI.e. it is early because; all of that composition will happen, even before preflight; before Element.configure(), it is still right at the start in the load process11:36
tiagogomesBut then you can have buildstream to work with an offending project.conf if the command doesn't consume any element. Like `workspace list`11:41
*** toscalix has quit IRC11:42
*** lachlan has joined #buildstream11:44
tristantiagogomes, it's the case either way, actually11:51
tristantiagogomes, there was however a request for something like `bst validate`, which would crawl the project and load everything11:51
tristangood for CI11:51
*** lachlan has quit IRC11:52
tristanjjardon, requested at some point, I suspect there is an issue somewhere11:52
*** solid_black has joined #buildstream11:53
*** solid_black has quit IRC11:56
*** solid_black has joined #buildstream11:56
cs-shadowWe are trying to do something similar and `bst show` does more or less what `bst validate` might do except the problem that we are hitting is that BuildStream currently has no way of recognizing what are bst elements given a project directory11:59
*** solid_black has quit IRC12:00
*** solid_black has joined #buildstream12:00
*** lachlan has joined #buildstream12:01
*** ikerperez has joined #buildstream12:03
*** solid_black has quit IRC12:03
*** solid_black has joined #buildstream12:04
tristantiagogomes, oh fwiw, of course the result of the previous conversation is that it is fine to rely on `os.link()`, I agree that that approach for having ArtifactCache.commit() return the added bytes is a good one12:04
*** iker has quit IRC12:04
tiagogomescs-shadow `cd elements && find -name "*bst"  -exec bst show {} \;` ?12:04
tiagogomesNot efficient though12:05
tristanyeah, bst show would just be very slow, though12:05
tristanAlso, I don't think it's enough12:05
tristanI think that `bst validate` would have to also try every possible project option branch12:05
tristanbecause of conditional statements12:05
cs-shadowtiagogomes: Yes, that works but it would be nice if could BuildStream could _find_ files. Also, `-name *.bst` assumes that all files will have bst extension while BuildStream itself doesn't enforce that12:06
tiagogomesThen there is no race condition when returning the size, and everything should™ be accurate12:06
tristanFor the moment though, as a poor man's solution; having an element which depends on everything and launching bst show is not bad12:06
tristancs-shadow, I think that the convention will have to stand for that, though12:07
tristancs-shadow, otherwise, there is no way for BuildStream to ensure what *it* found was a bst file12:07
tristancs-shadow, even if we had like, some kind of shebang or YAML encoded file type; we would probably want `bst validate` to tell you when you forgot to mention the encoded file type12:08
cs-shadowtristan: I was actually looking at it from slightly different perspective. If, for example, projects had a way of restricting possible extensions for bst elements, then we could safely ignore things that don't have that extension. At preset, this is something that has to be implemented outside of BuildStream12:10
cs-shadowthis is fine, but if BuildStream understood .bst extension, then we could also do other cool things like `bst build --all`12:10
*** lachlan has quit IRC12:11
tristancs-shadow, myeah I'm not sure what --all does, does it also build it for every architecture supported by the project, for instance ?12:12
tristanI guess it would, but better wait for remote execution for that12:12
cs-shadowtristan: hadn't thought much about that but i guess yes. The need for something like `build --all` arises when one is managing a large project and wants to ensure that at every commit, all elements are building.12:14
tristancs-shadow, yeah I understand how it can be interesting12:15
tiagogomesI don't see much case for that. If your project have multiple leaves, just do the build for each one or create a stack element including all12:15
cs-shadowtiagogomes: that approach isn't very scalable when your project has thousands of leaves and the structure of the graph keeps changing on a regular basis :)12:17
tiagogomesIs there a concrete example? Why would you've multiple leaves?12:18
cs-shadowyes, but I am not allowed to share it here. But, in general, one may need multiple leaves when you are using BuildStream to generate packages (of some sort) and not system images12:19
tristancs-shadow, I would say that at least; having a stack element that you use to "generate all packages" is still recommended12:21
gitlab-br-botbuildstream: merge request (richardmaw/subprocess-PWD->master: Ensure PWD is set in process environment) #782 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/78212:21
tristancs-shadow, however, it doesn't prevent someone to forget the convention of adding the new package to the main stack element for CI12:21
tristancs-shadow, so yeah; I do understand the use case :)12:21
gitlab-br-botbuildstream: merge request (mac_fixes->master: WIP: Implement compatibility fixes for MacOSX and WSL Blocks #411 and #412") #726 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/72612:25
gitlab-br-botbuildstream: merge request (mac_fixes->master: WIP: Implement compatibility fixes for MacOSX and WSL Blocks #411 and #412") #726 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/72612:25
* cs-shadow couldn't find existing issues `bst validate` so will create new issues12:26
gitlab-br-botbuildstream: merge request (mac_fixes->master: WIP: Implement compatibility fixes for MacOSX and WSL Blocks #411 and #412") #726 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/72612:26
gitlab-br-botbuildstream: merge request (richardmaw/subprocess-PWD->master: Ensure PWD is set in process environment) #782 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/78212:29
Nexusjuergbi: How would you propose we check for whether the host supports local b12:29
Nexusuilds12:29
Nexusrather than simple missing installed packages12:29
gitlab-br-botbuildstream: issue #638 ("RFE: Add `bst validate` command") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/63812:32
*** solid_black has quit IRC12:36
gitlab-br-botbuildstream: issue #640 ("RFE: Allow easy way of building all elements") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/64012:37
*** solid_black has joined #buildstream12:37
*** solid_black has quit IRC12:38
*** solid_black has joined #buildstream12:39
*** solid_black has quit IRC12:39
*** tristan has quit IRC12:49
jmacI'm getting a lot of "RemovedInPytest4Warning: MarkInfo objects are deprecated" warnings - is this something people have seen or solved in the past two weeks I've been away?12:55
*** tristan has joined #buildstream13:01
*** lachlan has joined #buildstream13:01
*** ChanServ sets mode: +o tristan13:02
juergbiNexus: this is a per-platform question. for Darwin/macOS it's clear as we know it won't work yet. for Linux/WSL, one option would be to test whether bwrap works or not (we already test user namespace but we don't test basic functionality yet)13:05
Kinnisonjmac: are you somehow a major version of pytest ahead?  I'm using 3.7.4 and that seems okay13:07
juergbiNexus: it could theoretically also be a specific check for WSL but checking whether bwrap and FUSE are not working/available is better, imo, as this also covers e.g. old Linux and it will also be the right thing for future WSL13:07
* Nexus is on 3.5.313:07
jmacLooks like pytest 3.8.0 here13:08
tristanKinnison, about to run out to the gym but, fwiw I've been hunting down the "why does pylint behave differently in different places" thing today in background13:08
Nexus3.6.413:08
Kinnisontristan: cool, hopefully you'll work it out.  Have fun at the gym13:09
tristanKinnison, I was recommended to check the versions of astroid, mccabe and isort (pylint deps) but mine are the same as in CI, yet my tests fail13:09
Kinnisonblerp, less cool :(13:09
tristanjust as an update, in case someone goes down that path, I tried pinning those, but fail13:09
*** leopi has quit IRC13:09
tristanyeah, maybe a specific version of pytest might change things, we are minimal bound 3.7 right now, and 3.8 brings in a ton of pytest-datafiles related warnings13:10
Kinnisonpresumably readying for the pytest4 API changes?13:11
*** toscalix has joined #buildstream13:16
gitlab-br-botbuildstream: merge request (richardmaw/test-config-fixes->master: Fix tests that attempt to access the home directory) #780 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/78013:18
tristanKinnison, I am getting recommended to try tox/nox for running tests; not sure if we should change to that harness instead of setup.py13:21
KinnisonI have used nose in the past, I've never tried tox/nox13:22
tristanAlso, of course everybody in #python loves venvs, but I don't like to impose that hassle on every developer :-S13:22
* SotK recommends tox whenever he gets the chance13:22
* Kinnison strongly recommends venvs for all python work13:22
Kinnisonversion madness is reduced dramatically13:23
SotK+113:23
persiatox -evenv is a good combination13:23
tristanKinnison, the problem I see with venvs though; is ultimately you should get BuildStream through your distro, integrated, with bash completions and man pages "just working", and no fuss and no typing13:27
tristanKinnison, if we go the route of venvs, we paint ourselves into the "python bubble" corner13:27
tristanSo I worry about that too13:27
Kinnisontristan: True, but working with distro devs to ensure things are good for the next release of a distro is different from people needing to run things on older/diverse distros13:28
tristanThen again, I'm trying to think of how we can bundle all our exact deps into a single package for distros, might be a middle ground13:28
KinnisonDebian, at least, won't like that13:28
persiaAt this point, most distro devs are proficient at finding combinations of versions that let them deliver python modules primarily tested with venvs to users as native packags.13:29
jmacPinning pytest to 3.7.0 in dev_requirements.txt removes the RemovedInPytest4 errors, but now I get a load of pylint errors13:29
tristanjmac, so does 3.7.any_version13:29
persiaAlso, yeah, distro folk tend not to like it when third-parties try to be fancy.  Something with pip and venv doesn't mess with other distro stuff, so is a safer recommendation to a user (from a distro support perspective).13:30
tristanjmac, what pytest version did you have *before* you got pylint errors, that is very interesting to know13:30
jmactristan: I was using 3.8.0, but I couldn't really tell if those pylint errors were there, as my output was swamped by the RemovedInPytest4 errors13:31
tristanjmac, ah yeah, they probably were13:31
* Kinnison has 3.7.4 and wasn't getting lint messages, but is mid an integration test run so will be a while before can report13:32
*** lachlan has quit IRC13:34
*** lachlan has joined #buildstream13:39
*** lachlan has quit IRC13:43
*** toscalix has quit IRC13:43
*** lachlan has joined #buildstream13:50
KinnisonOkay, so I've finished my integration run and I can confirm some odd lint errors13:55
KinnisonOr rather, some lint errors which I'm fairly sure I didn't get before13:55
Kinnisonthings like:13:55
Kinnison_____________________________________________________________________ [pylint] buildstream/plugin.py _____________________________________________________________________13:55
KinnisonR:755, 8: Consider using dict.get for getting values from a dict if a key is present or a default if not (consider-using-get)13:55
jmacKinnison: Yes, I'm getting that. You don't need an integration run to get it.13:57
KinnisonYeah, I just happened to be doing one :-)13:57
Kinnisonpylint 0.12.3 for me I think13:59
*** lachlan has quit IRC14:00
*** lachlan has joined #buildstream14:01
*** lachlan has quit IRC14:04
tiagogomesHmm, source plugins don't use variables14:05
*** lachlan has joined #buildstream14:25
gitlab-br-botbuildstream: merge request (tiagogomes/issue-287->master: Add validation of configuration variables) #678 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/67814:30
gitlab-br-botbuildstream: merge request (juerg/cas-batch->master: WIP: _artifactcache/casserver.py: Implement BatchReadBlobs) #785 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/78514:32
gitlab-br-botbuildstream: merge request (juerg/cas-batch->master: _artifactcache/casserver.py: Implement BatchReadBlobs) #785 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/78514:33
jmacLooks like pytest-pylint >= 0.12.2 causes the new pylint warnings. Running `pip3 install pytest-pylint==0.12.1` will get rid of them.14:33
* Kinnison guesses fixing the lints would be sensible over-all, but thanks for working that one out jmac14:34
*** lachlan has quit IRC14:35
jmacTook me 20 minutes to realise pylint and pytest-pylint were separate things too, grumble14:36
*** lachlan has joined #buildstream14:36
juergbifinn, jmac, mablanch: if/when one of you has some time for reviews: https://gitlab.com/BuildStream/buildstream/merge_requests/785 and https://gitlab.com/BuildStream/buildbox/merge_requests/314:36
jmacI will take a look14:40
jmacat !78514:40
finnwill have a quick look14:43
juergbita14:45
gitlab-br-botbuildstream: merge request (richardmaw/subprocess-PWD->master: Ensure PWD is set in process environment) #782 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/78214:47
jmacjuergbi: I'm guessing setting something in the ServerCapabilities object causes BatchReadBlobs to be called?14:51
juergbijmac: on the buildstream side, this is only server support so far. client support in buildstream is still pending14:52
juergbibut I've tested it with buildbox client support14:52
*** lachlan has quit IRC14:53
tiagogomeshow do I run only the pep8 checker?14:54
jmac./setup.py test --addopts "-m pep8"14:54
tiagogomesperfect, thanks14:55
jmacjuergbi: I'm just wondering what adding the BatchReadBlobs method does. Was there a default method in the superclass being called before?14:55
juergbijmac: no, it was completely missing, i.e., clients trying to use it would get an error so far14:56
jmacAha, thanks14:56
juergbithe auto-generated stub is there, of course, but no implementation14:56
*** lachlan has joined #buildstream14:57
gitlab-br-botbuildstream: merge request (tiagogomes/issue-287->master: Add validation of configuration variables) #678 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/67815:00
*** phildawson has quit IRC15:01
*** phildawson has joined #buildstream15:02
*** lachlan has quit IRC15:02
*** finn_ has joined #buildstream15:04
*** finn has quit IRC15:05
*** lachlan has joined #buildstream15:18
gitlab-br-botbuildstream: merge request (tiagogomes/issue-287->master: Add validation of configuration variables) #678 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/67815:27
NexusI came across an interesting issue, where i had a project.conf file in my `/user/` directory, which buildstream picked up as being a bst project, but then started failing tests like the `test_missing_project_conf` test15:32
Nexusis there some way we can limit this? also do we want to nested projects?15:33
* tlater[m] has noticed this before15:33
Nexusto have*15:33
tlater[m]I think project.conf is a little generic of a file name to recognize something as a buildstream project.15:33
tlater[m]Maybe we should check for a .buildstream directory instead?15:33
Nexusagreed15:34
tlater[m]Nexus: I don't see any problem with nested projects. It may be a really strange thing to do, but there's no immediate problem with it.15:35
Nexusit just seems really messy to me15:37
Nexusbut i can't really explain why15:37
*** lachlan has quit IRC15:40
gitlab-br-botbuildstream: merge request (juerg/cas-batch->master: _artifactcache/casserver.py: Implement BatchReadBlobs) #785 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/78515:42
jmacjuergbi: !785 makes sense to me15:42
juergbithanks15:42
gitlab-br-botbuildstream: merge request (juerg/cas-batch->master: _artifactcache/casserver.py: Implement BatchReadBlobs) #785 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/78515:43
*** finn_ is now known as finn15:46
finnjuergbi, can't spot anything bad on 78515:47
juergbifinn: have you removed the question or is gitlab acting up? BuildStream doesn't have an action cache, so we also don't advertise updates15:47
juergbithanks15:47
finnI removed a question, I was about to ask why cache_capabilities.action_cache_update_capabilities.update_enabled = False but then realised it was a silly question15:47
gitlab-br-botbuildstream: merge request (juerg/cas-batch->master: _artifactcache/casserver.py: Implement BatchReadBlobs) #785 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/78515:48
*** lachlan has joined #buildstream15:54
gitlab-br-botbuildstream: merge request (willsalmon/outOfSourecBuild->master: WIP: out of source builds) #776 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/77615:55
gitlab-br-botbuildstream: merge request (richardmaw/builddir-sockets->master: WIP: Fix: While caching build artifact: "Cannot extract [path to socket file] into staging-area. Unsupported type.") #783 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/78316:00
tristanskullman, Nexus; I think this was merged pre-maturely https://gitlab.com/BuildStream/buildstream/merge_requests/782#note_10015382216:01
tristanreally, we have to start doing better in review; this one isn't horrible but from my experience this weekend, we're letting too much nonsense slip in16:02
gitlab-br-botbuildstream: issue #632 ("CAS server: Implement BatchReadBlobs") changed state ("closed") https://gitlab.com/BuildStream/buildstream/issues/63216:07
gitlab-br-botbuildstream: merge request (juerg/cas-batch->master: _artifactcache/casserver.py: Implement BatchReadBlobs) #785 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/78516:07
*** lachlan has quit IRC16:08
tiagogomestristan I think only the main process should write to the cache_size file16:10
tristantiagogomes, I agree16:11
tristantiagogomes, in fact if you fix that; I would venture an assert utils._is_main_process() in ArtifactCache._write_cache_size()16:11
tristanassertions is mostly what _is_main_process() is for16:12
tiagogomesDoes that already written16:12
tristanI dont understand, is it a question ?16:13
tristanOr, you have a patch, and it already raises that assertion ?16:13
tiagogomessorry, is utils._is_main_process() a concrete thing now? Or needs to be implemented16:14
tiagogomesit exists!16:15
tristanyeah16:15
tristantiagogomes, I would prefer that it be used as an assertion rather than a check16:16
tristantiagogomes, that encourages code that knows what it's doing, and gets enforced16:16
tristanrather than hap-hazardly calling ArtifactCache._write_cache_size()16:16
tristanDoes ArtifactCache.set_cache_size() have a chance of being called in a task anyway ?16:17
tristanMaybe *that* is where the assertion should go, rather16:18
tristanWe usually call it in response to the completion of a task which calculates either a size to be added, or calculates the whole size16:18
tristanI guess it shouldnt really make sense to call it from a task16:18
tiagogomesyes, you calling it on the cleanup16:25
*** lachlan has joined #buildstream16:33
*** lachlan has quit IRC16:41
*** lachlan has joined #buildstream16:42
*** lachlan has quit IRC16:46
gitlab-br-botbuildstream: merge request (richardmaw/subprocess-PWD->master: WIP: Address post-merge review of Ensure PWD is set in process environment) #788 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/78816:46
*** lachlan has joined #buildstream17:06
*** lachlan has quit IRC17:14
*** leopi has joined #buildstream17:20
*** lachlan has joined #buildstream17:26
tristantiagogomes, ah right; it's not particularly harmful as it stands; but it could be nicer to send it back to the main process (which I think we do anyway) and set it once there17:28
tristanwill require a bit different handling of the cleanup loop, though17:28
*** lachlan has quit IRC18:20
*** lachlan has joined #buildstream18:31
gitlab-br-botbuildstream: issue #641 ("Error out if `%{max-jobs}` is substituted in `Element.node_subst_member()`") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/64119:00
*** lachlan has quit IRC19:19
*** cs-shadow has quit IRC21:25
*** tristan has quit IRC21:29
*** leopi has quit IRC21:52
*** leopi has joined #buildstream21:53
*** leopi has quit IRC21:57
*** leopi has joined #buildstream21:57
*** bochecha has quit IRC22:27
*** alatiera_ has quit IRC22:48
gitlab-br-botbuildstream: issue #642 ("Incorrect error when malformed project.conf is found") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/64223:01
*** leopi has quit IRC23:08

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