IRC logs for #buildstream for Wednesday, 2020-05-27

*** tristan has quit IRC00:56
*** mohan43u has joined #buildstream05:42
*** benschubert has joined #buildstream07:24
*** jude has joined #buildstream07:27
*** coldtom4 has joined #buildstream08:12
*** benschubert has quit IRC08:12
*** coldtom has quit IRC08:12
*** milloni has quit IRC08:12
*** tpreston has quit IRC08:12
*** walterve[m][m] has quit IRC08:12
*** jswagner has quit IRC08:12
*** jward has quit IRC08:12
*** dbuch[m] has quit IRC08:12
*** segfault1[m] has quit IRC08:12
*** Trevio[m] has quit IRC08:12
*** krichter[m] has quit IRC08:12
*** Demos[m] has quit IRC08:12
*** tchaik[m] has quit IRC08:12
*** WSalmon has quit IRC08:12
*** jjardon has quit IRC08:12
*** pro[m] has quit IRC08:12
*** cgm[m] has quit IRC08:12
*** awacheux[m] has quit IRC08:12
*** skullone[m] has quit IRC08:12
*** DineshBhattarai[m] has quit IRC08:12
*** asingh_[m] has quit IRC08:12
*** jjardon[m] has quit IRC08:12
*** SamThursfield[m] has quit IRC08:12
*** kailueke[m] has quit IRC08:12
*** mattiasb has quit IRC08:12
*** dylan-m has quit IRC08:12
*** reuben640[m] has quit IRC08:12
*** theawless[m] has quit IRC08:12
*** connorshea[m] has quit IRC08:12
*** abderrahim[m] has quit IRC08:12
*** m_22[m] has quit IRC08:12
*** albfan[m] has quit IRC08:12
*** tlater[m] has quit IRC08:12
*** ironfoot has quit IRC08:12
*** benbrown has quit IRC08:12
*** lantw44 has quit IRC08:12
*** Trevinho has quit IRC08:12
*** jjardon_ has joined #buildstream08:12
*** benschubert has joined #buildstream08:13
*** benbrown has joined #buildstream08:14
*** ironfoot has joined #buildstream08:14
*** milloni has joined #buildstream08:15
*** tpreston has joined #buildstream08:19
*** jward has joined #buildstream08:19
*** WSalmon has joined #buildstream08:19
*** jswagner has joined #buildstream08:28
*** tpollard has joined #buildstream08:37
*** santi has joined #buildstream08:43
*** cphang has joined #buildstream08:57
juergbiWSalmon: you aren't working on a test for https://gitlab.com/BuildStream/buildstream/-/merge_requests/1926, right? I can probably handle that today08:57
*** lantw44 has joined #buildstream09:09
*** Trevinho has joined #buildstream09:09
*** SotK has joined #buildstream09:29
*** tristan has joined #buildstream09:46
*** Trevio[m] has joined #buildstream09:50
*** albfan[m] has joined #buildstream10:50
*** awacheux[m] has joined #buildstream11:00
*** coldtom4 is now known as coldtom11:28
*** reuben640[m] has joined #buildstream11:31
*** walterve[m][m] has joined #buildstream11:37
*** ironfoot is now known as ironfoot_11:38
*** ironfoot_ is now known as ironfoot11:38
*** ChanServ sets mode: +o ironfoot11:38
*** kailueke[m] has joined #buildstream11:39
*** ChanServ sets mode: +o tristan11:41
tristanAnd we're back !!!11:41
tristanHmmmm, I have a sneaking suspicion that our tox testing stuff does not preemptively assert what version of buildbox is installed11:42
tristanI think the last merge requires a new one, as I'm seeing local test failures which don't happen in CI11:42
*** jjardon_ is now known as jjardon11:44
*** ChanServ sets mode: +o jjardon11:45
tristanHmmm, how do I run this test... I'm trying:11:49
tristantox -e py37-plugins -- src/buildstream/testing/_sourcetests/track.py::test_track_include_junction[ostree-project.refs]11:49
tristanI get: pytest: error: unrecognized arguments: --plugins11:49
*** DineshBhattarai[m] has joined #buildstream11:58
*** albfan[m] has quit IRC12:07
*** Trevio[m] has quit IRC12:07
*** doras has quit IRC12:07
*** awacheux[m] has quit IRC12:07
*** kailueke[m] has quit IRC12:07
*** walterve[m][m] has quit IRC12:08
*** reuben640[m] has quit IRC12:08
*** DineshBhattarai[m] has quit IRC12:08
*** abderrahim[m] has joined #buildstream12:09
*** walterve[m][m] has joined #buildstream12:32
*** kailueke[m] has joined #buildstream12:32
*** reuben640[m] has joined #buildstream12:32
*** mattiasb has joined #buildstream12:32
*** Trevio[m] has joined #buildstream12:32
*** m_22[m] has joined #buildstream12:32
*** dbuch[m] has joined #buildstream12:32
*** tchaik[m] has joined #buildstream12:32
*** jjardon[m] has joined #buildstream12:32
*** dylan-m has joined #buildstream12:32
*** DineshBhattarai[m] has joined #buildstream12:32
*** tlater[m] has joined #buildstream12:32
*** segfault1[m] has joined #buildstream12:32
*** SamThursfield[m] has joined #buildstream12:32
*** connorshea[m] has joined #buildstream12:32
*** Demos[m] has joined #buildstream12:32
*** krichter[m] has joined #buildstream12:32
*** asingh_[m] has joined #buildstream12:32
*** albfan[m] has joined #buildstream12:32
*** theawless[m] has joined #buildstream12:32
*** doras has joined #buildstream12:32
*** awacheux[m] has joined #buildstream12:32
*** pro[m] has joined #buildstream12:32
*** skullone[m] has joined #buildstream12:32
*** cgm[m] has joined #buildstream12:32
tristangah, rabbit holes can be deep12:44
tristanSo to address https://gitlab.com/BuildStream/buildstream/-/merge_requests/1935#note_349965798, I need to keep track of all loaded projects so I can NULL out their element/source factories, as our data model doesn't naturally fall out of scope (unfortunately, but that's a bigger problem to address)12:46
tristanBut the artifact tests use a sneaky internal Project() object, which of course gets killed when cli.run() completes due to them all getting cleaned up12:47
tristanSo, maybe just revert to the old code path, live with an additional table of PluginSource objects and document why this is12:48
* tristan could alternatively *try* to turn that test into an end-to-end test but, that looks a bit too onerous12:51
tristanbenschubert, can you confirm if you are okay with the new version, with my 2 comments starting with: https://gitlab.com/BuildStream/buildstream/-/merge_requests/1935#note_349965798 ?13:06
benschuberttristan: answered, thanks!13:08
*** thinkl33t has quit IRC13:10
tristanYeah, we wouldnt need to refactor the test if projects naturally fell out of scope13:15
tristanI could potentially change it so that the loader keeps track of the loaded projects instead, thus leaving the test's project alone13:15
tristanbut it's all a mess13:15
tristanLet's leave it this way I guess13:15
tristanHonestly I think both are desirable: Data model properly falling out of scope, tests never using internals13:16
* tristan thinks there was agreement in the past that we still wanted some "unit tests" which test internals, though13:17
benschubertyep true. I agree with the falling out of scope part, I remember at least 20Go of data we managed to shove off like that :D13:19
benschubertthough that would happen around the end so no change of such gains13:19
*** tristan has quit IRC13:20
juergbibenschubert: I've finally added a regression test to https://gitlab.com/BuildStream/buildstream/-/merge_requests/1926 (dynamic build plan)13:37
*** tristan has joined #buildstream13:37
benschubertjuergbi: cheers, thanks!13:39
benschubertIs someone familiar with the 'public' data (the dynamic part specifically): do we store it in the element key? Do we do this with resolved variables or without?13:40
juergbibenschubert: yes, it's used in cache key calculation13:44
juergbiI would expect variables to be resolved before that13:44
juergbiotherwise variable changes that only affect public data wouldn't trigger cache key changes13:45
juergbiah, the dynamic part, hm13:46
benschubertjuergbi: they are not (or I broke them). and I am not sure: integration commands, for example, do we need to resolve before? that would seem weird to me? or am I missing something?13:46
juergbiwhy would resolving integration commands be weird?13:46
benschubertbasically #1310 is due to integration commands not having their variables resolved13:47
benschubert(ahead of time)13:47
benschubertbecause I'm not sure we should break cache keys if we change how the element is layed out? That would break the children ones but why the first one? (I'm happy if it does, will just change where I fix the bug)13:48
juergbiI'm not quite sure I understand what you mean. however, public data is stored in the artifact. whenever it changes, the cache key needs to change as well13:51
benschubertok, then I'll make sure we do expand the variables before storing it (which is not the case currently, or I might have broken it with the change there)13:51
juergbimaybe verify with tristan13:52
benschubertdo you remember by any change where we set it?13:52
benschuberttristan: ^ ? :D13:52
juergbisee __public and __dynamic_public in Element13:52
benschubertmmh imght have misunderstoo dthem13:53
benschubertthought __dynamic_public was only loaded from artifacts13:53
benschubertI'll have a second look, thanks!13:53
juergbiif you haven't already, maybe write a regression test first and verify which commit broke it13:53
*** ChanServ sets mode: +o tristan13:54
tristanNot clear on the question13:54
benschubertjuergbi: good point13:54
tristanWe do consider it in the cache key, we used to be more selective about this13:54
tristanWe stopped being selective and started always considering it at the moment that public data became mutable by elements13:55
benschuberttristan: is public data (and the dynamic one) to be stored in the artifact and cache key as resolved or unresolved13:55
juergbichecking again, we only use static/user-specified public data for cache key calculation13:55
tristanRight that is a bit more tricky, I'm not entirely clear, however I suspect it does not make a difference13:55
juergbiI assume for dynamic public data it's the plugin's unique_key responsibility13:55
tristanAha13:55
tristanjuergbi, I think the assumption is that considering user specified public data makes the input entirely deterministic13:56
juergbiyes, it makes sense13:57
tristancausing any side effects of propagated public data to be deterministic as well13:57
juergbiwondering about the variable resolution aspect13:57
tristanAnd we still only consider element configuration (at the Plugin.unique_key() level)13:57
juergbimaybe we actually can resolve it after loading public data from the artifact13:57
benschubertjuergbi: that is a simple one line change that seems to pass tests indeed13:57
tristanI'm not sure, I have a feeling we must resolve it if we don't already, and consider the resolved input in the cache key13:58
tristanWe explicitly do _not_ consider variables in cache keys13:58
tristanTo reduce false cache misses13:58
juergbiyes13:58
juergbiso we definitely need to consider the expanded integration commands somewhere in the cache key13:58
juergbiquestion is whether this should be done in the element it's defined in or where it's used13:59
juergbithe former is probably easier to get it right (expanding the variables early)13:59
juergbiespecially considering we implicitly expand variables in all other places now13:59
juergbihowever, it might not be optimal with regards to minimal rebuilds14:00
tristanAgree that that would be easier to get right, yes14:00
juergbinot sure how feasible it is to resolve variables in public data late14:00
juergbiI also don't know whether the rebuild aspect makes a big difference in practice with how variables are actually used14:01
tristanWhen asking the question "Is an element different because it's public data changes when given different variables", I'm tempted to say yes14:01
tristanAs the public data is input for reverse dependencies14:01
juergbiyes, having reverse dependencies consider it in their cache keys seems very odd14:02
juergbiand maybe public data is extracted from artifacts and used outside BuildStream itself14:02
juergbithat wouldn't be possible if the variables weren't already resolved14:02
tristanWell, it could indeed be more useful if people were to do that14:03
tristanI'm not sure it makes sense to open up that surface14:03
tristanI.e. if people wanted public data, it could trivially be exported into an artifact by a plugin14:03
benschubert> https://gitlab.com/BuildStream/buildstream/-/blob/master/src/buildstream/element.py#L81214:03
benschubertagreed, so 'just' resolving `data` variables on that line and we should be good right? (obviously, adding tests :D )14:03
tristanI'm not sure, I think we were erring on the side of considering the expanded public data in cache keys14:04
tristanElement.set_public_data() as I understand is only called when an element mutates it14:05
benschuberttristan: that's how an element can set public data AFAIK14:05
juergbiyes but I wouldn't resolve it there at all14:05
benschubertah ok14:05
juergbistrings from the plugins should be used as is, imo14:05
benschubertmisunderstood then14:05
juergbiwe should resolve static public data early on14:05
tristanbenschubert, Right, I thought the question is about expanding the user provided public data early and considering that in the cache key14:06
tristanExactly14:06
tristanin fact, I don't see how the Element could dynamically set data with variables unresolved14:06
tristanso that part is already output14:06
benschubertjuergbi: I might be missing something, but I though that `set_public_data` was the only way for an element to set some public data?14:06
benschubertdo we have another API to do it?14:07
benschubertI meant more specifically this line: https://gitlab.com/BuildStream/buildstream/-/blob/master/src/buildstream/element.py#L82814:07
tristanhttps://docs.buildstream.build/master/arch_data_model.html#element-data-structure14:07
benschubertthat's the static public data14:08
tristanYes14:08
benschubertand this one is already expanded14:08
benschubertthe problem is with the dynamic one14:08
tristanI thought we were already talking about that14:08
juergbibut integration-commands are typically static14:08
tristanbenschubert, was it expanded before your changes or not ?14:08
juergbiI thought it was an integration-commands issue14:08
tristanIn any case, the set_public_data() I think is not an issue, there is no way to reasonably pass it unexpanded variables afaics14:09
juergbiI agree14:10
juergbiif an element wants to set dynamic public data using some variables, it should be the element's responsibility to use get_variable() and hand a resolved value to set_public_data()14:11
benschuberttristan: I need to check with before, but it's hard to verify since we were anyways expanding it at command time14:11
benschubert > if an element wants to set dynamic public data using some variables, it should be the element's responsibility to use get_variable() and hand a resolved value to set_public_data()14:11
benschubertI disagree, this is very error prone and will move us back to a state where variables are not resolved equally14:11
tristanbenschubert, I'm interested in (A) Do we consider the public data expanded as a whole in cache keys ? (B) Do we only consider expanded integration commands ?14:11
juergbibenschubert: I think it would be a fairly special case to use variables at all for dynamic plugin data14:12
tristanbenschubert, I don't know where that quote is coming from, maybe some docs somewhere14:12
benschubertA) depends if you are speaking about the static and the dynamic one14:12
tristanstatic14:12
benschubertstatic is expanded always14:13
juergbithe correct change, imo, is: generalize Element.__expand_splits() to expand variables in the complete public data instead of just splits14:13
benschubertIf I print https://gitlab.com/BuildStream/buildstream/-/blob/master/src/buildstream/element.py#L299 , it is always expanded14:13
juergbionly splits, right?14:13
benschubertjuergbi: ah! that seems sensible let me try that14:13
benschubertgah that seems right indeed14:13
tristanjuergbi, And with that change, does the expanded static data become input for reverse dependencies ? if so, it must as a whole be considered in the key I think14:14
juergbiyes, __public is already considered in cache key calculation14:14
juergbithe issue is that it was only partially expanded14:14
juergbiswitching to self.__variables.expand(unexpanded_public) should fix that14:14
tristanOkay this is making good sense14:14
benschubertjuergbi: this change broke all my cache keys, seems it's the good one :) I'll need time to validate14:17
benschubertthanks both14:17
benschubertI didn't realize we were expanding only the splits14:17
benschubertwell, this will end up simpler and cleaner14:17
juergbiyes, let's hope expanding variables in public data early will not turn out to be a bad thing14:20
benschubertI'll run the test suite as soon as I validated the fsdk case14:21
juergbitheoretically, it would also be possible to have separate __expanded_public that is returned by get_public_data()14:21
juergbibut not stored14:21
juergbithat would match more closely the previous behavior14:21
juergbihowever, if the simple approach without special casing splits is sufficient and doesn't significantly hurt rebuilds, even better14:22
juergbibenbrown: the WSL runner seems to be offline again14:35
juergbican I please get an approval for https://gitlab.com/BuildStream/website/-/merge_requests/140 ?15:10
juergbita traveltissues15:17
juergbioh, actually, noticed a typo in the URL :-/15:17
juergbifixed15:18
*** tpollard has quit IRC15:20
*** tpollard has joined #buildstream15:20
tpollardSo if I give a project a default target, I can junction it into another project and `bst build $junction.bst` and resolve a build down to a specified element.16:06
tpollardWould it be plausible to expect the same to happen if depending on a junction as a build dependency16:07
tpollardit seemingly doesn't work, but I was wondering it that could be expected behaviour16:07
tpollard(it currently will say as expected that you can't depend on junctions)16:08
tpollardhttps://gitlab.com/celduin/bsps/example-app/-/jobs/56961711416:11
tpollardjuergbi? ^16:24
WSalmonhi tpollard16:25
*** tpollard has quit IRC16:59
*** santi has quit IRC17:28
*** santi has joined #buildstream17:29
*** santi has quit IRC17:34
*** benbrown has quit IRC17:36
*** benbrown has joined #buildstream17:36
benbrownjuergbi: Not sure if my response came through earlier (SASL failed on a previous reconnect)17:37
benbrownI gave the WSL runner a kick17:37
juergbibenbrown: ta, seems to be working again19:41
*** benschubert has quit IRC21:33
*** phildawson_ has quit IRC21:45
*** narispo has joined #buildstream21:51
*** cphang has quit IRC21:53
*** jude has quit IRC22:10
*** Gabriella8863 has joined #buildstream22:38
*** Gabriella8863 has quit IRC22:39

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