IRC logs for #buildstream for Monday, 2020-09-28

*** tristan has joined #buildstream06:04
*** ChanServ sets mode: +o tristan06:04
benschubertMorning! tristan, juergbi I banded my head this weekend on this umask error, and I don't really have a solution in a multi-threaded environment.07:38
benschubertOne thing I could imagine is to set the umask at the scheduler level and run the entire time with it? Otherwise... we might need to set the permissions manually / in a subprocess :/07:38
tristanI'm not sure I understand what the umask problem is07:39
benschubertah let me show you, one sec07:39
tristanI discovered last week that we lose writable permission when we stage files in CAS and then later stage those CAS files to a FileBasedDirectory, but I think this is different07:40
benschuberthttps://gitlab.com/BuildStream/buildstream/-/jobs/741315891#L182307:41
benschubertwe use umask() calls to have the permissions done correctly in that07:41
benschubertand umask() is set at a process level, so per-threads context managers are stepping on each other and removing it before it should be done07:42
benschubertand that also means we actually have no idea of what else is impacted07:42
tristanSo07:48
tristanAll builds happen in buildbox right ?07:48
tristanBut, we do the staging of files ?07:48
tristanwe stage sources, thats the crux of it, even if the builds happen in buildbox, we stage the sources07:49
tristanthe main crux of the matter is that when sources get staged (essentially input of everything is there), we need to use a deterministic umask to do so07:49
tristanAs buildbox and RE gets enhanced over time, it will more and more respect permission bits so that remote or local workers use exactly the permissions we used to initially store files in CAS07:50
tristanSo we need to make sure that we continue to store files in CAS with deterministic permissions07:51
tristanbenschubert, taking a step back from this, the only reason we use utils._deterministic_umask() is for this: getting the permissions of files created during Source.stage() to be deterministic07:52
tristanbenschubert, I think that things have changed in such a way that when we stage sources, we put them into cas, and then we later tell buildbox to stage those sources and build (intermediate source cache) - so it would be possible to change the policy07:53
benschubertso:07:53
benschubert1) Could we get the buildbox-casd to get which permissions it should use on staging?07:53
benschubert2) Are we fine with setting umask at the scheduler level? Or will that break things07:53
tristansuch that we ensure determinism using Directory APIs when checking in staged sources into the source cache, instead of when asking the Source implementation to stage files into a temp dir07:54
benschubertI think that would be the best and most efficient way indeed07:55
tristanAsides from this, we want to have the inherited umask in effect07:55
tristani.e. when we do things like `bst workspace open` or `bst source checkout` or `bst artifact checkout`07:55
tristanin those cases we want host umask07:55
benschubertoh wait, the umask is only at stage time, not ingestion time, right07:56
benschubertso a global version doesn't work07:56
tristanI don't completely understand what is wrong with test_pull_access_rights()07:56
benschubertSo delegating this to the DirectoryAPI and have it done in casd would probably be easiest for us07:56
benschubertI need to dig more into it still, I am not 100% sure either07:57
tristanbenschubert, I could use a review of https://gitlab.com/BuildStream/buildstream/-/merge_requests/2075 btw08:01
tristanit's a gift for you :)08:01
benschuberto/ Thanks !08:02
benschubertI'm still running around a lot today/tomorrow, will try to do that before then, but EOW will be better :D08:02
benschubertAlso, I saw you merged the fix for the logging? Did you manage to add a test? Or is there a way I can know if I broke it?08:03
tristanit's quite a simple patch, and you requested it08:03
tristanNo, I merged a separate simple fix, I still have that branch open08:03
tristan2075 is dependency filename allowed to be a list08:03
benschubertgreat, so that works for the 'config' key too right? That would be my first comment if you could add an example with 'location' for example?08:04
benschubertthis is going to save people hours of typing :P08:04
tristanIts tested with config and its tested with junction08:04
tristanand it will "just work" if you use it with build-depends, runtime-depends or depends08:05
benschubertright, I meant if we could also have an example in the docs about the 'config' part, I'm not sure it will be straighforward when reading?08:07
tristanOh, I also have this: https://gitlab.com/BuildStream/bst-plugins-container/-/merge_requests/75, I don't know who wants to review that08:07
tristanmaybe I should "just merge it" if nobody wants to review container08:07
benschubertoh thanks! chandan and I are definitely interested in that one08:07
benschubertI'll ensure you get a review soon :)08:07
tristanI put an example in the docs, but not a specific one for config no08:07
tristanI think the docs are pretty clear the way it is though08:08
tristanbasically it says you can use a list for the filenames in order to declare multiple dependencies with common attributes08:08
benschubertOk, fair. I guess I'm biased about the docs since I've spent a lot of time reading ansible's docs and they have tons of examples everytime :)08:08
tristanYeah I would not want to go that route08:09
tristanI would like to have many examples, separate from the terse reference docs08:09
*** toscalix has joined #buildstream08:23
juergbibenschubert: all staging in the buildstream process as preparation for assemble is now purely virtual. i.e., umask shouldn't affect anything at all (I'm wondering whether we already ensure that spawned subprocesses have a deterministic umask but the thread-based scheduler shouldn't be a problem for that)08:24
juergbiI think the test is rather checking whether umask is respected for bst artifact checkout, which should be outside the scheduler08:25
benschubertjuergbi: oh :/ I would not have changed that part08:25
juergbihave to take a closer look what's going on08:25
benschubertOk, I'll try to look this weekend then :/ thanks!08:25
*** phildawson has joined #buildstream08:32
*** toscalix has quit IRC08:34
*** tristan has quit IRC08:49
*** santi has joined #buildstream08:51
*** chipb has quit IRC09:00
*** chipb has joined #buildstream09:00
juergbibenschubert: !2074 fixes the pull_done() issue we've discussed in context of the thread-based scheduler. still have to fix up a test race condition, though09:07
gitlab-br-botMR !2074: Artifact pull code improvements https://gitlab.com/BuildStream/buildstream/-/merge_requests/207409:07
benschubertjuergbi: right, I still have to add the asserts in my branch too09:08
benschubertI hope to have some time EOW for that09:08
gitlab-br-botBenjaminSchubert approved MR !2075 (tristan/dependency-multi-filename->master: Allow specifying multiple filenames in a dependency) on buildstream https://gitlab.com/BuildStream/buildstream/-/merge_requests/207509:14
gitlab-br-botBenjaminSchubert approved MR !2074 (juerg/artifact-pull->master: Artifact pull code improvements) on buildstream https://gitlab.com/BuildStream/buildstream/-/merge_requests/207409:21
benschubertoh the bot is alive again! Thanks whoever did that :D09:21
*** tristan has joined #buildstream09:21
*** ChanServ sets mode: +o tristan09:21
*** tomaz has joined #buildstream09:35
*** tomaz has quit IRC10:07
*** tomaz has joined #buildstream10:18
gitlab-br-botmarge-bot123 merged MR !2075 (tristan/dependency-multi-filename->master: Allow specifying multiple filenames in a dependency) on buildstream https://gitlab.com/BuildStream/buildstream/-/merge_requests/207511:18
douglaswinshipHere's a weird one. I'm getting an exception thrown when I try to create a workspace for a Freedesktop-sdk element:11:24
douglaswinship"[--:--:--][][] BUG     Primary URL marked twice with different URLs"11:24
douglaswinshipBut I ONLY get it when i do it inside the freedesktop-sdk docker image11:24
douglaswinshipwhen I create a workspace on my own system, outside the container, it works fine.11:25
douglaswinshipThe problem happens in CI on freedesktop-sdk too. (Where, naturally, it's running the freedesktop-sdk docker image).11:26
douglaswinshipSo it's defintiely something about the docker image that does it.11:26
douglaswinshipWhat does it even mean when a url gets marked as 'primary' anyway? What part of the system is recording 'primary' urls?11:27
douglaswinship(i'm running buildstream 1.4.3, in each scenario)11:29
coldtomthat rings a bell.... aha https://gitlab.com/BuildStream/buildstream/-/issues/75711:33
coldtomi thought someone had patched that, but perhaps not11:33
douglaswinshipcoldtom: that sounds close11:34
douglaswinshipbut it's still strange that it only happens in the docker image11:35
douglaswinshipi suppose the patch would be in the git_tag plugin?11:35
douglaswinshipPerhaps the docker image isn't using the version with the fix.11:35
douglaswinshipthough, that would be strange11:36
coldtomhttps://gitlab.com/BuildStream/bst-external/-/merge_requests/118 yes!11:36
* coldtom forgot that it might be in bst-external11:36
douglaswinshipcoldtom: thanks. Big help.11:41
douglaswinshipdocker image needs updating with the newest bst-external11:41
douglaswinshipi'll track and do an MR11:42
douglaswinshipOkay, important question: is the master branch of bst-external compatible with bst 1.4.3?12:02
douglaswinshipAnd If not, do we have any record of which bst-external tags are compatible with which buildstream versions?12:02
coldtomit should be compatible, the plugin API should be stable for all 1.x12:04
douglaswinshipinteresting.12:05
douglaswinshipThe freedesktop-sdk docker images have two different versions of bst-external.bst, one for bst 1.4, and one for bst 1.612:05
douglaswinshipThat made me think there was a compatibility issue12:05
douglaswinshipThen I noticed that they're both pointed at the same commmit of bst-external anyway, and I started getting confused12:06
douglaswinshipOh well, I'll just try an MR updating them both to the current head of master and see what happens.12:06
douglaswinshipoh, no. I see what's going on now.12:11
*** tristan has quit IRC12:38
*** tristan has joined #buildstream13:25
*** ChanServ sets mode: +o tristan13:25
*** tristan has quit IRC13:34
gitlab-br-botmarge-bot123 merged MR !2074 (juerg/artifact-pull->master: Artifact pull code improvements) on buildstream https://gitlab.com/BuildStream/buildstream/-/merge_requests/207414:19
*** santi has quit IRC17:35
*** benschubert has quit IRC19:49

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