IRC logs for #buildstream for Monday, 2017-10-02

*** tristan has quit IRC03:36
*** tristan has joined #buildstream04:11
*** tristan has quit IRC07:29
*** tristan has joined #buildstream07:40
*** ChanServ sets mode: +o tristan07:40
*** ssam2 has joined #buildstream08:55
gitlab-br-botpush on buildstream@master (by Tristan Van Berkom): 1 commit (last: context.py: Make _get_overrides() take a project name, not a project.) https://gitlab.com/BuildStream/buildstream/commit/3a0db8e0b45426c901b0967ae37f9c15a186ba6e09:05
*** tlater has joined #buildstream09:09
tristanjuergbi, I think this lamba thing which I couldnt easily make heads or tails of is something you added: https://gitlab.com/BuildStream/buildstream/commit/cced3006a39fd8be6e4fa926e68666c672db3d6d#36aa50e17b25fc1aabcf9e316de484ba4592aeae_584_57709:10
tristanjuergbi, did it have a purpose ?09:10
juergbitristan: that was tlater. in commit 44862d5c he wrote: Prevent the PROVENANCE_KEY from being sorted09:12
* tlater reads logs09:13
tristanoh09:13
tristanstrange09:13
tristanSorry :)09:13
tristantlater, I think it was always pointless, _yaml.node_sanitize() wants a sorted list, of a dict which _omits_ the PROVENANCE_KEY... I suppose that was a workaround for sorting dicts with int keys09:14
tristanSo yeah as I recall that's what it must have been for09:14
tlatertristan: Yes, that's what it was09:14
tristanRemoving it in this case is safe because now we strip the provenance before the sort09:14
tlaterThat makes sense, I thought _yaml.node_sanitize() was supposed to remove the PROVENANCE_KEY09:15
tristanIt does09:15
tristanthis is just a result of pushing some of my refactoring out of my branch and onto master - that was just house cleaning, removing all the `if PROVENANCE_KEY continue` statements in favor of _yaml.node_items()09:17
tlaterAh, alright. Well, anyway, the unit tests would be screaming at least if the workaround was still necessary :)09:18
tristanyeah, I figured it was safe because cache key tests pass09:18
tlatertristan: I think buildstream!100 and buildstream-tests!16 are ready for a review09:58
tlaterHum... buildstream-tests!16 is supposed to fail. Does gitlab CI somehow remove RO permissions in tar files?10:09
tristantlater, doesnt it run as root ?10:10
tlaterAh, right10:10
tlaterSo I suppose that test case can only work as a user... Should I just ignore the test case then or try to switch to a user for those tests?10:10
tristanrather, if we can get the whole test suite to run as a regular user first, at least when running tests for linux platform; that would be best10:12
tlaterYeah, that seems like the best approach. I'll see if that works.10:12
adds68hi all, i ran successful build of baserock last week using buildstream, i've been side tracked until today, when i've gone back into my sandbox and looked for the build i cannot find it?10:35
adds68Is there a specific directory where bst outputs to?10:35
tlaterWhat's your 'sandbox'? The build does not produce files, it produces an artifact managed by buildstream.10:36
adds68tlater, just a pip env10:36
tlaterAlthough, if you really want to look at files, look inside $HOME/.cache/buildstream/artifacts10:36
tlaterAnd in there ostre/refs/heads/<something>10:36
adds68tlater, ahh ok thank you10:36
tlateradds68: If you want to actually look at the artifacts without checking the cache directory, use bst shell - you can then play with a terminal that has those artifacts built :)10:38
tlaters/terminal/shell/10:38
adds68tlater, so if i wanted to load my baserock build into Qemu, i would use the shell?10:38
tlateradds68: For that you would use bst checkout10:39
tristanadds68, note that since we are pretty fast moving these days; it's possible that entire builds appear to go missing after a git update of buildstream10:39
tristanadds68, i.e. tlater's cross platform branch having landed will have done this, as it effects cache keys10:39
adds68tristan, ahhh ok10:39
adds68When i try and run build/checkout, i get this error "Error loading project: Could not find file at /home/adamjones/git-sources/buildstream/project.conf"11:18
adds68Is this a new required file?11:18
tristanadds68, a project.conf is required at the root of any project11:22
tristanadds68, if you did not cd into the project directory, then you can use the -C/--directory option11:22
tlateradds68: Think git repositories, except it's bst x)11:23
tristanWell, I was rather thinking 'directories with makefiles'11:23
tristanbut sure :)11:24
tlaterbstfile?11:25
*** semanticdesign has joined #buildstream12:22
gitlab-br-botpush on buildstream@master (by Tristan Van Berkom): 2 commits (last: sandbox.py: Fixup placement of main Sandbox docstring) https://gitlab.com/BuildStream/buildstream/commit/03a646e708d3559b3e0f06c0103b76ef8290872e12:36
*** semanticdesign has quit IRC12:40
tlatertristan: On !100, list_relative_paths() doesn't list directories - _force_rmtree specifically only operates on directories (and has to). I don't think any function in our utils currently covers that.13:09
adds68tristan, if i receive an "Error loading pipeline" error, would this most likely be due to upgrading to the latest commit?13:11
ssam2you should get more detail than just those 3 words13:12
tristanadds68, as ssam2 says, I doubt that's all you got13:13
tristanif it is, that's a bug13:13
adds68tristan, oops sorry "Error loading pipeline: Could not find file at /home/adamjones/git-sources/definitions/./elements/baserock"13:14
tristanadds68, and what was the command you typed to get that ?13:15
adds68yet in my bst .cache baserock is there13:15
adds68i did bst checkout baserock ~/buildstream-artifacts13:15
tristanadds68, are you sure you didnt mean `bst checkout baserock.bst` ?13:16
tristanadds68, fwiw, I recommend following these instructions: http://buildstream.gitlab.io/buildstream/completion.html#completion13:16
tlaterLots of people seem to get confused by being allowed to omit elements/ but needing the extension :)13:17
tristancompletions should really solve this, though.13:17
adds68tristan, ah ok i didn't think the extension was needed if it was already in the cache13:18
adds68tristan, that still produces the same error13:19
tristanand omitting the relative 'element-path' is not allowed, it's rather required13:19
tristanadds68, are you sure the error does not now say "Could not find file at /home/adamjones/git-sources/definitions/./elements/baserock.bst" ?13:19
adds68tristan, well yes it does, but i mean it's the same error13:20
tristanadds68, and is there a baserock.bst there ?13:20
adds68I should have added "produces the same error but with baserock.bst"13:20
ssam2there is no baserock.bst that i'm aware of13:21
adds68tristan, nothing in the definitions13:21
adds68So does this mean i have to rebuild or am i missing something out?13:21
tristanssam2, I suspected as much, but was leaving time for adds68 to figure it out :)13:22
tristanadds68, Well, what command did you originally run to build it with ?13:22
adds68bst build systems/build-system-content.bst13:22
tristanSo maybe you want to check that out ?13:23
adds68tristan, ah yes i'm an idiot13:25
adds68thanks13:25
tristantlater, regarding !100 - my concerns were that A.) We're looking at problems stemming from directories lacking write permissions and ignoring problems stemming from directories lacking read permissions, and B.) we *might* be leaving code paths behind to fend for themselves by not handling it in one place13:30
tristanthe latter concern is just difficult to ascertain from a brief reading13:30
tristantlater, in addition to A and B, I am also concerned that people might expect same day reviews, which would mean I will have a very hard time getting any work done myself :D13:31
tristanso lets sleep on this one at least13:32
tlatertristan: I'm expecting nothing, trying to be respectful :) I just throw things out hoping you'll respond when you have time.13:32
* tlater should perhaps get used to using gitlab issues for that13:32
tristantlater, yeah... I didnt mean to bark or anyting by that...13:33
tlaterta though, your reviews are much appreciated - also as part of my coding experience :)13:34
tristanflattery will get you everywhere... but yeah, I guess I'm particularly under a lot of pressure with project options dangling above my neck13:35
* tristan has option classes allowing definition of different types of option, an option pool which loads from the project option definitions, and does the jinja2 expression resolution based on that, and also setting the options from user config file13:36
* tristan needs to get CLI support for overriding options, implement a function to resolve a dictionary with conditionals using a recursive scan (and fully defining the (?) statements)13:37
tristanneed to remove all the arch options from the cli, config file and loader13:38
tristanand provide a magick (and documented) arch option which is automatically resolved to uname's guess13:38
tristanthen, declarative array prepend/append/override remains to be done too13:39
* tristan guesses the documentation updates will also be intense :-/13:40
ssam2awful hack du jour : https://gitlab.com/BuildStream/buildstream-docker-images/-/jobs/3477602313:54
ssam2`docker build` running inside a GitLab CI docker container13:54
tlater\o/13:54
tlatertbf, that's probably not to uncommon practice.13:54
ssam2probably not13:55
ssam2just funny that Docker has this client/server architecture which makes sense for running containers, but really doesn't make sense for building images or pushing them around13:55
tlaters/to/too <- I've been doing that constantly lately14:06
ssam2i'm trying to work out how the automation of docker image builds should work now14:12
ssam2should we push a new image every time someone commits to master of buildstream-docker-images.git ?14:12
ssam2or have a "release new image" button ?14:12
ssam2should we also push a new image every night with the latest version of BuildStream, or something ?14:12
ssam2once buildstream 1.0 hits, I guess we'll want a "stable" docker image14:13
ssam2and possibly an "unstable" one, although i guess that's less important14:13
ssam2but for now buildstream doesn't do any releases, so we can only do "unstable" docker images14:13
tristanssam2, as far as gitlab testing goes; what I want ideally is: Never call apt-get install or dnf whatever, never invoke pip install with --upgrade, something explicit to validate a new docker image before we start using it for CI14:15
* tristan has to leave closing coffee shop, I'm not the last one, but I know the guy is on holiday tomorrow for the rest of the week and must really be itching to leave14:16
tlatero/14:17
*** tristan has quit IRC14:20
*** tristan has joined #buildstream14:23
*** xjuan has joined #buildstream14:27
ssam2mm i wasn't thinking about the gitlab CI use case14:28
ssam2but it does matter14:28
ssam2are you imaging a pipeline that goes: commit to buildstream.git; new docker image produced; gitlab CI for buildstream.git runs tests on the new docker image?14:29
ssam2that seems pointless though14:29
ssam2I guess you mean, no `pip install --upgrade` for dependencies14:29
ssam2all this makes sense14:30
ssam2I think pushing a new Docker image on every commit to buildstream-docker-images.git is the way to go14:30
ssam2then buildstream.git can pull a specific version of that image, or 'latest', either way when buildstream adds a new dependency, it's just 1 or 2 pull requests to get that integrated in the CI pipeline14:31
tristanssam2, yeah basically that would be enough for me14:34
tristanssam2, if we wanted to be fancy, we could run CI against buildstream master against the most recent docker image, and be able to know that we can safely move to the new one14:34
tristanbut meh, not important at all I guess, and maybe convoluted for nothing14:35
*** xjuan has quit IRC14:35
tristanssam2, what I would really like eventually, say 5 years from now, would be nice if our CI ran against various docker images from various epochs14:35
tristanheh14:36
ssam2to see if buildstream still works on Ubuntu 17.04 in 2025, and such ?14:36
tristanYeah14:36
ssam2ybd does something like that ... https://gitlab.com/baserock/ybd/blob/master/.gitlab-ci.yml#L6114:37
tristanof course, that presumes we dont start requiring bleeding edge stuff14:37
ssam2oh wow, I just noticed you can set a different docker image for different gitlab-ci jobs in the same .yml file14:37
tristanalso it would be nifty if, starting soon, we could start running a different CI on BSD14:37
tristanssam2, of course these are all just "wants" :)14:38
ssam2it looks like some of the current tests actually depend on `dnf remove` being possible14:54
ssam2i guess that's needed because we don't have an actual BSD runner14:55
ssam2i might want to switch that to work some other way, like symlinking `bwrap` to /bin/false or something rather than calling `dnf`14:56
ssam2would be faster to do it that way as well14:57
ssam2given the extra deps that the test suite requires, i guess I'll add a `devel` variant of the docker image15:01
ssam2which can contain stuff like sphinx15:01
tlaterssam2: Technically it doesn't depend on dnf remove, but I've found that python can import packages it shouldn't be able to if ostree isn't installed15:02
ssam2i don't follow15:03
tlaterWhen ostree isn't installed some import statements will cause buildstream to crash. Using the flags to call buildstream that disable linux-specific things, it will still attempt to call those imports, but won't fail if ostree is installed.15:04
tlaterSo just symlinking might hide bugs15:04
tlaterFor ostree in specific15:04
tlaterAlthough *techinically* the tests can run just fine without that.15:05
tristanAh, for ./setup.py test15:05
tristanssam2, because setup.py does the assertions for ostree/bwrap regardless, and is also the correct entry point for pytest tests15:06
tristanssam2, also, it's explicitly desirable to not "use a fallback plaform in the absence of bwrap + ostree"15:07
tristanin otherwords, on Linux, we _require_ the linux dependencies15:07
tristanintentionally15:07
ssam2i agree with you, but https://gitlab.com/BuildStream/buildstream/blob/master/.gitlab-ci.yml#L60 seems to contract15:07
ssam2*contradict15:07
ssam2if BST_FORCE_BACKEND="unix" is enough to test the non-bwrap/ostree fallback, why uninstall them ?15:07
tristanah right15:08
tristansetup.py recognizes this15:08
tristansorry15:08
tristanthen honestly, I dont follow either :)15:08
tristanbut it is a hairy little thing15:08
ssam2ok15:08
ssam2well, I can leave it as-is if that's better15:08
ssam2I was thinking of opening a "avoid package manager calls in .gitlab-ci.yml bug" as part of this docker work i'll be doing15:09
ssam2a bug entitled "avoid package manager calls in .gitlab-ci.yml", I mean15:09
tristanssam2, I'm not concerned with calling dnf/apt-get to remove/uninstall things, although I hope it does not result in implicitly upgrading, installing something of an ad-hoc version as a side effect :)15:09
ssam2right, OK15:10
tristanThe point is just to be sure what we're testing against, and that it remains the same thing15:10
ssam2ok15:13
tlaterEgh, sorry for being awful at explaining that15:13
ssam2so I'll aim at "avoid package upgrades in .gitlab-ci.yml" for this week15:13
tlaterssam2: Basically, an accidental 'import ostree' anywhere can cause buildstream to crash if ostree isn't installed.15:14
tlaterBut *only* if it isn't installed - it can't be hidden through the environment variable.15:14
tlaterJust in case you can think of a better way to do this...15:14
tlaterPerhaps something fancy with the modules global could do it15:14
ssam2oh I see15:15
ssam2so you remove it in order to catch cases where `import ostree` happens15:15
tlaterYup :)15:15
ssam2we could install a fake 'ostree' package earlier in PYTHONPATH that would raise an exception when imported15:16
ssam2sounds like the `dnf remove` calls are fine though anyway15:16
tlaterA comment explaining those calls is probably necessary though - really should have had one.15:17
*** xjuan has joined #buildstream15:22
ssam2i've added one15:27
gitlab-br-botpush on buildstream@master (by Sam Thursfield): 1 commit (last: .gitlab-ci.yml: Add comment after IRC discussion) https://gitlab.com/BuildStream/buildstream/commit/4231a5e6d277ee0450d2359f064901b4be37edc715:27
* tlater can't believe os.walk's onerror call has exactly one line of documentation and not a single stackoverflow question regarding it.15:31
gitlab-br-botbuildstream: issue #99 ("Automate builds of official Docker images") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/9915:34
gitlab-br-botbuildstream: issue #100 ("Avoid package upgrades during CI") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/10015:40
tlaterUgh, it looks like os.walk can't handle permission errors nicely - you have to restart the entire call15:44
gitlab-br-botbuildstream: issue #101 ("Improve convenience for users running BuildStream through `docker`") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/10115:49
*** jude has quit IRC15:49
*** bochecha has joined #buildstream15:50
*** jonathanmaw has joined #buildstream16:34
*** ssam2 has quit IRC16:39
*** tlater has quit IRC17:00
*** jonathanmaw has quit IRC17:19
*** xjuan has quit IRC18:23
*** xjuan has joined #buildstream18:40
*** bochecha has quit IRC20:21
*** jude has joined #buildstream20:57
*** tristan has quit IRC21:37
*** xjuan has quit IRC22:21
*** jude has quit IRC22:34

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