IRC logs for #buildstream for Tuesday, 2019-02-26

*** alatiera has quit IRC01:04
*** alatiera has joined #buildstream01:29
*** alatiera has quit IRC01:30
*** nimish has joined #buildstream02:13
*** nimish has quit IRC03:24
*** mohan43u has quit IRC04:22
*** mohan43u has joined #buildstream04:23
*** mohan43u has quit IRC04:42
*** mohan43u has joined #buildstream04:52
*** tristan has joined #buildstream06:47
*** bochecha has joined #buildstream06:53
juergbihi tristan, do you have any comments on !1182 ?07:48
*** mohan43u has quit IRC07:48
*** ChanServ sets mode: +o tristan07:49
*** mohan43u has joined #buildstream07:50
tristanThat looks pretty huge07:51
tristanjuergbi, So is this the same filter callback thing across the board ? it is hard to see what it is supposed to do looking at the utils.copy_files() functions07:54
juergbitristan: the first 12 commits are from the underlying MR !1181, no need to review that as part of !118207:56
tristanAh so it is supposed to be called on a path and returns true if it is supposed to be included07:56
juergbiyes, exactly07:57
juergbii.e., similar to the predicate in python filter()07:57
tristanI suppose since that is pretty straight forward, the same filter functions are usable regardless of which API is used (the utils stuff or abstract directory stuff)07:58
juergbithe actual code changes in this MR aren't that big, if the underlying MR is ignored07:58
juergbiexactly07:58
juergbisame interface for all07:58
juergbithere is a follow up MR !1183 that optimized the abstract directory implementations based on this MR, but that can be reviewed separately07:59
gitlab-br-botMR !1183: WIP: Directory.import_files() improvements https://gitlab.com/BuildStream/buildstream/merge_requests/118307:59
juergbiwith the whole MR series, I'm seeing about 40% reduction in staging time and 5% reduction in overall build time of freedesktop-sdk07:59
juergbiand with BuildBox / remote execution (pure CAS virtual staging), the staging performance improvement is much higher08:01
tristanjuergbi, How does this Directory.import_files() work, i.e. the directory is already an object and represents a location so I suppose the directory itself is the destination where files should be added ?08:15
juergbitristan: yes, 'self' is the destination08:15
tristanIn which case, what "Directory" do the files come from ?08:15
juergbithe first argument08:15
tristanAnd what is the path given to the filter function relative to ?08:15
tristanOh the pathspec08:15
*** toscalix has joined #buildstream08:16
juergbipath relative to that pathspec08:16
tristanSo in this change (compose element) https://gitlab.com/BuildStream/buildstream/merge_requests/1182/diffs?commit_id=0bddc2b7f2a923d1b5673429fcddb1ca70cc977c08:16
juergbii.e., identical to what would have been in the file list08:16
tristanWe are passing a filter callback which expects a path which is relative to vbasedir08:17
tristanAnd putting the files in installdir08:17
tristanjuergbi, It all makes sense, but I would like all the internal API to be more thoroughly documented08:17
juergbii.e., the split helpers?08:18
juergbiwill improve doc, thanks for the review08:18
tristanLike the signature of the filter callback (already commented in one place), and what the file path is, is it a string ? will it have a leading slash ?08:18
tristanThat kind of stuff08:18
juergbifilter_callback (callable): Optional filter callback. Called with the08:19
juergbi            relative path as argument for every file in the source directory.08:19
juergbi            The file is imported only if the callable returns True.08:19
juergbi            If no filter callback is specified, all files will be imported.08:19
juergbitristan: does this sound clear?08:19
tristanThat is much better yes :)08:19
tristanjuergbi, Anyway for the rest it all looks very straight forward, even the splits change seems pretty straight forward08:22
juergbiyes, used small commits for refactoring to make it easier for review08:22
tristanwhile returning a function with 'partial' is a funky little trick, its not black magic :)08:22
juergbi:)08:25
gitlab-br-botjuergbi opened MR !1185 (juerg/unlink->master: utils.py: safe_link(): Unlink only if target already exists) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/118508:50
*** phildawson has joined #buildstream09:21
*** raoul has joined #buildstream09:26
benschuberttristan: am I right if I say that the only variable we have to track in _update_state() is "__cache_key", meaning, if it didn't change, we don't need to update parents? Is there other variables to check for that?09:36
tristanbenschubert, Ummm no I don't think that is right09:42
tristanbenschubert, there are a few different keys, the weak and the strong key basically09:43
tristanlemme check what is __cache_key09:43
tristan:-S09:43
tristanelement.py has gone out of sync and no longer declares all instance variables in __init__() ?09:44
tristan__strict_cache_key and __weak_cache_key are missing and undocumented09:44
juergbi        self.__weak_cache_key = None            # Our cached weak cache key09:46
juergbi        self.__strict_cache_key = None          # Our cached cache key for strict builds09:46
juergbiit's all there09:46
juergbi(I think lint would complain otherwise)09:46
tristanAh you are right09:47
tristanLooking at how cache keys are resolved, only __cache_key and __weak_cache_key serve as input for reverse dependency cache key calculation09:47
tristanbenschubert, ^^09:48
benschubertso checking if both have changed would allow me to know if reverse deps needs to be re-calculated correct?09:48
tristanactually no :(09:48
tristan__strict_cache_key is also used09:49
benschubertbut __cache_key will change is __strict_cache_key changes no?09:49
tristanthat appears to be true in strict mode09:51
tristanand otherwise it would seem to be ignored09:51
juergbiI think __cache_key alone would actually be sufficient09:53
juergbiif the others are set but __cache_key not yet, it should be ok to defer reverse dependency update09:53
juergbibut it's tricky...09:53
benschubertI will see if that breaks any test09:56
benschubertthanks!09:56
tristanbenschubert, As I suspected, I think you are only recording reverse build-only dependencies09:57
benschubertAlso tristan, could you explain to me why "If I am not mistaken, I believe that when an element is pulled from the remote and BuildStream is running in non-strict mode, the reverse dependencies need to also be updated." ? I'm not sure I get why this should be the case :)09:57
juergbibenschubert: btw: not sure whether you've missed my small comment https://gitlab.com/BuildStream/buildstream/merge_requests/1070#note_14466003409:57
benschuberttristan: if I remember well, reverse runtime dependencies keys are not affected by the cache key no?09:58
juergbitristan, benschubert: in non-strict mode, while pull is still pending __cache_key won't be set yet, so I don't think this needs any special handling for non-strict mode09:59
tristanbenschubert, regarding only recording reverse build dependencies: This will fail to update the reverse dependency states when (A) We discover a cache key for an element, (B) The element is a runtime-only dependency of another element, (C) That other element is a build dependency of another element (final element misses the update, but still *requires* the original runtime-only dependency)09:59
benschubertjuergbi: I saw it, thanks! I will however very likely remove the it :)09:59
tristanbenschubert, build dependencies != Scope.BUILD09:59
benschuberttristan: ah, so I need to get all with Scope == Build, I see10:00
juergbiI agree, runtime dependencies are relevant as well10:00
*** jonathanmaw has joined #buildstream10:02
*** alatiera has joined #buildstream10:05
benschuberttristan: however, no tests were exercising this :/10:07
benschubertjuergbi: " in non-strict mode, while pull is still pending __cache_key won't be set yet, so I don't think this needs any special handling for non-strict mode" so after pulling, we should update all reverse deps again correct?10:08
juergbiyes, however, __cache_key won't be set before anyway, so it shouldn't be 'again'10:08
benschubertright!10:09
benschubertwe do it anyways before we run, not doing it might be more complex10:10
tristanbenschubert, yeah we're missing some coverage in that area10:13
tristannot the easiest test to write but probably not *too* hard :-/10:13
benschuberttristan: I think it would be worth writing an issue listing all tests we are missing around this, we would then be able to bridge the gaps more easily and direct people on tests10:14
tristanbenschubert, well maybe - I mean that kind of issue has a tendency of never being closable10:17
tristanon the other hand if one were to do a concerted effort to find out what tests we should have and are missing, then might as well also write the tests10:17
benschubertright10:17
* tristan personally likes wikis for this kind of long term efforts10:20
tristanif they end up being long term that is10:20
tristanor roadmapping of efforts in general, wiki pages with links to issues10:21
*** tristan has quit IRC10:27
*** tristan has joined #buildstream10:32
*** lachlan has joined #buildstream10:32
*** toscalix has quit IRC10:34
*** nimish has joined #buildstream10:36
juergbismall staging performance improvement ready for review: !118510:49
gitlab-br-botMR !1185: utils.py: safe_link(): Unlink only if target already exists https://gitlab.com/BuildStream/buildstream/merge_requests/118510:49
gitlab-br-botjuergbi merged MR !1185 (juerg/unlink->master: utils.py: safe_link(): Unlink only if target already exists) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/118511:01
*** lachlan has quit IRC11:28
*** nimish has quit IRC11:36
*** nimish has joined #buildstream11:36
*** lachlan has joined #buildstream11:37
*** raoul_ has joined #buildstream12:01
*** raoul has quit IRC12:02
gitlab-br-botmarge-bot123 merged MR !1181 (juerg/directory->master: Virtual directory improvements) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/118112:06
gitlab-br-botjuergbi opened (was WIP) MR !1182 (juerg/import-filter->master: Replace file lists with filter callback for file import) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/118212:07
*** nimish has quit IRC12:14
benschuberttristan: , juergbi I'm struggling to understand why build and pull jobs need the CACHE resource, but push jobs don't. Is it documented somewhere?12:32
*** bochecha has quit IRC12:44
*** nimish has joined #buildstream12:53
juergbibenschubert: I wasn't really involved in that aspect, however, my guess would be it's for cache write access12:59
juergbipush only needs read access13:00
benschubertjuergbi: why do we need to lock write access? Knowing that the lock is only between all jobs and the cache cleaning13:04
juergbito avoid issues between write and clean?13:05
juergbiwe can hopefully simplify this anyway when moving to object-based expiration (with partial CAS support in place)13:06
juergbitlater[m] or tristan probably know more about the CACHE scheduler resource13:07
tlater[m]benschubert: cache cleanup is not atomic in any way. If we write when we're cleaning, the cleanup functions might remove things as they are being added.13:12
jonathanmawtristan: do I understand correctly from https://gitlab.com/BuildStream/buildstream/merge_requests/1070#note_145007411 that Element._update_state was created _because_ there was a lot of confusion around external callers controlling the element state, and so any optimisations in this area should not reintroduce this confusion?13:14
*** nimish has quit IRC13:14
tlater[m]Unless someone has changed how the cache works since I last looked at it, of course :)13:16
benschuberttlater[m]: ah because the reference is what is done last, so we have dangling stuff, correct?13:18
tlater[m]Yep, exactly.13:18
*** raoul_ has quit IRC13:21
gitlab-br-botmartinblanchard opened MR !1186 (mablanch/799-RE-optional-TLS->master: Optional TLS support for remote-execution storage service) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/118613:29
benschuberttlater[m]: ok! that explains also why we would get problems with the cache getting full and the cache cleaning only kicking in afterwards x')13:31
tlater[m]Yep13:31
tlater[m]We really need to get someone to walk through every location an out of memory error can occur and make those invoke cleanup instead. But that almost feels impossible :|13:32
tlater[m]Our solution so far was the headroom thingie but it's clearly not appropriate for all use cases.13:33
juergbitlater[m]: casd is likely the best approach to solve this13:34
juergbiall writes will be handled by that, assuming we switch to casd at all13:34
tlater[m]juergbi: Yep, that does sound better.13:36
tlater[m]Anything that can guarantee cache atomicity would be great.13:37
juergbitpollard: are you in process or planning to review !1182? if yes, I'll wait for that. otherwise, I'll merge it as it has already been reviewed by others13:38
gitlab-br-botMR !1182: Replace file lists with filter callback for file import https://gitlab.com/BuildStream/buildstream/merge_requests/118213:38
tpollardjuergbi: planning to take a look asap13:39
juergbiok, thanks13:39
coldtomis anyone from bst-external around to take a look at https://gitlab.com/BuildStream/bst-external/merge_requests/70 ?13:43
jonathanmawlachlan: I've commented on your benchmarks MR13:53
*** raoul_ has joined #buildstream13:53
jonathanmawit looks like there's been a deliberate decision for that command to succeed even if it fails to write the output to file13:54
jonathanmawsince you're catching the exceptions and calling logging.error()13:55
gitlab-br-bottpollard approved MR !1182 (juerg/import-filter->master: Replace file lists with filter callback for file import) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/118214:00
gitlab-br-botjuergbi merged MR !1182 (juerg/import-filter->master: Replace file lists with filter callback for file import) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/118214:01
gitlab-br-botjuergbi opened (was WIP) MR !1183 (juerg/directory-import->master: Directory.import_files() improvements) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/118314:02
lachlanThanks jonathanmaw14:23
lachlanjonathanmaw: Have responded14:40
jjardonlaurence: is there a MR to update the website about what versions of best we recommend? I remember I have to update the README15:14
KinnisonDoes anyone know what could cause the WSL runner to get stuck like this: https://gitlab.com/BuildStream/buildstream/-/jobs/167863148 ?15:18
gitlab-br-botdanielsilverstone-ct opened (was WIP) MR !1164 (danielsilverstone-ct/gc-play->master: _stream.py, _project.py: Manage GC during pipeline load) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/116415:19
*** lachlan has quit IRC15:28
laurencejjardon, not yet, still on my todo, sorry15:29
*** lachlan has joined #buildstream15:44
*** jonathanmaw has quit IRC18:02
*** raoul_ has quit IRC18:22
*** lachlan has quit IRC18:36
*** slaf has quit IRC19:18
*** slaf has joined #buildstream19:21
*** alatiera has quit IRC20:13
*** sebastian has quit IRC21:10
*** nimish has joined #buildstream21:16
*** sebastian has joined #buildstream21:21
*** alatiera has joined #buildstream21:43
*** tristan has quit IRC22:39
* SotK finally gets round to sending https://gitlab.com/BuildStream/bst-external/merge_requests/7123:09
*** alatiera has quit IRC23:32

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