IRC logs for #buildstream for Wednesday, 2018-03-07

*** mcatanzaro has quit IRC05:13
*** Prince781 has joined #buildstream05:37
*** tristan has joined #buildstream06:40
*** Prince781 has quit IRC07:12
*** Prince781 has joined #buildstream07:25
*** noisecell has joined #buildstream08:05
gitlab-br-botbuildstream: issue #283 ("New sequence ID in messages cannot work") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/28308:06
*** Prince781 has quit IRC08:32
gitlab-br-botbuildstream: merge request (sam/document-profiling-and-benchmarks->master: HACKING.rst: Mention benchmarking and profiling tools) #267 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/26709:08
gitlab-br-botbuildstream: merge request (sam/document-profiling-and-benchmarks->master: HACKING.rst: Mention benchmarking and profiling tools) #267 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/26709:15
*** sstriker has quit IRC09:16
gitlab-br-botbuildstream: issue #206 ("HACKING.rst: Document recommended strategies for profiling") changed state ("closed") https://gitlab.com/BuildStream/buildstream/issues/20609:16
*** valentind has joined #buildstream09:23
tristanjuergbi, well, HACKING.rst is already merged; but it's pretty annoying that it documents useful external profiling stuff and completely ignores the profiling helpers we have :-/09:30
juergbitristan: didn't you mention once that you don't want to document bst env. variables at all, not even in HACKING.rst?09:31
tristanI mentioned that env vars are internal, I dont recall saying that I dont want it in HACKING.rst, that sounds like the right internal place09:32
tristanI may have, I really dont recall09:32
juergbimaybe I misremember09:32
tristanEither we should make it a thing, or we should remove _profile.py entirely09:32
tristanbut a unilateral decision should be made and the codebase should be in sync with itself09:33
juergbii haven't been involved in bst profiling yet, so i don't have an opinion on it09:33
juergbissssam[m] wrote it and jmac reviewed it, so i assume it matches what they actually used09:34
tristanIt is *much* more important that we dont have double standards and multiple stories for a "thing", than the actual decision of what the "thing" is.09:34
tristanthat goes for pretty much any "thing"09:34
juergbicertainly less critical for internal things, though09:34
tristanOne area where we are dirty now, is how we denote privateness, partly it's my fault for leaving a mess behind after privatizing some things pre 1.0 release (Context and Project specifically)09:35
juergbie.g., if both approaches have their use cases but we want to recommend only one way (as that's what should cover most use cases), then it could make sense to only/mainly document that one way but keep support for both09:36
tristanI tried cProfile by itself without internal hooks, but that makes it impossible to only observe, say; the time it takes to sniff out cyclic dependencies in the loaded project09:37
*** noisecell has quit IRC09:38
tristanjuergbi, you have a point, *if* they are both useful09:38
juergbiyes, as i said, i can't speak from experience with regards to bst profiling, so i don't have anything to add here09:39
tristanBut I strongly disagree about importance of internalness being much lower when it comes to consistency and dual standard09:39
juergbiit's better to have something documented for profiling than nothing at all09:40
tristanI.e., I would like to use some of the features in python to make stronger API surfaceses, eliminate possibility of monkey patching etc09:40
juergbiif this is not the recommended approach after all, we'll update/amend it09:40
tristanBut to be clear about policy: I would *block* a patch which adds this stuff without being applied unilaterally across the codebase09:40
juergbisure, that makes sense. that's a different case09:41
tristanjuergbi, just want to make sure we're on the same page for that part :)09:41
juergbiyes, i definitely want internal consistency in such aspects as well09:42
juergbibut tooling recommendation is a bit different, imo09:42
juergbibefore the MR we didn't have anything documented09:42
juergbiand i think cProfile was very useful for ssssam[m] for the realpath issue, e.g.09:43
juergbiso i think it's good to have that in HACKING.rst09:43
tristanFrankly, we use cProfile in _profile.py09:43
tristanAnd, I dont see other C projects carrying documentation baggage informing developers that they can run valgrind09:44
tristanI sort of do feel like, this is something about python, not BuildStream09:44
tristanIn this case I dont care so much though; it's more of a nitpick I guess; it's not costing much other than making the HACKING.rst bigger09:45
juergbiwe also have instruction to run ./setup.py test even though that's a normal setuptools test setup09:46
tristanIt would be though, IMO, more appropriate to document BST_PROFILE and recommend improving on that, with a very short mention or link to external cProfile documentation09:46
juergbii certainly agree that BST_PROFILE should be documented there09:46
juergbiand if external cProfile documentation covers all aspects of what we have in HACKING.rst, sure, just link to it09:47
juergbihowever, if there is no suitable link that really covers the topic in a comparable way, better to keep it09:47
juergbibtw: it does link to the python.org documentation09:48
juergbithe link to the buildstream benchmark repo is useful09:48
juergbiand python.org doesn't mention pyflame or flamegraph.pl09:49
tristanYeah I dont object to keeping it there if it's useful; myself conversely: I was annoyed with using an external tool *only*, without internal code support and MARK() benchmarking style; it felt useless09:49
tristanSam must have had the opposite perspective09:49
juergbitristan: btw: jmac added BST_PROFILE documentation to HACKING.rst in https://gitlab.com/BuildStream/buildstream/commit/7babcb0c76ed99e26a3a9b87056f222906c69e1809:58
juergbiand you told him to remove it09:58
juergbiyou can't expect us to guess that you've changed your mind ;)09:59
tristanjuergbi, I recall making a very strong statement that ms timing should not be exposed as an env var, as that is API09:59
tristanwhere is my comment ?10:00
juergbihttps://gitlab.com/BuildStream/buildstream/merge_requests/275#note_5925997210:00
juergbithis was in response to the above commit10:00
tristanjuergbi, It can be that I was distracted and mixing topics, though... I gladly take blame for that...10:00
* tristan reads10:00
tristan"Can we turn this into a CLI option, and avoid documenting BST_PROFILE internal hidden debuging env var that is not guaranteed to be API stable in any way ?"10:01
tristanjuergbi, Ok well, misunderstanding and mix of topics happened there10:01
tristanHACKING.rst is not API, it's core-developer docs10:01
juergbiok, that makes sense10:02
tristanmicrosecond timing needs to be configurable by the user, and external benchmarking harnesses10:02
juergbimaybe you didn't check which file jmac added the documentation to10:02
juergbiso we should probably resurrect that documentation bit10:02
tristanYes, hey... I'm not angry man !10:02
tristanhaha10:02
tristanBut yes I will be happy to A.) Take blame, I hoard it... B.) apply the BST_PROFILE part of his patch10:03
tristanthe MS timing since then has been removed and is now proper API10:03
juergbi(i don't care about blame, just wanted to clarify what we should and should not document where)10:03
tristan:)10:03
tristanYes, so core-internal things in HACKING.rst is perfect; it is my mistake to have made that comment in that way, though10:05
tristanI frankly did not read the patch *at all*, I saw the title; and I knew a correction had to be made10:05
juergbino problem. that makes sense10:06
* tristan is having a hard time reproducing the source interrogation messages which are appearing in, say: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/jobs/12216/raw10:07
tristan(if one searches, cat-file, for instance)10:07
tristanI have a clean patch which A.) Adds Context._silent_messages() ... this does the same as a Context._timed_activity(... silent_nested=True ...) only without printing a message10:08
tristanAnd B.) Uses `with context._silent_messages()` to call `Source.get_consistency()` in source.py:_update_state()10:09
tristanjuergbi, I think I'm just going to push it; it's not worth spending time trying to reproduce, and only started doing it because it's damn annoyingly noisy in the logs and thought hey "this'll only take me 10 minutes"10:10
* tristan knows it's there in master too, just dont know what the special sauce is to reproduce10:11
juergbitrack during build?10:11
tristanyes10:11
juergbior even just fetch during build10:11
tristanI've been doing that10:11
tristanI've been deleting local repos, `build --track-all`, deleting local artifacts selectively10:12
juergbihm, odd10:12
juergbii'm fine with just pushing it10:12
tristanwhile playing in _context.py, I spotted https://gitlab.com/BuildStream/buildstream/blob/master/buildstream/_context.py#L3310:13
tristanheh10:13
juergbiyes, i should have caught the sequence id issue10:15
jmacOops!10:15
juergbii did notice the lock, however, i was expecting it to be merely unnecessary. i didn't realize that it relies on shared memory children10:16
juergbii.e., i assumed sequence_ids are only created in the main process10:16
tristannod, yeah timed activities actually *mostly* only happen in the child process, outer activities starting directly in job.py10:19
tristanSome happen in the main process (total session time)10:19
juergbibtw: the fork() model is again causing some issues with grpc10:20
juergbiit's not ideal that we use it10:20
juergbicomplicates some things10:20
juergbibreaks libraries10:20
juergbihowever, it's obviously more convenient in other aspects10:20
tristanIt's a difficult tradeoff10:21
tristanRight now, the worst a third party plugin can do is crash10:21
tristanand buildstream can report an error nicely for that10:21
tristan(maybe worse since we still run some plugin things in the main process)10:21
juergbiwith python i'd hope the issue of in-process plugins wouldn't be that big10:22
juergbi(using native libraries anything can happen, of course)10:22
tristanWell, not only that; but with a threading model; the worst a badly written plugin can do, is lockup the whole build10:23
juergbii'd probably favor putting all main logic in the main process (event loop), only offloading computationally expensive operations to threads or (fork+exec) subprocesses10:23
jmacI can fix sequence_ids, that should be easy10:23
*** dominic has joined #buildstream10:23
jmacBut if _timed_activity is being created by different processes won't _pop/_push_message_depth break? Or is there a context per process?10:24
*** noisecell has joined #buildstream10:24
tristanjmac, copy-on-write; so the main Context is copied, and at child task time the message depth never contains a silence marker10:24
tristanjmac, it's basically process local state10:25
jmacright, in that case sequence_id just needs to be an object member rather than a class variable10:26
tristanjuergbi, I feel that we may want to schedule everything a plugin does, we can significantly improve startup time with parallelization of `Source.get_consistency()`10:27
*** zalupik has quit IRC10:27
tristanso that... might happen10:27
juergbiit's a big change, we have to be very careful10:27
*** zalupik has joined #buildstream10:27
juergbibut it would be nice to move towards that10:27
tristanjuergbi, frankly, I would not be opposed to dropping fork()/exec() in favor of threading, it would also be a big change but I think it's an API compatible one10:28
juergbiwe have to think about thread-safety of all API-exposed structures10:29
tristanStill, not sure it's worth it; there are advantages and disadvantages both ways10:29
juergbiand internal ones for our code10:29
tristanRight now, buildstream core devs have to know about this stuff, and we have to care about not using third party stuff which initializes threads in the main processes10:29
tristanso it's nice that the onus is on us and less on plugin authors10:29
juergbiit's actually not so simple10:29
juergbiimport ostree alone creates a thread...10:30
juergbiwhich happens in the main process10:30
tristanholy shit10:30
juergbiit's actually not ostree's fault. it's glib/gi10:30
tristansigh10:31
juergbior maybe it was triggered by ostree source plugin consistency check, have to recheck10:32
juergbihowever, it was definitely happening in the main process10:33
*** aday has joined #buildstream10:39
*** valentind has quit IRC10:56
gitlab-br-botbuildstream: merge request (issue-243_dpkg_import_source_plugin->master: WIP: Created DPKG Source plugin for Issue #10) #305 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/30511:01
*** milloni has joined #buildstream11:16
nexusHi guys, i'm looking into https://gitlab.com/BuildStream/buildstream/issues/89 and after discussing this issue with tlater, the question was raised about whether or not an element specific subdir should be created if `build-root` is explicitly defined. Any thoughts on this matter?11:16
tristannexus, Nobody sets that. I would first change the default behavior and document the concerns as a separate issue11:21
tristanthe question arises as to whether we need strict policy around these variables, that is true11:22
tristanbut I dont think that question has to block changing the defaults; probably this will never pose any problem anyway.11:22
juergbii actually do set it in an element here but it's a very special case11:24
tristanHeh11:24
juergbii set it to a subdir of %{install-root} as i want to convert a source in an artifact11:24
juergbigcc: so that i can use it in multiple elements11:25
tristaninteresting11:25
juergbishould likely be handled differently. maybe includes11:25
tristanjuergbi, maybe we could look at that as... possibly a workaround for not having cached build trees ?11:26
juergbi(i also noticed that it's actually faster to stage an artifact than to extract the tarball every time but that's a separate issue)11:26
tristanOh !11:26
tristanjuergbi, you are bad.11:26
juergbihm, i don't see how cached build trees will help sharing sources across elements / element variants11:26
tristanhaha11:26
tristanI'm thinking, you want to reuse an already built gcc build tree; I'm not completely familiar with why you are doing though11:27
tristanso you know, assumptions...11:27
juergbiah, no, i have a gcc-source.bst11:27
juergbithat doesn't have any commands11:27
juergbivariables:11:28
juergbi  build-root: '%{install-root}/src/gcc'11:28
juergbiand then i use that as dependency in the real gcc elements11:28
tristanAh11:28
tristanit's entirely read-only, this is a very special case11:28
juergbithis avoids duplicating url/ref and patches11:28
tristanyou are not as bad as I suspected, juergbi :D11:28
juergbiyes, should definitely not worry upstream about it11:28
juergbihehe11:28
tristanstaging an artifact will always be faster than staging a source11:29
juergbii need to work around missing features until i can solve it properly11:29
tristaneven if tar sources do a pre-extraction to speed up staging11:29
juergbias gcc is built 5 times or so for full bootstrapping, it actually helps a lot11:29
tristanat the cost of disk space11:29
tristanYou cannot hard-link sources into the read-write build tree :)11:29
juergbiindeed but i assume extracting is the main bottleneck, not copying11:30
juergbisingle-threaded xz. other cores twiddling thumbs11:30
tristanThat could be an optimization; if you want to prefer CPU over disk space11:30
juergbiif we start caching build trees, we should actually also cache sources in the artifact cache11:30
juergbias build trees are normally anyway superset of those11:31
juergbiso it would be free11:31
tristanyeah that is a more complex endeavor11:31
juergbiyes, just a point on a long list of possible optimizations ;)11:31
tristanit's something that is going to happen though :)11:32
tristanfew things depend on it, so... for the crazy incremental build proposals, we'll have to take care to break hardlinks11:32
juergbiyes, for mtime11:32
juergbi(btw: i did a minimal resurrection of include support last night and i like it)11:33
tristanalso to avoid corrupting artifacts11:33
tristanjuergbi, nice :)11:33
tristanI threw it away mostly because it wasnt being used11:33
juergbii can prepare a MR at some point but not sure whether we should have a discussion about this beforehand11:34
juergbii can also first gain some experience with it and open a MR later11:34
*** dominic has quit IRC11:35
*** dominic has joined #buildstream11:35
juergbii noticed that the simple code-less build element plugins are almost redundant with include support11:35
*** ernestask has joined #buildstream11:35
*** xjuan has joined #buildstream11:39
tristanmeh, I dont really mind the boilerplate11:40
gitlab-br-botbuildstream: merge request (jmac/restore-brackets-282->master: status.py: Restore brackets to time in job display area) #308 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/30811:52
gitlab-br-botbuildstream: merge request (jmac/restore-brackets-282->master: WIP: status.py: Restore brackets to time in job display area) #308 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/30811:57
gitlab-br-botbuildstream: issue #280 ("Messages not silenced when interrogating source caches") changed state ("closed") https://gitlab.com/BuildStream/buildstream/issues/28011:58
gitlab-br-botbuildstream: merge request (jmac/restore-brackets-282->master: WIP: status.py: Restore brackets to time in job display area) #308 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/30812:02
tlaterjuergbi: About the pylint defaults, it turns out that pylint follows entirely different defaults than the ones it recommends when you use `--generate-rcfile`12:09
tlaterThe usual defaults are also not always compatible with pep812:09
tlaterWhich is a major pain :|12:09
* tlater thinks there is no real way around having default options set in the rcfile12:10
* tristan just lost like 30 minutes because he had defined a new function with the same name at same (class) scope12:11
tristanwould have been great if a linter told me about it :)12:11
* tlater did some js coding last weekend, without a linter for once12:12
juergbitlater: too bad. might it still make sense to clearly mark what we changed?12:12
juergbitlater: also, i assume running --generate-rcfile as part of the linting process is not sensible?12:13
tlaterjuergbi: Yeah, that would make sense, just in case we want to update at some point12:13
tlaterWe could try that, it would be quite hacky12:13
tlaterHmm12:13
juergbi(and appending our changes)12:13
tlaterjennis: Think you'd like to try ^^^12:13
tlaterIt would make sense12:13
jennishang on12:13
* tlater just hopes appending overwrites12:13
juergbiindeed12:14
jennisyou want to see what we've changed in our configuration file compared to the one generated by `--generate-rcfile`?12:14
tlaterjuergbi: The only problem with this approach is that this only really works in CI12:14
tlaterWhat would really annoy me is that this appending approach certainly wouldn't work with flycheck, so emacs wouldn't lint for me anymore :|12:15
juergbiwe could have a script also for non-CI usage12:15
juergbimaybe setup.py build could generate it?12:15
tlaterThe problem is IDEs that integrate with pylint, not CLI usage12:15
juergbiin which case IDEs would also pick it up12:15
juergbii don't want to complicate things too much, of course. i just don't like adding so many lines to the repo where most are not buildstream-specific12:15
gitlab-br-botbuildstream: merge request (jmac/restore-brackets-282->master: status.py: Restore brackets to time in job display area) #308 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/30812:15
tlaterYeah, I do understand. It's a bit unfortunate that pylint does things this way12:16
juergbior would it be possible to split it into two files?12:16
juergbione completely pristine --generate-rcfile12:16
tlaterAs long as we document this in Hacking.rst I think generating with setup.py is fine12:16
juergbiand the other one are our overrides?12:16
juergbicompletely pristine import is much less problematic12:17
juergbi(and some kind of include, no idea whether that's supported)12:17
gitlab-br-botbuildstream: merge request (239-use-pylint-for-linting->master: Resolve "Use pylint for linting") #283 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/28312:17
tlaterAh, that might be a point, I'll check the doc12:17
tlaterNever tried that12:17
juergbigeneration with setup.py would certainly be fine with me if that works12:17
tlaterIt only uses a specific file unfortunately, no mention of include directives12:19
tlaterSo generation seems like the only option12:19
tristanjmac, is there a reason you dont develop directly in the upstream repo ?12:21
tristanjmac, just in case you didnt know, you are allowed to push branches directly, it's much less annoying to keep your branches in sync (for you)12:22
jmacNo good reason, I just started developing before I got permissions on the main repo12:23
tristanwell, up to you :)12:24
jmacI'll push future branches straight to BuildStream12:24
jmacLooks like I could replace that lock with multiprocessing.lock but it's not clear from them whether that lock works with processes created outside multiprocessing12:25
tristaneek12:26
tlaterThat sounds pretty ugly12:26
* tristan not very trustful of python code trying to magically do stuff like that12:26
jmacMe neither really12:27
tlaterOof12:27
tlaterjuergbi: Another issue: pylint apparently takes system defaults12:27
tristanjmac, you might go with a dual token12:27
tlaterSo if we use --generate-rcfile, we cannot guarantee that someone using our setup.py will get the same config file12:27
tlaterBecause they might have a config in ~/.pylintrc12:28
tristanjmac, i.e. pass a Job sequence to the Job, and inside the Job there are activity sequences12:28
* tlater apparently had one when generating12:28
juergbiok, that actually explains why --generate-rcfile produces something different than the built-in defaults12:28
jmacI'm thinking of replacing it with a random number or something based on pid+sequence, would be a lot simpler12:28
juergbitlater: as the former uses the system (or user) defaults12:28
tristanCould we trust pid ?12:29
juergbipid could be reused12:29
tlaterUnfortunately pylint *also* uses system/user defaults by default12:29
jmacYes it can12:29
tristanjmac, explicit Job number is better than pid indeed12:29
jmacSame problem with random numbers12:29
tristan<tristan> jmac, i.e. pass a Job sequence to the Job, and inside the Job there are activity sequences12:30
juergbitlater: in that case i think you should first check where exactly the defaults came from. are these really upstream defaults or some distro-specific thing12:31
tlaterYeah, I should definitely take a closer look12:31
juergbiand then we could do a straight import of these defaults directly from the source (with appropriate comment) and use setup.py to combine it with our overrides12:32
juergbiif that makes sense to you12:32
juergbii was hoping it wouldn't get too complicated but we need to avoid including random stuff12:32
tlaterYep, definitely makes sense12:32
tlaterShould probably not be too much of a hassle to use either12:33
gitlab-br-botbuildstream: merge request (jmac/restore-brackets-282->master: status.py: Restore brackets to time in job display area) #308 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/30812:36
tristanjmac, another thought12:41
tristaneh, not sure it's entirely relevant to what you're doing12:42
tristanjmac, just a thought; is that there is a desire to collate build logs stored in artifacts with the build session logs which caused those builds12:43
tristanalthough there is currently nothing about a "session" that is stored in an artifact12:43
tristanor rather, there is nothing persisted and controlled by buildstream for this connecting of the dots after the fact12:44
tristanmay be related to these job sequences (it may be interesting to know that "This was job number 42 in session 582953"12:44
tristan)12:44
*** jennis has quit IRC12:52
tlaterSo, if I understand our current incremental workspace builds correctly, then we bind-mount any workspaces into the build environment12:53
tlaterOh, this only relates to dependencies of workspaced elements, of course12:54
tristanyou mean the naming of %{build-root} ?12:56
tlatertristan: I was starting to ask something about our incremental builds issue12:57
tlaterBut I realized that I just didn't understand the problem properly12:58
* tlater reads the issue again12:58
tristanI dont think naming of %{build-root} is important for workspace incremental builds12:58
tlaterNo, it's completely separate from that :) It's about this issue: https://gitlab.com/BuildStream/buildstream/issues/21512:59
tlaterSomehow I distilled that into "we need to keep track of changes in the workspace"12:59
tlaterBut that's of course entirely wrong13:00
tristanah right13:01
*** jennis has joined #buildstream13:06
*** sstriker has joined #buildstream13:08
*** tristan has quit IRC13:09
*** tristan has joined #buildstream13:15
*** nexus is now known as Nexus13:41
jmactristan: The idea was simply to tie together log lines relating to a particular job, since there didn't appear to be any other unique identifier that would tie the start/finish times with other log messages in the same jbo13:42
jmacjob13:42
jmacIt may be possible to do this by always printing the log file name13:43
*** Nexus has quit IRC13:55
*** nexus has joined #buildstream13:56
adds68juergbi, we have options defined in the project.conf, but i'm not sure how to define how an element should only be build if the architecture is only x86?14:04
adds68jmac, specifically this element here: https://gitlab.com/freedesktop-sdk/freedesktop-sdk/blob/adamjones/vaapi-intel/sdk/elements/all.bst#L1814:04
juergbiadds68: have you seen the target_arch (?) conditional in project.conf?14:05
jmacWas that meant to be for juergbi?14:05
juergbii assume so14:05
adds68sorry jmac! :O14:06
jmacJust checking :)14:06
juergbiit may be a bit inconvenient with lists, though, let me check14:06
adds68juergbi, so do i simply define that under variables and buildstream will only build if the arch is correct?14:07
adds68juergbi, could i put that inside the element itself?14:07
juergbiyou'll have to put it into the all.bst stack14:07
juergbias you want to influence `depends`14:07
juergbithe issue is that the conditional only directly work with dicts, iirc14:09
juergbiwhile depends: is a list14:09
*** nexus has quit IRC14:09
*** nexus has joined #buildstream14:10
*** jennis has quit IRC14:11
*** jennis has joined #buildstream14:11
*** nexus has quit IRC14:11
*** nexus has joined #buildstream14:11
juergbiadds68: something like this should work: https://pastebin.com/dMKZ0u9S14:11
juergbihowever, it duplicates the common elements14:11
juergbinot sure whether we can use list composition in a single element file14:12
adds68juergbi, ah ok, i understand now14:12
adds68Hm that isn't pretty is it14:12
juergbiadds68: you could give this a try: https://pastebin.com/39hMzZtt14:12
juergbinot sure whether this works in a single file, though14:13
juergbii think there is an issue in yaml with duplicate dict entries14:13
adds68juergbi, it's a shame you can't define an elements architecture14:14
juergbiwell, it would be odd to have an unconditional dependency on an element that may not exist, imo14:14
juergbiyou could put a conditional in the element itself and just have 'kind: manual' without sources or commands for the non-x86 case14:15
*** nexus has quit IRC14:16
*** Nexus has joined #buildstream14:16
juergbiwhich would result in an empty artifact. but i think this would be a bit odd14:16
*** Nexus has quit IRC14:16
*** Nexus has joined #buildstream14:16
tlaterjuergbi: So, I misunderstood this issue a bit originally, I think: https://gitlab.com/BuildStream/buildstream/issues/21514:17
tlaterAre you suggesting we check the differences between old and new dependency artifacts, based on whether they were built before or after the latest successful build of a workspaced element?14:19
tlaterEw, that's a mouthful14:19
juergbii'm not suggesting anything time-based (if you mean time-based with before/after)14:21
tlaterI do mean that. So, if I understand the problem correctly...14:22
tlaterIf I have an A that depends on B14:22
juergbiit's also possible to roll back dependencies to older versions, which may already be in the cache14:22
juergbithat wouldn't matter14:22
tlaterRight, I think I'm misunderstanding the problem.14:23
juergbilet's first talk about the simple case, no failed builds14:23
juergbiis that already clear or not?14:23
tristanjmac, you will want finer grained grouping then just "this job", for benchmarking at least14:23
tlaterI thought it was, starting to doubt it x)14:24
tlaterMind trying to repeat that case?14:24
tristanjmac, still, handing out job ids at dispatch time is not a bad idea; my previous comments was just that; this might be useful for other things as well14:25
juergbiok, for an incremental build after a successful build, you need to calculate the difference between all staged artifacts of the previous successful build and the to-be-staged artifacts of the planned incremental builds14:25
juergbiall files that differ need to get updated mtime (and thus also can't be hardlinks)14:25
jmactristan: Yep. I'm having a think about it, but will probably end up doing that14:26
tlaterAh, this was where I got confused with time-based things14:26
juergbiyes, so the updated mtime should be the current time (i.e., start time of incremental build)14:26
juergbiwe don't care about when the dependencies were built14:26
tlaterWell, we need to know which artifacts we staged during the previous build14:27
juergbiwe need this because make and other traditional build systems unfortunately use time-based dependency checks, not checksum-based14:27
juergbiyes, that we can read out from the previous build artifact metadata14:27
tlaterOh, that's already in there?14:27
* tlater wasn't aware14:27
juergbii think so14:28
juergbithere is a dependencies list in the metadata14:28
tlaterWell, that makes a whole lot more sense now.14:28
tlaterNow, assuming we have a few failed builds in-between, what changes?14:28
juergbiok, so that's where it gets tricky14:29
juergbiwe still need to update the mtime of all modified files since the last successful build as we don't know which parts got rebuilt and which parts didn't14:29
juergbi(modified files in dependencies)14:29
juergbihowever, we also need to update the mtime of all files that were different in the dependencies of any of the failed build attempts since the last successful build14:30
juergbias those parts that got rebuilt during the failed build have to be rebuilt again14:30
tlaterAh, ok, I think I understand14:31
juergbias we don't have artifacts for failed builds (at least not right now), we don't have corresponding metadata either14:31
juergbiso we have to carry a list ourselves14:31
juergbi(which i'm still not really happy)14:31
tlaterWell, at least I think I understand your solution now14:32
juergbia possible alternative would be to start creating some form of artifact for failed builds as well (we may want that anyway to save and inspect build trees)14:32
juergbiin which case we'd only have to list the refs for the failed builds instead of actual files14:32
juergbibut that would be a broader change14:33
tlaterI think for now the quick-and-dirty file lists should be alright14:33
tlaterThis can be cleaned up when we get to saving failed builds14:33
juergbiyes, i think this is acceptable14:34
juergbii don't think tristan has expressed an opinion about it yet, though14:34
tlaterWell, file lists don't seem like so much work that potentially having to throw them away would matter much... I can wait on that opinion for a bit14:37
tlatertyvm in either case juergbi, sorry if I was a bit slow, been going in and out of this issue over the past weeks...14:38
juergbino problem. it's not a trivial issue, especially when you consider failed builds14:39
*** Nexus has quit IRC14:39
juergbii just hope the suggested approach really works ;)14:39
*** Nexus has joined #buildstream14:39
*** noisecell has quit IRC14:41
jmactristan: Yes, we want the timings for individual actitivites in jobs, but I think we can figure these out without the sequence number, if a couple of assumptions hold true14:42
jmacDepends whether there's any multiprocess/threading inside a job or if they all run in one thread14:43
tristanjmac, sure, in any case we can add features to the logs for benchmark support; making it configurable makes that non-controversial14:43
*** jennis has quit IRC14:44
tristanjmac, we dont do any deep nested processing that *we* can control (i.e. launching make doesnt count, and benchmarking into that also doesnt make sense)14:44
tristanbut anyway; pid is not something to use...14:45
jmacOh, that's fine, an individual activity can run make -j8, that's fine14:45
jmacSo I'll just raise an MR to remove sequence ID for now, if we need anything else I'll do that separately14:46
tristanSure, I'm quite sure that adding a sequence id for jobs, and eventually another for tasks inside jobs (possibly printed as [$job.$task]) makes a while lot of sense for collating times in a benchmarking log interpretation script14:47
tristans/while/whole14:48
tristanbut I'm fine with removing the broken thing first, so as not to let it live there too long14:48
tristanjmac, in *fact*, the approach of adding sequences for jobs, and maybe machine readable names for "kinds of activities" is preferable14:50
tristanIn a similar way that we have machine readable strings in our exceptions14:51
tristanBecause really, the text that says "Starting to do foo"14:51
tristanIs UI14:51
tristanjmac, it would suck if we had to never change UI... just cause benchmarks14:51
*** mcatanzaro has joined #buildstream14:52
*** jennis has joined #buildstream14:56
*** noisecell has joined #buildstream14:57
jmacI get your point. I only really need to parse the MessageType, though - the message text will be recorded, but no meaning is extracted from it14:58
jmacI'm a bit concerned that having to assign an identifier for all activity messages will restrict other developers14:59
jmacIt would be good if we ever want to internationalise, though14:59
gitlab-br-botbuildstream: merge request (jmac/remove-sequence-id->master: WIP: Remove sequence ID.) #309 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/30915:02
gitlab-br-botbuildstream: merge request (issue-89_unique_build_dirs->master: WIP: Made modification to generate unique subdirs for built elements) #310 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/31015:08
*** noisecell has quit IRC15:15
gitlab-br-botbuildstream: merge request (issue-89_unique_build_dirs->master: WIP: Made modification to generate unique subdirs for built elements) #310 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/31015:23
gitlab-br-botbuildstream: merge request (jmac/remove-sequence-id->master: WIP: Remove sequence ID.) #309 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/30915:34
Nexusjuergbi: as i was saying, regarding buildstream15:35
Nexushttps://gitlab.com/BuildStream/buildstream/tree/issue-89_unique_build_dirs15:35
Nexusyay pasting ftw15:35
Nexusin what way do you think this would break functionality?15:35
juergbie.g., plugins using node_subst* would still get the original %{build-root} value15:36
juergbiso it wouldn't match the real %{build-root}15:37
Nexusisn't that just an issue of things using multiple methods for getting the same value? Why are they doing it in different ways?15:37
juergbinode_subst* is used for plugin-specific configuration15:38
juergbii.e., the values in `config:`15:38
Nexuscan't it use get_variable?15:38
juergbino, get_variable is to get the value of a specific variable15:38
juergbiget_variable() doesn't return config: nodes15:39
Nexusthen the only way to change that value would be to change it in every instance15:39
juergbione option could be to modify __variables15:39
juergbiinstead of intercepting the queries15:40
*** noisecell has joined #buildstream15:41
Nexusjuergbi: ok so if i intercepted it at the point where __variables is defined I.E. the __init__ of Variables, that would change all instances?15:45
juergbithere is only one instance of Variables per element, so yes, all method that would use it would get the modified value15:46
juergbiit should not be done in the Variables class definition, though. keep it in Element15:46
juergbias Variables is too low level15:46
Nexusok15:46
NexusAlthough that seems a lot more hacky15:47
Nexusas i'd be having to change a value in a list15:48
juergbifeel free to suggest better options15:49
juergbione possibility could be to pre-define a variable that would always contain the element name15:50
juergbie.g. %{element}15:50
juergbiand then we could define build-root as /buildstream/build/%{element} or similar15:50
Nexuswell it seems like the "nicest" way would be to change _variables.py, but i don't know what that would effect15:51
juergbi_variables.py doesn't know anything about elements, builds etc. right now. so i don't think that's a good place to change15:51
Nexusi see, so we'd need to introduce elements to it in order to do it there15:52
juergbii think that approach would only make sense if we anyway want such a variable15:53
*** noisecell has quit IRC15:53
Nexusself.__variables.variables['build-root'] = os.path.join(self.__variables.variables['build-root'], self.normal_name)15:53
juergbibtw: i think you need to modify build-root between extract_variables and the creation of Variables()15:53
juergbiotherwise other variables that use %{build-root} will still get resolved with the old value15:54
Nexusjuergbi: https://gitlab.com/BuildStream/buildstream/merge_requests/310/diffs16:00
Nexusdoes this seem viable to you?16:01
juergbino, as i mentioned, it needs to happen before the construction of Variables() as that's where variables are resolved16:02
Nexussorry, that doesn't make sense to me16:02
juergbiwhy not?16:03
juergbithe Variables() initializer resolves variables in other variables16:03
juergbibuild-root already needs to be correct at that point16:03
Nexusyou're saying i need to modify the args?16:04
juergbimodify the local 'variables' variable16:05
juergbibefore it's passed to Variables()16:05
juergbialternatively, put the code in __extract_variables()16:06
Nexusbut it's a node, how do i modify that?16:07
juergbiyou can use it as a dict16:09
tlaterjuergbi: Regarding the pylintrc, it turns out simply appending our config won't work. We'd need some solution using patch, I think, but I'm not sure including a diff file in the main repo is very useful16:11
tlaterEspecially considering this wouldn't help us if the defaults change16:12
juergbitlater: we could theoretically override the options on the pylint command line but i suspect that wouldn't be nice either16:13
tlaterYeah, that would be an absolutely massive invocation16:13
*** Prince781 has joined #buildstream16:14
juergbii guess all that is left is to clearly document which part of the config file are copied defaults (and mention where the defaults are from) and which part is buildstream-specific16:14
tlaterjuergbi: Do you think a nice git commit log would be enough to document that?16:15
juergbii think we should put it in the file16:15
juergbieasier to find and i don't see a reason why not16:15
tlaterI'm a bit afraid people would overlook the comments/not keep them up-to-date16:15
*** noisecell has joined #buildstream16:15
juergbiand putting this only in the commit message would improve the situation?16:16
tlaterWell, it would show the path from pristine - today16:16
juergbiah, you mean, first import pristine, then adapt in separate commits?16:16
tlaterYep16:16
juergbithat could indeed be an option16:16
juergbiyes, i think that should be fine. just make sure to mention the source of the pristine import16:17
tlaterYeah, that seems best considering the limitations16:18
* tlater finds pylint's configuration interface very lacking, unfortunately16:18
juergbipylint obviously doesn't check the quality of configuration interfaces ;)16:23
juergbiassuming pylint devs are using pylint as well16:24
gitlab-br-botbuildstream: merge request (issue-89_unique_build_dirs->master: WIP: Made modification to generate unique subdirs for built elements) #310 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/31016:25
Nexusjuergbi: do you know of a nicer way of doing that? ^16:25
Nexusi'll remove the whitespace16:26
juergbican't you just use variables['build-root'] = os.path.join...?16:27
Nexusapparently so, the docs i was using for chainmaps was terrible, it didn't say youcould do that...16:29
Nexusthere we go16:32
gitlab-br-botbuildstream: merge request (issue-89_unique_build_dirs->master: WIP: Made modification to generate unique subdirs for built elements) #310 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/31016:32
Nexusmy 3 line commit16:32
juergbiok, this looks fine to me, assuming it works as expected with variable resolution. however, besides testing, i probably want to run this by tristan16:35
Nexuswell it works for generating the directory, i'm not sure about anything else16:37
juergbiCI seems to disagree16:40
gitlab-br-botbuildstream: merge request (239-use-pylint-for-linting->master: Resolve "Use pylint for linting") #283 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/28317:09
*** Prince781 has quit IRC17:10
*** dominic has quit IRC18:21
*** toscalix has joined #buildstream18:29
*** valentind has joined #buildstream18:37
gitlab-br-botbuildstream: issue #284 ("Source distribution cannot include symlinks") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/28418:43
*** tiagogomes has quit IRC18:56
*** toscalix has quit IRC19:59
*** tristan has quit IRC20:40
*** ernestask has quit IRC20:43
*** mcatanzaro has quit IRC21:01
*** mcatanzaro has joined #buildstream21:02
*** mcatanzaro has quit IRC21:06
*** mcatanzaro has joined #buildstream21:06
*** xjuan has quit IRC22:02
*** valentind has quit IRC22:12
*** aday has quit IRC22:47
*** aday has joined #buildstream22:52
*** aday has quit IRC23:43

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