IRC logs for #buildstream for Wednesday, 2018-01-17

*** mcatanzaro has joined #buildstream02:01
*** mcatanzaro has quit IRC02:10
*** tristan has joined #buildstream05:51
*** ChanServ sets mode: +o tristan05:56
juergbitristan: i'm just looking at the CI issue and see that the dist directory contains buildstream/integration-cache/sources/ostree/https___sdk_gnome_org_repo_ with tons of files07:13
juergbialready before the sdist07:13
juergbiso the tar -ztf dist/* fails because of * matching that extra directory07:13
juergbiany idea what's responsible for this?07:14
juergbitlater: i suspect the change in your branch to (temporarily) add dist/buildstream/integration-cache/ as cache path is responsible for the CI issue07:26
juergbii'll clear runner caches, let's see whether that helps07:26
juergbiyes, source_dist now succeeds again07:28
*** valentind has joined #buildstream07:29
gitlab-br-botbuildstream: merge request (juerg/recursive-pipelines->master: WIP: Junctions and subprojects) #160 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/16007:38
gitlab-br-botbuildstream: merge request (juerg/recursive-pipelines->master: Junctions and subprojects) #160 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/16007:39
tlaterjuergbi: Yes, that's definitely it - sorry, didn't realize that cache would be shared by all runners08:09
* tlater still wonders how he can cache that dir but avoid its inclusion in the sdist08:11
tristanEeek08:12
tristanI see, yeah; dist is an artifact, not "the cache" :)08:13
tristantlater, would be good to make sure your branch tip doesnt have that soon; as the next subsequent CI will reintroduce the breakage08:13
tlaterYep, I'll only enable caching when I actually merge08:14
tristantlater, how's it coming along btw ?08:14
tlaterThough this will probably break CI for branches that don't rebase08:14
tristanI'm excited to drop the old stuff08:14
* tlater is still looking at the out of space issue08:14
tlaterShould hopefully be done today08:15
tlaterssam2 also had a look at it, so I'll go through his comment(s?)08:15
tristandoes it do the `pytest.mark` approach and put everything into tests/ ?08:15
tristancuriously ?08:15
tlaterYes, it does08:15
tristannice08:15
* tlater finds that approach ends up very neat08:15
tristanyeah, we can make the .gitlab-ci.yml cleaner too this way; simplifying the coverage report collection08:16
tristanand just have one test run per platform08:16
tristanwhich, we will be adding more of08:16
tlaterYup. The only downside is that *all* tests now take a long time08:16
tristanEh ?08:17
tristanWhadayamean ?08:17
tlaterYou don't 10 minute feedback on unit tests anymore08:17
tlaterYou have to wait until the integration tests are done too08:17
tristanOh you just mean, if you're the type who likes to sit and watch gitlab do stuff ?08:17
tristanyeah08:17
tristanTo be frank; I 100% expect that anyone who pushes a branch for an MR, has run the local tests (sans the long integration ones) locally before ever submitting a branch08:18
tristanSo, I have zero sympathy08:18
tlaterI suppose I notice it a bit more because I'm actually testing if the the tests run on gitlab  ;)08:19
tristanyeah :)08:19
tristancertainly you would hehe08:19
tristanjuergbi, I provided some guidance for jmac to fix our stomping on unhandled exceptions, would be nice to get another proof read there: https://gitlab.com/BuildStream/buildstream/merge_requests/240#note_5487808108:24
tristanit's a bit shorter than the one yesterday dont worry ;-)08:24
juergbiok ;)08:24
tristanin case you may have better ideas there08:24
gitlab-br-botbuildstream: merge request (juerg/source-state->master: source state updates) #230 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/23008:27
*** valentind has quit IRC08:27
tlaterHrm, I'm pretty sure we are running out of space now, after all08:28
tlaterWe go from 5% usage to 78% usage of the big storage when running the normal linux tests08:29
tlaterI guess tarballs are less efficient storage than ostree08:29
tristanThey most certainly are.08:29
* tlater thinks this could be resolved if we removed the pytest datadirs after each tests08:30
tristantlater, a workaround would be to delete the artifacts we dont reuse throughout the test08:30
tristantlater, removing the whole artifact cache every time, would slow things down immensely08:30
tlatertristan: No, I think the issue here is that we don't share artifacts - we create individual @pytest.mark.datafiles things for each test08:31
tristanbecause you never reuse the base runtime08:31
tlaterWe only share sources08:31
tristanOhhhh08:31
* tlater is unsure how he would go about sharing the base platform artifact08:31
tlaterBut I think that's my best option at this point08:31
tristantlater, for artifact tests could we work around this in a way that is not with the cache ?08:31
tristantlater, we already cache the sources with a custom buildstream.conf08:31
tlaterThere's no way to import a checkout, is there?08:32
tristanwe need only route the artifact cache (using the config) to the same volume, but outside of the cache08:32
tlaterAh, I see what you mean08:32
tlaterYeah, that could work08:32
tlaterIt would still be neat to cache the base platform artifact08:33
tlaterThough I guess that isn't necessary08:33
tristantlater, We want to make sure that we only use this custom source & artifact cache location when running integration tests08:33
tristandont let the existing tests inherit any of this08:33
* tlater uses a separate 'CLI' decorator for integration tests08:33
tristanThat works :)08:33
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23308:39
*** cs_shadow has quit IRC08:45
*** m_22[m] has quit IRC08:45
*** ernestask[m] has quit IRC08:45
*** cgmcintyre[m] has quit IRC08:45
*** kailueke[m] has quit IRC08:45
*** jjardon[m] has quit IRC08:45
*** mrmcq2u[m] has quit IRC08:45
*** pro[m] has quit IRC08:45
*** ptomato[m] has quit IRC08:45
*** waltervargas[m] has quit IRC08:45
*** bochecha has quit IRC08:45
*** mattiasb has quit IRC08:45
*** cs_shadow has joined #buildstream08:45
*** m_22[m] has joined #buildstream08:45
*** ernestask[m] has joined #buildstream08:45
*** cgmcintyre[m] has joined #buildstream08:45
*** kailueke[m] has joined #buildstream08:45
*** jjardon[m] has joined #buildstream08:45
*** mrmcq2u[m] has joined #buildstream08:45
*** pro[m] has joined #buildstream08:45
*** ptomato[m] has joined #buildstream08:45
*** waltervargas[m] has joined #buildstream08:45
*** bochecha has joined #buildstream08:45
*** mattiasb has joined #buildstream08:45
*** csoriano has quit IRC08:45
*** csoriano has joined #buildstream08:46
juergbitristan: exception handling proposal seems reasonable to me. what we can would be handled properly and for the unexpected we would still get a sensible log08:53
tristanjuergbi, yeah the only thing I can see is that if we start getting unhandled exceptions from the logging, or from terminating jobs, we may trigger infinite loops08:54
tristanbut we could uninstall the global exception handler after it triggers once08:55
tristanin any case, thinking that far ahead is a bit too far :)08:55
juergbior try except inside the global handler08:55
tristanwell, that will run out of context when calling scheduler.terminate_jobs() and return + expect clean exit08:56
tristanin any case, we still reduce the possibilities to a very small section of code08:57
juergbiah, true, it can't be synchronous with the loop08:57
tristanCatching unexpected output from children is equally important, and more tricky to implement08:58
tlaterUnix tests passing \o/ - they also only take 20 minutes now09:01
tlaterA minute faster than the linux tests, somehow - test coverage is similar to before09:03
tlaterOh, hrm, test coverage went down 10%09:04
tristantlater, while you are swimming in test refactoring, please remember to file bugs for the things you havent covered09:07
tristantlater, one thing comes to mind, now we're testing unix backend in a location sans ostree right ?09:08
tlaterYep09:08
tristanSo, we would like to be sure that the installation with pip / setup.py works as expected and be able to remove our secret force backend env var09:09
tristanwhich is something a user should never have to know about when actually installing on a unix variant without bubblewrap & ostree09:10
tlaterYep, that's worth a bug - probably a hard test case to write, unfortunately09:11
tristantlater, the comment was however mostly intended to separate tasks; we dont want to block your branch needlessly, but we must have a record of things which need doing09:11
tristantlater, not a hard test case09:12
tristantlater, actually I dont care for it being a "test case" either09:12
tristantlater, currently the .gitlab-ci.yml ensures that we aways run tests from a dist tarball, which we install as part of the job09:12
tristanso, that part just has to work09:13
tristan(but, it doesnt have to block your branch, of course)09:13
*** ssam2 has joined #buildstream09:14
tristantlater, its enough to abolish the force backend env var entirely; and have the unmodified tests continue to work09:14
tlaterHm, I don't think this would actually test that without running on an actual non-linux platform, though I don't remember how we detected the system we're running on anymore.09:15
tristantlater, running a non-linux platform in CI is also a must09:15
tlaterYeah, that's probably where this is going09:15
tristantlater, maybe should be punted to the BSD stuff09:15
* tlater will make notes about this in issues09:16
tristanthanks for that :)09:16
tlaterHuh. I'm getting a lot of 'No source code for <source path>' errors now - presumably why test coverage went down09:21
tlaterThe paths refer to the build directory, while the paths with working coverage are in /usr/lib09:22
tlaterI assume this might be due to the sdist installation?09:22
*** adds68__ has quit IRC09:25
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23309:27
gitlab-br-botbuildstream: issue #196 ("source_dist: job fail with obscure message when a dependency is not satisfied") changed state ("closed") https://gitlab.com/BuildStream/buildstream/issues/19609:36
gitlab-br-botbuildstream: merge request (docs-reorganization->master: Documentation: Restructured toplevel documentation) #241 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/24110:12
*** jonathanmaw has joined #buildstream10:13
tristantlater, sdist installation has been happening for a while10:15
tristanwithout damaging coverage reports it would seem10:15
*** valentind has joined #buildstream10:22
*** aiden has joined #buildstream10:35
aideno/10:35
ssam2hi aiden10:35
aidenhi ssam210:36
ssam2tlater, with respect to capturing and echoing the stdout from the tests ...10:36
ssam2it's possible if we can inject our own code10:36
tlaterssam2: Yeah, it is *possible*, but may be very very messy10:36
tlaterI'll look at it10:37
tlaterBut not sure I'll *like* it10:37
ssam2it's seldom nice to do, indeed10:37
ssam2it becomes nicer in python 3.5 as you can use async functions to do it10:38
ssam2e.g. https://gitlab.com/baserock/definitions/blob/master/scripts/test-minimal-system#L40 (that's doing something else, but the principle is the same)10:38
ssam2pretty sure we can't do that in python 3.4 though10:38
tlaterAww, I really wanted to try out async functions :|10:39
*** aiden has quit IRC10:53
*** aiden has joined #buildstream10:55
*** valentind has quit IRC10:56
*** aidenhjj has joined #buildstream10:59
*** aiden has quit IRC11:00
*** aiden has joined #buildstream11:03
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23311:05
gitlab-br-botbuildstream: merge request (docs-reorganization->master: Documentation: Restructured toplevel documentation) #241 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/24111:07
aidentlater, just fyi https://stackoverflow.com/questions/37465816/async-with-in-python-3-411:13
tlaterta aiden, maybe I can abuse this to learn about async after all :)11:16
*** adds68 has joined #buildstream11:28
tristantlater, should we be blocking these enhancements just because you can't watch the buildstream log progress during integration style tests ?11:29
tlaterNo, mostly blocking because coverage isn't working for unix tests11:29
tristanah11:30
tlaterI suspect it's because we change users11:30
tlaterBut not sure yet - hard to debug due to gitlab-only issue :|11:30
tristanthat should be easy enough; surely it must just be the coverage reports that are not being combined properly11:30
tlaterNo, the unix tests relate to the wrong path11:31
tristanIs it a wrong path ?11:31
tlaterFor some reason the coverage is about a locally installed buildstream, rather than the system installed buildstream that is present in the final coverage step11:31
tlaterSo when we finally combine half the coverage is thrown away because pytest can't find the code11:32
tlaterIt's an odd one11:32
tristantlater, you are at least familiar with https://gitlab.com/BuildStream/buildstream/blob/master/.coveragerc#L15 right ?11:32
tlaterYep11:32
tristanokay11:32
tlaterThe issue is this: https://gitlab.com/BuildStream/buildstream/-/jobs/4831103111:33
tlater^ Just coverage for the unix tests11:33
tlaterWhen running both, we get a report, but pytest throws any unix coverage away: https://gitlab.com/BuildStream/buildstream/-/jobs/4828260011:33
jonathanmawI'm looking at adding a test for checking that bzr workspaces are being initialised properly. The only way to be sure involves invoking 'bzr'. Should I be using subprocess.check_output() or is there a better way to shell out during tests?11:34
jonathanmawI had a look at the "cli" helper, but that seems to be only usable to invoke "bst"11:34
* tlater is pretty sure subprocess is the only option11:35
tristantlater, use this: https://gitlab.com/BuildStream/buildstream/blob/master/.gitlab-ci.yml#L179 here: https://gitlab.com/BuildStream/buildstream/blob/master/.gitlab-ci.yml#L20011:35
tristantlater, that may well fix it, also; make sure you list source_dist in dependencies for the coverage task11:36
tristantlater, I'm guessing something in your setup is causing the current approach to break11:37
tlaterHm, odd11:37
tristanwe never used the dist tarball in the coverage combine step; but we generate the reports from the dist tarball11:37
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23311:37
*** aiden has quit IRC11:38
tristantlater, also; you could theoretically reproduce that step locally to verify; I did that originally to create the coverage aggregation step11:38
tlaterI hope we don't accidentally run tests against the docker-installed buildstream11:38
tristanby downloading the artifacts and running coverage combine and looking at the results11:39
*** aiden has joined #buildstream11:39
tristantlater, my guess is that we never run tests using the installed stuff; which is another bug11:39
tristantlater, assuming that you're using something similar to the runcli.py fixture to launch the integration style tests11:40
tristanthe existing integration tests will be using the installed bst; but the `./setup.py test` tests only use local stuff and dont ever require installation11:41
tlaterYeah, that's a point11:41
tristantlater, an acceptable regression considering all your improvements, needs a report, though.11:42
*** aidenhjj has joined #buildstream11:42
tlaterIn general, I think figuring out what pytest resolves 'buildstream' to might be something to investigate11:42
tristanI suppose ideally we make the integration decorated tests require installation11:42
tristanand use the installed one for those tests11:42
tristanensuring we have good coverage of both in-tree and installed11:43
tristantlater, if pytest is using anything except what is in the source tree; that would be an incredibly horrible bug11:43
tristanI really, really doubt that.11:43
tlaterIt's possible, it relies on python imports11:44
tristanMore likely that we can possibly make that mistake, but pytest should to some degree ensure that never happens11:44
tlaterWhich are a mess if you have multiple locations of your package11:44
*** aiden has quit IRC11:44
* tlater tests it anyway just to be sure11:45
tristantlater, running tests on a site where an installed copy of your module exists has to be really, really common11:45
tristanI dont think anyone would recommend py.test if that was a known bug11:45
tristan(and py.test is the defacto standard)11:45
tlaterHm, I suppose11:46
tlaterStill, I'm not sure how much they mess with default behaviour11:46
tristanisolated black boxes man... question it if there is a bug, but assuming it works properly is a good start.11:47
* tlater questions it because he saw the same test suite running two different versions of the same package, but will concede 11:48
tristanfor our CI then; we should ensure that the docker image never has buildstream installed as a start.11:49
tristanjust remove any doubt at the source11:49
tlaterYep, that seems reasonable11:49
tlaterssam2: Is your comment on contains() done?11:50
* tlater thinks changing it to be more intuitive probably isn't a poor idea11:51
jonathanmawtristan: my current implementation of a test that initialising workspaces with bzr is behaving properly has highjacked the test_open test with a special case for if the kind is "bzr". Should I separate it out?11:52
jonathanmawYeah, I'm going to do that, redundancy in tests is a minor problem, but making the tests an unreadable mess is a major one, so I should try to prevent it.11:54
*** aidenhjj has quit IRC12:03
*** aiden has joined #buildstream12:07
aidentox is good for isolated testing12:08
tristanjonathanmaw, "has highjacked test_open" ... I have no idea what you're talking about12:09
*** aidenhjj has joined #buildstream12:10
persiatox is also good for isolated execution12:10
ssam2tlater, yes12:10
tristanWe had a virtualenv segment of the instructions, and threw that in the trash where it belongs12:12
*** aiden has quit IRC12:12
tlaterHeh, poor virtualenv12:12
tristanvenv doesnt work well for us, because we need to use the flag which allows it to also see the system python12:12
tristankind of obsoleting the advantage of using venv12:12
ssam2yes, i wonder if tox would have the same issue12:12
ssam2they are good if your deps are pure python, but not if you depend on system-installed python packages which can't be obtained from Pip12:13
tristanwhich seems to work for those who live in that `everything is pure python` bubble12:13
tristanso yeah, I expect tox to be in the same pile of trash12:13
persiatox supports non-pure python, but yeah, it's likely not entirely appropriate for BuildStream, as there are many needs for deep system things.12:14
jonathanmawtristan: I'm picking up the bzr-specific changes for https://gitlab.com/BuildStream/buildstream/issues/53, and making sure I've got tests in place for it12:15
jonathanmawmy first implementation of testing it was to add a special case in test_open, so I could reuse their call to open_workspace12:15
jonathanmawbut I'm having second thoughts about it, and I'd rather discuss it now than wait for it to be brought up in review of a merge request12:16
tristanI dont even know what test_open is12:16
tristanjonathanmaw, that said; I'd much prefer more verbose tests, than lines of common code that say `if this_thing is "bzr"`12:17
tristanif that's your question12:17
jonathanmawokie doke12:17
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23312:21
tristanssam2, check out http://buildstream.gitlab.io/buildstream/12:22
ssam2nice, will take a bit of getting used to for people who have memory mapped the existing layout12:23
ssam2but no doubt less daunting for first time readers12:23
tristanI like how all the plugin format docs now show up on the same main page as the core format docs12:24
tristanAnd of course, now there is a sensible place to put more user specific guide-style docs12:25
*** adds68 has quit IRC12:26
* tlater finally knows where to place his doc \o/12:26
ltuI guess !206 still needs to be re-based before merging - https://gitlab.com/BuildStream/buildstream/merge_requests/20612:26
tristanyou really love that bug I know12:27
tristanit's become an obsession :)12:27
ltuyeah...i won't deny it!12:28
tristanltu, frankly I was planning to take an afternoon and just check all the related branches locally and see what parts of it are usable and just massage it into the docs12:29
ltutristan, ok, great12:31
ltumy thoguhts here are about FOSDEM12:32
ltuBetter to go there with really good introductory documentation for newcomers12:32
*** mcatanzaro has joined #buildstream12:48
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23312:50
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23312:54
gitlab-br-botbuildstream: merge request (164-minimise-overlaps-by-having-overlaps-raise-exceptions-unless-configured-not-to->master: Resolve "Minimise overlaps by having overlaps raise exceptions unless configured not to") #181 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/18112:59
tristanjonathanmaw, I was trying to finally merge the above MR 18113:08
tristanjonathanmaw, and found that one thing with a silly illegal `element-path` trying to escape it's project directory13:09
jonathanmawtristan: okie doke13:09
tristanjonathanmaw, but I may make a couple of more cosmetic comments now that I know I cant merge13:09
tristanstylistic I should say13:09
tristanok, yeah that ElementError correction is more than cosmetic too, better fix that13:11
tristanhmmm, looks like this also adds work to the junctions, unless I make jonathanmaw do it properly first13:17
tristanwhere properly means "with knowledge that junctions are coming"13:17
jonathanmawtristan: ok, I'll have a look at doing that. Is there a MR for junctions that I can look at to see how to do it properly?13:23
tristanjonathanmaw, I'm explaining it in the comment as we speak...13:24
tristangimme 3 minutes...13:24
jonathanmaw:) ta13:24
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23313:26
* tlater wonders if there is some sort of a .gitlab-ci.yaml runner that would help testing this - stupid mistakes should not add 20 minutes of idle time :|13:27
tristanjonathanmaw, https://gitlab.com/BuildStream/buildstream/merge_requests/181/diffs#note_5493475613:28
tristanjuergbi, ssam2; since you are both deep massaging junctions into place it seems, you may want to take a look at the above comment too ^^^13:28
tristanProbably we will want to ensure we have a test case post-landing-of-junctions to ensure the overlap-on-error behavior with dependant projects in play behaves as expected13:29
jonathanmawtristan: okie doke13:29
tristanAlright all comments up for that13:40
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23313:54
tlaterEugh, I think it will be neater just to write my own stdout/err redirection than to subclass several pytest internal classes14:04
* persia wonders if it might be worth considering an alternate test harness, if pytest fits so badly14:07
tlaterI looked at some stackoverflow questions asking the same, apparently all others have the same issue14:08
tlater'teeing' is just not something python test library developers think about.14:08
tlaterFor everything else, pytest seems fine, so it would be a bit rough to throw it out over this14:09
persiaReading the overlap review, I wonder if behaviour should differ in cases where overlapped files are identical vs. different14:11
*** tristan has quit IRC14:13
tlaterCoverage is still not correct, it really looks like the unix integration tests just run the wrong buildstream installation14:33
*** tristan has joined #buildstream14:37
tristanpersia, I dont think behavior should differ in case of exact matchliness no14:46
persiatristan: Because the user should understand what is happening if they say "no overlaps", and fix it?14:47
tristanpersia, A.) It's still a case that I want to be told about, if either a warning or error,  B.) It can be whitelisted like anything else,  and C.) It would be quite a performance hit as well14:48
*** ChanServ sets mode: +o tristan14:48
persiaAh, yes, the performance aspect is one that makes more of a difference.  I no longer wonder :)14:49
tristanheh14:49
tlaterI really don't understand why this happens: https://gitlab.com/BuildStream/buildstream/-/jobs/4834393614:50
tlaterThe first set of tests seems to run bst from `/builds/BuildStream/buildstream`, while the second runs them from `/usr/lib/python3.6/site-packages/buildstream`14:50
tlaterAs a result, coverage.py gets confused and misreports coverage14:51
tristantlater, then click on the separate jobs, download the artifacts, and run coverage combine yourself14:51
tristantlater, to be honest I dont understand why the dist would be needed, I suggested you try that because of paths showing up with dist in them14:55
tristanbut really, coverage combine, afaics, should not really need the source code14:56
tristanat all14:56
*** mcatanzaro has quit IRC14:56
*** mcatanzaro has joined #buildstream14:56
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23314:57
tristantlater, it may also be that you added the cd dist/ but failed to adjust the ../../ leading to the .coveragerc below; which is exposing an entirely different bug14:57
tristantlater, i.e. the bug that .coveragerc is not listed in MANIFEST.in afaics14:58
tristani.e. the dist tarball doesnt have the special sauce telling coverage how to match the paths in these reports together14:58
tlaterNo, the .coverage files are copied to the cwd14:58
tristanYou are not reading what I am typing.14:58
tlaterI also did adjust the --rcfile paths14:59
tlaterSo that shouldn't cause this issue - you are right that the .coveragerc isn't in the dist directory though14:59
tristanThat is what I am typing yes, so basically, you are using the .coveragerc from the parent directory (gitlab's checkout)14:59
tristanInstead of the .coveragerc which should be in the dist tarball but is currently missing.15:00
tlaterWould that .coveragerc be different?15:00
* tristan should fix that straight away actually15:00
*** mcatanzaro has quit IRC15:00
tristantlater, the missing .coveragerc would be entirely different15:00
tristanlike 0 bytes and no directory entry different.15:00
tlaterRight, then that is an issue.15:01
*** mcatanzaro has joined #buildstream15:01
tristannope15:01
tristantlater, I cannot explain why, but it seems to be included15:02
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23315:02
* tlater got errors trying to include it from cwd15:02
tristanIt *is* missing from the MANIFEST.in15:02
*** mcatanzaro has quit IRC15:02
tlaterOr maybe I just adjusted it for no reason...15:02
tristanwhen I run ./setup.py sdist here, it ends up in the tarball15:02
*** mcatanzaro has joined #buildstream15:02
tristanMaybe something spooky in the setup.py "automates" it's inclusion; so we can all have the luxury of not knowing what's going on15:03
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23315:03
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23315:03
tlaterThat's nice of setuptools15:04
* tlater still suspects pytest is running the wrong buildstream, though15:04
tristanI would think perhaps something about test_requiring coverage.py causes coverage's internal mumbo jumbo to include it15:05
tristan /usr/lib/python3.6/site-packages/buildstream/_artifactcache/tarcache.py                                     131     21    83.97%15:06
tristantlater, it does indeed seem to choose the installed one15:06
tristantlater, however, we did install it15:06
tristanI dont disagree that it's ambiguous, and in a pytest context should never happen15:07
tlaterEven if we do install it, coverage probably gets confused because the file paths differ15:07
tlaterAnd therefore misreports coverage in the end15:08
tristanfile paths differing over several runs is *entirely* expected15:08
tristanbut you already mentioned that you are aware of that15:08
tristan<tristan> tlater, you are at least familiar with https://gitlab.com/BuildStream/buildstream/blob/master/.coveragerc#L15 right ?15:09
tristan<tlater> Yep15:09
tristan<tristan> okay15:09
tristanJust incase ^^^15:09
tlaterRight, I forgot again15:09
tlaterI guess all I can do is wait for this CI to finish and see if using the coveragerc from the sdist works15:10
tristantlater, no, you can download the artifacts from the job pages on gitlab15:11
tristantlater, and you can modify your local .coveragerc, and tweak it so that it works.15:11
tristanby running it manually15:11
tristanwithout waiting for gitlab to slowly do it15:12
tlaterOh, right, I can adjust the path to also accept /src15:12
tlatero\15:12
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23315:13
tristane.g. download button on the right: https://gitlab.com/BuildStream/buildstream/-/jobs/4834393415:13
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23315:14
tlaterYeah, I just got coverage to complain about paths again15:14
tlaterBut forgot to set the path to the one I have in my image15:14
*** mcatanzaro has quit IRC15:20
*** mcatanzaro has joined #buildstream15:20
*** aidenhjj has quit IRC15:32
tlaterAh15:33
tlaterApparently you need to run 'combine' on both files15:33
tlaterOtherwise it doesn't translate the paths15:33
tlaterWeird that 'report' wouldn't have that functionality15:34
tristanthe path matching happens at combine time15:35
tristanit's what informs combine how to function15:35
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23315:35
tlaterYes, but I *assume* that the `-a` flag is something along the lines of 'append', which means that coverage doesn't translate what is already there15:36
tlaterIt just translates all appended paths to something it considers the default path15:36
tlaterAt least, that's my best guess from playing with it15:36
tlaterWe just happened to always have the default path in the first file we copied15:37
tlaterEither way, I think I have a script that should do it properly now, regardless of what actually was going wrong15:37
* tlater is pretty sure his interpretation is correct after looking at .coverage in various stages of translation15:42
tristantlater, yeah I can imagine that could very well be15:42
*** aiden has joined #buildstream15:51
*** aidenhjj has joined #buildstream15:51
*** aiden has quit IRC15:54
*** aidenhjj is now known as aiden15:56
tlaterFinally, test coverage is exactly the same it was before \o/15:59
tlaterHeh, no, actually .09% higher16:00
tristantlater, it's also somehow racy :)16:00
tristankind of scary and freaky16:00
tristantlater, try manually running a few pipelines on the same commit; get different results16:01
* tlater really hopes this might have changed with the new test runs - though it might have been due to the artifact caching, which we reverted to doing again16:04
tristanwould be nice16:05
tristanbut it's possible that it's racy, and that some few lines of code (probably the very same ones), have time to run or not in a child task16:06
tristanhopefully its not that likely, but I'd have to investigate exactly which lines they were16:06
tristantlater, so it seems that you are probably right about pytest being pretty broken16:24
tristantlater, and we may have to resort to integrating something like tox (uuughhhh, yet another fraking moving part !!!)16:24
tristanat least for the sake of developers running tests on their hosts16:25
persiaJust don't have tox venv, and make sure you point it explicitly at the non-python bits, and it shouldn't be too painfukl.16:25
tristanpersia, I dont compute16:26
persiaI was making suggestions based on my experience fighting with tox, that may or may not apply.  Feel free to ignore.16:26
tristanpersia, for CI, it's trivial enough to ensure the docker image does not ever have buildstream installed16:27
tristanpersia, on a developer's host, there is no such guarantee16:27
tristanpersia, without "extra explicit isolation using venv and/or tox"... python developers seem to think that there is no expectation that pytest; when integrated as recommended by pytest folks, would choose to run the buildstream copy in your checkout16:28
tristanrather than choosing another one randomly sitting in /usr/lib/python${version}/16:28
persiaAh, yes, one would need not to have any version of buildstream actually installed for the tests to work without venv.16:31
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23316:32
persiaBut I thought that using venv made it hard to use some system tooling, and suspected that this might include some of our sandboxing strategies.16:32
persiaI'd be delighted to be mistaken.16:32
tlatertristan: We can resort to following aiden's advice and write a custom import wrapper16:33
tlaterBut that's probably not that much better16:34
tristanpersia, it needs to use the flag that allows including the system installed python libs as well16:40
tlaterWould that not defy the purpose since importing buildstream could still be ambiguous?16:41
tristanpersia, which means the isolation aint perfect like it would be with a pure python program, but probably fine for tests, as it should at least isolate our pure python requirements, including ourself16:41
tristantlater, it should not be ambiguous for that, no; at least not as currently advertised16:42
tristanHowever, since the venv setup installation instructions were a load of bloat; and the isolation was imperfect anyway, it was alright to remove that installation approach from docs I think.16:42
gitlab-br-botbuildstream: merge request (175-refactor-integration-tests->master: WIP: Resolve "Refactor integration tests") #233 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23316:47
tristanAha16:56
tristanjjardon[m], commit dd0d200d370211b18da7978c34962d9b71970b7a seems to have caused https://bugzilla.gnome.org/show_bug.cgi?id=79230217:02
tristanbtw17:02
tristanjjardon[m], cmake -B, is not shorthand for cmake --build17:02
tristanaccording to `cmake --help-full` at least17:03
tristanI'll investigate tomorrow17:03
*** aiden has quit IRC17:10
jjardon[m]tristan: yeah, Its an undocumented feature, juergbi and me discussed about using it in the MR17:11
jjardon[m]uh, the bst git history doesnt have links to the MR's, ie, merge commits?17:12
tristanjjardon[m], you must always specify issue number in commits man17:12
jjardon[m]several times there is not an issue associated to a MR17:13
jjardon[m]any reason to not use merge commits? I think it makes clearer what were the contents of a specific MR17:14
jjardon[m]found it! https://gitlab.com/BuildStream/buildstream/merge_requests/173#note_5014502317:18
jjardon[m]tristan: let me know what you dinf and Im happy to rewrite the patch again17:18
tristandinf ?17:19
persiajjardon[m]: If there isn't an issue associated with an MR, create an issue to justify the MR :)17:20
jjardon[m]persia: agreed, but thats not enforced so references can still be lost: a merge commit will always be there17:21
persiafair17:21
tristanjjardon[m], the referred bug report shows that EDS doesnt build this way, mcrha says he builds it with `cmake --build _builddir`17:21
tristanjjardon[m], the docs for `cmake -B` say that `cmake -B` is to specify a "package directory"17:22
tristanjjardon[m], so it is kind of a mystery to my how cmake even made it that far into the build without failing17:22
tristanbut seems there is a subtle difference, or random similarity, with specifying the -B "package directory" and the --build "build directory"17:22
tristanI dont really understand from the MR comments why -B was chosen over --build17:23
tristanjjardon[m], on the other hand, mchra *also* uploaded an EDS patch to test, because the generated file is not entirely a normal thing17:23
tristanI'm not sure that the suggested patch to EDS should be applied, if we're not using exactly the right semantics to specify a build directory, though.17:24
juergbitristan: -B as package directory is for cpack, not cmake, afaict17:24
tristanUnless, someone can explain with deeper knowledge "Why a cmake package directory can and should be used to specify the build directory implicitly"17:24
jjardon[m]yup, let me work in a patch; do you want me to open an issue?17:24
tristanjuergbi, I only found documentation for -B in `cmake --help-full`, by searching for it17:25
tristanSo you could be right yes17:25
juergbiyes, as jjardon[m] mentioned cmake -B is not documented17:25
juergbibut is available for 15 years17:25
tristanIf -B in place of --build is *in fact* short hand for --build, then we need not really change it17:25
juergbii thought --build was something else, need to recheck17:25
tristanI however tend to prefer the long options in build commands, rather than shorthand17:26
tristanmaybe it's for something else ?17:26
juergbicmake --build is to implicitly execute make or whatever underlying build tool is configured, afaict17:26
juergbiso called 'Build Tool Mode'17:26
juergbinot useful for us17:27
juergbiafaik, there is no long option available that is equivalent to -B17:27
tristanOh I'm wrong about --build17:27
tristanI picked up the wrong comment from mchra17:27
juergbii believe the only other option would be to use 'cd' before cmake17:27
tristanWhat he does is "mkdir _build && cd build && cmake <args>"17:28
tristanAh17:28
tristanOk, we should probably call it an EDS bug in this case, very confusing17:28
* jjardon[m] still prepares an unrelated patch for the cmake build system17:30
jjardon[m]to use ninja instead make :)17:30
tristanjjardon[m], Will that "just work" for every project that uses cmake ?17:32
tristanjjardon[m], or it should probably be optional right ?17:33
jjardon[m]well, gnome-continuous use ninja by default; agreed it should be optional17:33
tristanjjardon[m], I would think; default is make as per the cmake.yaml defaults, controlled by a variable in cmake.yaml17:35
tristanjjardon[m], that can be toggled project-wide anyway in project.conf17:35
tristanseems the safest17:35
tristanso easy to say "all of this project works with cmake + ninja" in one go17:36
jjardon[m]yeah17:36
jjardon[m]actually17:36
jjardon[m]mmm17:36
tristanat that point, if you've done that; and you have one element that doesnt work; the element.bst file itself anyway has the highest priority17:36
tristanso it can be backwards overridden again17:37
jjardon[m]we could use cmakeargs for the configure step but your still need to change the build and install commands17:37
juergbimaybe cmake --build would actually be useful here?17:39
juergbii've never used it, though17:39
tristanprobably cmake --build is a good idea for an initial try in api-unstable master dev branch17:40
tristani.e. try the most elegant thing first; give it time to see if it actually sucks before committing to it in next stable17:41
gitlab-br-botbuildstream: merge request (jonathan/bzr-source-method->master: WIP: Jonathan/bzr source method) #242 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/24217:42
gitlab-br-botbuildstream: merge request (version-read-no-pkg_res->master: WIP: Get version number w/o pkg_resources) #234 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23417:51
gitlab-br-botbuildstream: merge request (sam/integration-tests-alpine->master: WIP: Use a custom base sysroot for the integration tests) #243 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/24318:07
gitlab-br-botbuildstream: merge request (sam/integration-tests-alpine->master: WIP: Use a custom base sysroot for the integration tests) #243 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/24318:14
*** jonathanmaw has quit IRC18:18
*** valentind has joined #buildstream18:53
gitlab-br-botbuildstream: merge request (version-read-no-pkg_res->master: WIP: Get version number w/o pkg_resources) #234 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/23418:54
*** ssam2 has quit IRC18:57
*** ssam2 has joined #buildstream18:59
*** tristan has quit IRC21:11
*** ssam2 has quit IRC22:01
*** ssam2 has joined #buildstream22:14
*** valentind has quit IRC22:25
*** ssam2 has quit IRC23:12
*** persia has quit IRC23:18
*** persia has joined #buildstream23:18
*** persia has quit IRC23:53

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