IRC logs for #buildstream for Tuesday, 2018-02-13

*** tristan_ has joined #buildstream00:27
*** Prince781 has quit IRC00:46
gitlab-br-botbuildstream: issue #250 ("Typo in warning message") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/25000:49
*** tristan has quit IRC01:33
*** mcatanzaro has quit IRC03:17
*** Prince781 has joined #buildstream04:14
gitlab-br-botbuildstream: issue #250 ("Typo in warning message") changed state ("closed") https://gitlab.com/BuildStream/buildstream/issues/25004:50
gitlab-br-botbuildstream: merge request (doc_staging_dir->master: Improve source plugin staging dir doc) #269 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/26904:56
gitlab-br-botbuildstream: merge request (doc_staging_dir->master: Improve source plugin staging dir doc) #269 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/26905:16
gitlab-br-botbuildstream: issue #182 ("Closing non-existing workspace") changed state ("closed") https://gitlab.com/BuildStream/buildstream/issues/18205:19
gitlab-br-botbuildstream: merge request (issue-182_Closing_non-existing_workspace->master: Fix for issue 182 Closing non-existing workspace) #227 changed state ("closed"): https://gitlab.com/BuildStream/buildstream/merge_requests/22705:20
gitlab-br-botbuildstream: issue #181 ("bst build --track-except option can be specified without --track or --track-all") changed state ("closed") https://gitlab.com/BuildStream/buildstream/issues/18105:29
gitlab-br-botbuildstream: merge request (issue-181_bst_build_--track-except->master: Fix for issue #181) #228 changed state ("closed"): https://gitlab.com/BuildStream/buildstream/merge_requests/22805:29
gitlab-br-botbuildstream: merge request (sam/integration-tests-alpine->master: Use a custom base sysroot for the integration tests) #243 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/24305:42
*** Prince781 has quit IRC08:04
*** toscalix has joined #buildstream08:37
*** aday has joined #buildstream08:42
*** tristan has joined #buildstream08:45
*** valentind has joined #buildstream09:14
juergbihi tristan, i'd appreciate your input on a couple of points in !259 (configurable git submodule checkout)09:29
juergbi1) https://gitlab.com/BuildStream/buildstream/merge_requests/259#note_5863776009:29
juergbiwhat key takes priority, i'd be in favor of changing it (i.e., let the most specific config win)09:29
juergbi2) https://gitlab.com/BuildStream/buildstream/merge_requests/259#note_5863862409:29
juergbishall we try and minimize cache key changes or we don't care that much for master?09:29
*** jonathanmaw has joined #buildstream09:35
juergbita09:43
tristanjuergbi, comments up09:43
tristanI should add docs to http://buildstream.gitlab.io/buildstream/buildstream.plugin.html#buildstream.plugin.Plugin.get_unique_key explaining about this09:44
juergbii'd like to avoid combining global 'ignore-submodules' with individual 'checkout' as that can be quite confusing09:44
tristanI thought I did at one point09:44
tristanjuergbi, oh yeah I agree; it's either checkout or ignore all the way09:44
juergbiwe could use ignore in both cases but i generally try to avoid double negative (ignore: false)09:44
tristanmeh, that depends on how you look at it I guess - honestly I dont mind either way09:46
tristanI suggested that because I thought it might help reconcile docs and code09:46
juergbii could definitely also live with 'ignore' as long as it's used all the way09:47
tristancombination of both is certainly horrible yes09:48
juergbii'd keep it as checkout but leave that up to jonathanmaw, if you don't mind much either09:48
tristanI dont really mind, but we should not break cache keys for the sake of added config09:48
juergbiyes, i was also tending in that direction but wasn't sure whether we had a policy on that for master09:49
tristanif it's "checkout" then the cache key remains unaffected by a value of True09:49
jonathanmawjuergbi, tristan: okay, iiuc, I need to change it in two ways:09:51
jonathanmaw1) submodule-level "checkout" config can override source-level (or project-level) config on whether to checkout09:51
jonathanmaw2) these changes shouldn't change the cache keys09:51
juergbicorrect09:51
tristanohhhhh I didnt look at the whole patch09:52
tristanWhy is there a project level config of checkout ?09:52
juergbitristan: it's the generic project.conf configuration of sources, like we already have for elements09:52
tristanThis is supposed to be done in the same manner we have overrides for element types09:52
juergbiit is09:52
tristanAh, awesome09:52
tristanSo that doesnt every come into play09:52
tristani.e. it's not a value to be considered anywhere in code09:53
tristan(that's how I read jonathanmaw)09:53
tristans/every/ever09:53
juergbiyes, it's handled separately, doesn't need to be taken into account for this change09:53
jonathanmawAIUI the project overrides will be completely transparent to the sources, yeah09:53
nexus\o/09:53
tristanexactly yeah :)09:53
tristanso it's all computed in _yaml anyway before the source ever sees it09:54
tristanjonathanmaw, one more thing09:56
tristanjonathanmaw, doc/source/formatintro.rst should be updated for the section describing yaml config priorities09:57
tristani.e. here: http://buildstream.gitlab.io/buildstream/formatintro.html#composition09:57
jonathanmawokie doke09:57
tristanI suppose Element Defaults needs to be changed, those are at the same priority09:58
tristanohhh wait a sec09:58
tristanjonathanmaw, ah right yeah, that would be priority (4) in that list09:59
tristanit says you have another opportunity to override things on a per element basis09:59
tristanthis is already wrong, it's per element-type, but should also be amended to speak of source overrides too09:59
*** ssam2 has joined #buildstream10:08
*** dominic has joined #buildstream10:12
*** valentind has quit IRC10:29
*** jennis has quit IRC10:40
skullmanI'm taking a look at this ruamel integer underscore serialisation issue.11:27
skullmanCurrent progress is I've found the code where it gets done11:27
gitlab-br-botbuildstream: issue #251 ("CI tests not working in other repositories") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/25111:28
juergbiskullman: you're working together with nexus on this?11:29
nexusjuergbi: you just missed him, and kindof11:31
juergbiok, just want to make sure you're coordinating11:32
nexuswhat is the best source of information about why a test failed, what result it got and what it expected?11:32
tristanThe code in the test case11:33
nexusfair enough11:34
paulsherwoodis there a canonical link to the beaver logo?11:39
paulsherwoodand any info about who created it, licence etc?11:39
ssam2https://www.dreamstime.com/royalty-free-stock-images-vector-cartoon-beaver-plumber-wrench-image1616771911:39
ssam2can also be downloaded from https://www.dreamstime.com/royalty-free-stock-images-vector-cartoon-beaver-plumber-wrench-image16167719 (although don't consider that 'canonical')11:40
ssam2i paid them $7 so it's ours to use :-)11:40
paulsherwoodoh, great. which licence applies, then?11:41
ssam2good question11:42
paulsherwood:)11:42
paulsherwoodmaybe we should add the logo to the buildstream documentation, make that the canonical location for bst11:43
ssam2i think it's more a mascot than a logo11:43
ssam2but we could put it in there, yeah11:43
* paulsherwood is thinkgin of tweeting about it11:44
ssam2i'll put some info on the wiki about the license etc. at least11:44
ssam2although I don't know that the website is going to give us a useful one-line description of it...11:44
ssam2must be something i can link to though11:44
ssam2https://www.dreamstime.com/terms.php#royaltyfree11:44
paulsherwoodack11:45
tristanI think it's more of a mascot than a logo too, but he's a cute beaver and it doesnt hurt to put him somewhere visible :)11:46
nexushe is a cute beaver11:47
ssam2i created https://wiki.gnome.org/Projects/BuildStream/Branding11:51
ssam2in terms of 'canonical location for bst', we would do worse than to point people at https://buildstream.gitlab.io/11:56
ssam2currently that just redirects to the documentation11:56
ssam2but it's actually a totally customizable website built from this repo https://gitlab.com/BuildStream/buildstream.gitlab.io11:57
ssam2so it could later become a fully fledged website, or redirect to one11:57
tristanYep, if anyone is up for designing a really nice spiffy and modern website, there is a place for it to live...11:57
jmacCan I specify an ordering for build dependencies? It looks like it's deepest tree first by default.12:00
tristanjmac, it's pre-sorted to be deepest first at load time yes12:03
tristanjmac, *why* ?12:03
*** jennis has joined #buildstream12:04
jmacBecause I want to demonstrate an error which only happens with particular stage ordering12:04
jmaci.e. the order in which artifacts are combined to make the sandbox for a build affects whether sandbox creation breaks12:05
tristanOkay, so you need a combination of elements which cause this to happen12:07
*** tm has joined #buildstream12:38
*** aday has quit IRC12:41
*** aday has joined #buildstream12:42
jmacOK, solved that - it's not a dependency ordering problem12:46
tristan:)12:47
jmacThere is however an implicit build dependency between anything with an integration command and the element that provides 'sh', which I'll add to the documentation to make it clear12:50
*** aday has quit IRC12:53
gitlab-br-botbuildstream: issue #252 ("Print summary of discovered cache keys at end of session.") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/25212:54
paulsherwoodcan we get buildstream.io ?12:58
ssam2appears to be parked: http://www.buildstream.io/13:00
ssam2aka squatted13:00
jmacbuild.stream appears to be available, but expensive13:03
juergbiwe need the .bst TLD ;)13:03
tristanjmac, yeah indeed; we may want to extend that in the future13:08
tristanjmac, one might want integration commands that are direct program invocations, or; for instance rpm allows one to specify the interpretor in which the postinst scriptlets should run13:09
tristanAt least `bst shell -c -- /bin/foo` works without requiring a shell13:09
*** mcatanzaro has joined #buildstream13:10
*** aday has joined #buildstream13:15
jmactristan: Yeah, I was just discussing that with ssam213:25
adds68ssam2, this was the stuff he pinged over, he didn't have much time to write something up so just pinged the pain points: https://paste.codethink.co.uk/?399613:34
ssam2ok, ta13:35
persiaadds68: Could you put that somewhere where we could all see it?13:35
adds68ssam2, i'm not sure how useful they are, just some feedback from a first user etc13:36
ssam2makes sense13:37
adds68persia, https://pastebin.com/id4XSte013:39
persiaadds68: Thanks.13:40
*** aday has quit IRC14:06
*** tristan has quit IRC14:08
*** aday has joined #buildstream14:11
*** tristan has joined #buildstream14:14
*** Benjamin has quit IRC14:19
skullmanok, so ultimately the reason why ruamel's parser mishandles the numbers with underscores, is that it expects _ separators to only be used for separating thousands etc. and it calculates this based on the length of the last sequence of digits, and may have a leading or trailing underscore.14:35
persiaYes, but the key is that in practice a "track" value is a sequence of characters, whereas for many values that may be used, ruamel might choose to interpret as numbers (integer or floating point), which is confusing.14:39
skullmanIt should be possible to monkeypatch or extend RoundTripConstructor and RoundTripRepresenter to override its underscore handling and replace it with something that will records how long each sequence of underscores and digits is14:39
skullmanpersia: I'm aware of that, and ideally we'd say it has to be a string, but I'm told we can't do that because of stability guarantees, and most of the test suite failing if we try that doesn't help14:40
persiaIt must be a string.  Changing the YAML structure to enforce that is something we cannot do.  I'm a fan of the approach of special-casing the parsing to interpret "track" as a string.  Others seem to think that implementations of that are unclean.14:41
nexussadly that still fails the test cases14:42
ssam2have you looked at modifying the test cases ?14:43
nexusssam2: it's a runtime error14:43
nexusnot a failed test14:43
persianexus: The implementation causes them to fail, or the idea causes them to fail?14:43
jmacHow so? Can I see the error?14:43
persiaLast time I looked through failure logs, the problem seemed to be that the implementation broke ruamel because the underlying object changed between uses.14:44
ssam2either the test fails or succeeds, i have no idea what "it's a runtime error" might mean14:44
nexushttps://paste.codethink.co.uk/?399914:44
persianexus: Could you put that somewhere we could all see it?14:44
nexusoops14:44
nexussure 1 min14:45
nexushttps://pastebin.com/Q3a5LrDv14:45
ssam2what's the context of that ?14:45
ssam2it looks like a test fails because there's an unhandled exception somewhere14:45
nexustest_build[zip] one of the tests14:45
jmacbizarre14:45
ssam2the error message seems pretty clear to me14:46
nexusit errors inside the ruamel codebase14:46
persiaBasically, ruamel gets unhappy if the underlying representation changes mid-processing.  The parsing directives have to be sent *before* we read stuff, or we have to use a different set of parsing directives.14:46
tristanerr14:46
skullmanpyyaml had the facility to provide a path-based resolver, but it wasn't well documented, I'll see if I can remember how they work and if they still work in ruamel.14:47
tristanskullman, the bug with `bst track` is only one of the side effects of ruamel.yaml adhering to the YAML 1.1 spec; which states that underscores shalt be ignored14:47
juergbinexus: can you also point to the commit/patch that you used to trigger this?14:47
nexussure one minute14:48
juergbii.e., is this with your original patch (parse ints as strings) or something else?14:48
tristanskullman, that said; what we ultimately want is to avoid this spec quite brutally, so that anything is loaded as only strings (or dicts or lists but you get the meaning)14:48
gitlab-br-botbuildstream: merge request (issue-166_yaml_removing_underscores->master: WIP: Issue 166 yaml removing underscores) #245 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/24514:48
tristanskullman, consider another side effect is that many release tags or even branches have the form "1.2" for instance14:48
nexushttps://gitlab.com/knownexus/buildstream/tree/issue-166_yaml_removing_underscores14:49
persiatristan: The problem with loading everything as strings is that we run into a problem with numjobs.  We could special case numjobs, converting to an integer before using it, of course.14:49
tristanskullman, that means ruamel.yaml will load it as a double/floating point, and then we trust blindly that we dont get rounding errors somewhere and convert back to a string when saving.14:49
persiaActually, special-casing numjobs handling is probably more sensible.14:49
juergbinexus: ah, here you're again dynamically changing the constructor14:49
tristanpersia, you probably mean max-jobs14:49
persiatristan: Yes: my memory is unreliable :)14:49
nexusjuergbi: yes14:49
juergbinexus: always parsing as strings should avoid this exception14:49
tristanpersia, and that is an internal issue; nobody told me exactly what that was; but it should be a non-issue really14:50
nexusit doesnt14:50
juergbipersia: max-jobs is used as variable, i.e., always as string14:50
tristanpersia, it's possible something is accessing that max-jobs without going through the expected _yaml.node_get() code path which is supposed to do the conversion to the desired type14:50
persiajuergbi: In an earlier revision of nexus' patch, everything was parsed as string, and there was an exception about max-jobs, as it wanted a number.14:50
juergbipersia: i assume the issue is that we initialize it as int in the code in a couple of places14:50
tristanso it gets a string there, without asking _yaml.node_get() to produce a number14:50
juergbibut that could easily be changed14:50
persiajuergbi: Precisely.14:50
persiaRight, so I guess the best way is to go back to the original ruamel fix (parse everything as strings), and then fix max-jobs handling internally.14:51
tristanit's also possible that _yaml.node_get() needs to be fixed or touched up to do the right thing once we get the desired unconverted raw strings from ruamel.yaml14:51
tristanif anything is accessing nodes directly, that is anyway a bug14:51
juergbiyes, we probably have to convert to 'expected_type' in node.get14:52
tristanindeed max-jobs is a string anyway14:52
tristan_yaml.node_get() does have a type coercion as I recall, but it may need fixing with this change14:53
persianexus: Do you have a link to the previous merge request (interpret everything as strings)?14:54
* tristan recalls a very cryptic one liner that tells yaml something very mumbo-jumbo-ish :)14:55
nexuspersia: yes14:55
persiatristan: That tells ruamel something mumbo-jumboish, yes.14:55
nexusRoundTripConstructor.add_constructor(u'tag:yaml.org,2002:int', RoundTripConstructor.construct_yaml_str)14:55
nexus^14:55
tristanhaha yeah that's it: u'tag:yaml.org,2002:int'14:56
persianexus: That's not the link to the old merge request.  Could you share that?  The CI report is also interesting.14:57
juergbihttps://gitlab.com/BuildStream/buildstream/commit/b9d878fc4ac479e0db61bd7d42f274c976176d2314:57
nexus^14:57
juergbihttps://gitlab.com/knownexus/buildstream/pipelines/1633434014:57
tristanoh yeah, please fix the whitespace error on line 2614:58
nexusthat gives the same error14:58
nexusthe whole "add_constructor" thing is what causes the "RuntimeError: OrderedDict mutated during iteration"14:58
juergbii just ran this locally and the only test failure i got was14:58
juergbitests/context/context.py::test_context_load_invalid_type FAILED14:58
nexusand i will before submitting tristan :)14:58
persianexus: No.  adjusting it mid-parse is what gives that.  There was a CI run that only failed on max-jobs with the parser adjustment, wasn't there?14:59
nexusi just did a quick patch on my version, so i may have missed somethingh14:59
juergbithe pipeline link i \posted was wrong14:59
juergbinexus: make sure you rebase on top of latest master, the MR is quite a bit behind15:00
persiahttps://gitlab.com/knownexus/buildstream/-/jobs/48575837 has "Error loading pipeline: manual-noparallel-test.bst [line 5 column 2]: Expected 'int' type for configuration 'max-jobs', instead received 'str'", which is the max-jobs issue (which needs to be handled differently)15:01
juergbiright, integration tests are still in progress locally15:03
juergbiok, makes sense. that's because it composites the default (which is an int in Python code) with the custom max-jobs15:04
juergbiand the composition bails out if the types don't match15:04
juergbiso changing max-jobs init to str should fix it15:05
nexusok, got my version back, lets see the damage15:06
nexusjuergbi: where's that?15:07
tristanjuergbi, ahhh indeed, this is nothing to do with _yaml.node_get(), this is dictionary composition; where types are strict15:08
juergbinexus: https://pastebin.com/MxYM2iaU15:08
tristan_yaml.py:73615:08
juergbiwith this all tests pass except the yaml invalid type test but i think we should just remove that15:08
juergbitristan: yes, looks all pretty good now afaict with that patch15:09
persiajuergbi: So those two changes (for max-jobs), plus the blanked ruamel fix does the job?15:09
juergbiat least it passes the test15:09
tristanwhat is the yaml invalid type test ?15:09
juergbiwe may need to check whether --track-save now outputs quotes where it didn't before. if we care about this15:09
* tristan is looking in tests/yaml/yaml.py15:09
juergbitristan: it tests that some-string-key: 3 is rejected15:10
juergbibut as we interpret all based on expected_type now, it won't fail, of course15:10
persiaAdding a artificial --track-save test to replace the yaml-invalid-type test is probably sane.15:10
juergbiit will simply be interpreted as string "3"15:10
* tristan doesnt see where it is15:10
persiaBecause if we are telling ruamel to read everything as strings, there can't be an invalid type (as there is no real type detection)15:10
tristanpersia, but there can15:11
tristanit seems that this test would be better suited the other way around15:11
persiatristan: How?  If everything is a string, isn't everything a string?15:11
tristanpersia, "five" is not a valid int, though15:11
* persia reads the actual test case15:11
persiatristan: yes, but we can't get integers from yaml anymore if we apply the mumbo-jumbo15:11
tristanpersia, from what I understand, this is testing that _yaml.node_get() will abort with the proper errors when a value of an expected type cannot be loaded15:11
tristanpersia, the core cares about the output of _yaml.node_get(), how that works underneath does not change the upper API contract15:12
tristanbut I still dont see the test :-S15:12
* tristan greps for "some-string-key"15:12
* tristan cant find any such test15:14
gitlab-br-botbuildstream: merge request (issue-166_yaml_removing_underscores->master: WIP: Issue 166 yaml removing underscores) #245 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/24515:14
juergbitristan: https://gitlab.com/BuildStream/buildstream/blob/master/tests/context/data/invalidtype.yaml15:15
persiatristan: Test is tests/context/context.py:11915:15
tristancontext!15:15
juergbisorry, it wasn't literal15:15
juergbiyou were missing the context of the test ;)15:15
persiaI really don't think that test adds value with RoundTripConstructor.add_constructor(u'tag:yaml.org,2002:int', RoundTripConstructor.construct_yaml_str)15:15
tristanjuergbi, indeed15:16
juergbithe inverse suggested by tristan makes sense to me15:16
juergbinot sure whether the conversion currently bails out and if it does, whether the error message is sensible15:16
tristanjuergbi, context helps... but yeah I think we set the scheduler fetchers to "twenty-two" or something15:16
tristanthat would preserve the test15:16
persiaChecking to make sure that it isn't an integer?  Yes, that guards against someone removing the parser modification.15:16
juergbipersia: the idea is to test that a field that expects an int rejects non-ints15:17
persiaOh, setting something we plan to convert to an integer to a string?  Yes, that is also a reasonable test.15:17
juergbithe test you just suggested makes indeed sense as well, though15:17
juergbihave 1_2_3 in a yaml file and make sure we can retrieve it as string with the underscores15:18
persiaAn interesting question for things we plan to use as integers, given that they are parsed as strings, are we testing the cast?15:18
juergbitristan's test suggestion would test the cast15:18
persiaI like the 1_2_3 test.  That will help make sure the underlying bug that the suggested fix handles does not return.15:18
tristanpersia, fairly much I believe, but this is one of them15:18
tristanwe probably need an additional one for 1_2_3 and 1.2.315:19
persiaYes.  Both _ and . should be tested.15:19
tristanto guard against regressions of _this_ fix15:19
juergbiyes, we haven't fixed the float case yet, although it should be identical15:19
nexusjuergbi: what tests am i expecting to pass/fail rn?15:28
persianexus: With the blanket roundtripconstructor and juergbi's max-jobs patches, you should have no failures15:29
juergbitests/context/context.py::test_context_load_invalid_type FAILED15:30
juergbithis will fail, nothing else should fail15:30
persiaRather, you should have just the context.py invalidtype failure, which will need new adjustment to fix the cases immediately discussed.15:30
* nexus starts reading backlog15:31
tristancontext.py test_context_load_invalid_type needs to change it's data, to reverse it so that we try to load an int from something that cannot be converted to int15:31
tristanthe tests for 1_2_3 and 1.2.3 are separate things, though15:31
persiatristan: Do you think they belong as tests in context.py, or somewhere else?15:32
tristanThey could go in many different places, maybe a parameterized test added to tests/yaml/yaml.py would be a good place15:32
tristanpersia, well, context.py is testing that the Context object itself bails out when parsing something invalid (this still needs converting to proper `cli` frontend tests, also)15:33
tristanso it's a valid test there; I'm just saying there is no real need to cram these new tests into something "Context specific"15:33
persiaMakes sense.  Let's put the 1.2.3 and 1_2_3 tests in tests/yaml/yaml.py, so they are easier to find :)15:33
tristanyeah I think a single parameterized test which shoots a bunch of data at _yaml.node_get() would cover this well15:34
nexusyep tests/context/context.py:128: Failed15:35
nexusDid we decide on a fix for context?15:54
persianexus: Yes.  Change the invalid yaml to load something in an integer context with something that cannot be cast.  Something like "max-jobs: five"15:57
persiaOr setting the scheduler fetcher count to "twenty-two"16:00
juergbithat's actually a bad example as max-jobs is just a variable and processed as strings16:00
nexusok, i'm likely going to need assistance from someone who's worked with the tests before16:00
juergbifetchers/builders/pushers options should work for this test, though16:00
*** Prince781 has joined #buildstream16:12
jmacIs there such a thing as an optional dependency? I.e. "I can use this as part of the build if available, please include it if it does not cause a circular dependency"16:13
juergbijmac: no, that would be tricky to resolve properly16:13
jmacYes, it would :)16:14
juergbias you may have to schedule build jobs for the same element twice in a single session16:14
juergbiright now you have to create two elements for the same source in that case16:14
jmacThat's fine16:14
juergbiconditionals are supported but you can't include the same element twice (with different options) in a single session16:15
juergbi(unless you use a junction pointing to the same project but let's not go there)16:15
gitlab-br-botbuildstream: issue #232 ("fd leak when generating epiphany tarball") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/23216:19
persiaif one needs two variants of a build, I think having two elements is cleaner, as they presumably serve different purposes.  It would be nice that if tristan's idea about separating the refs from the .bst files was implemented, both elements could use the same index to get the ref.16:20
jmacMy particular case is that I would like to use reprotest as part of the build process for all elements where reprotest can sensibly be available16:21
tristanjmac, this sounds somewhat unwieldy to me; you mean to say that randomizing the build environment in the way reprotest does; requires that you inject something as a dependency into the runtime itself ?16:26
persiaAre there many cases where it cannot be sensibly available?  My initial thought would be to create a base platform that included reprotest, and use that to build everything.16:26
tristanjmac, sounds like reprotest is dealing with the problem of self-hosting bound distros and it makes sense for them; but for BuildStream it means that people need to construct projects in special ways in order to test for reproducibility ?16:27
persiaUnless I misunderstand, the goal is to determine whether an upstream source can be reproducibly built, despite adjustments X, Y, and Z.  If we're testing whether BuildStream can reproduce a reproducible build, I would expect a different approach.16:27
jmactristan: There are two ways of doing this16:27
tristanI'm sure there is a part of the story I'm missing here16:27
jmacYou can either modify buildstream so as to vary the environment in the same way reprotest does,16:28
jmacor you can build reprotest as a buildstream element and then make it part of the build process of any later elements, requiring no change to buildstream16:28
tristanbut requiring users to have some pretty in depth knowledge and manually do the reprotest themselves16:29
jmacNo, not really?16:29
tristanwhich turns the project into a sort of proof of concept; where the deliverable is a blog post saying "Look, you can use BuildStream in this way too !"16:29
tristanWhich, is not a bad thing really16:29
tristanWell, considering the case where you have a bunch of modules, you have a buildstream project which has some branches (production, testing, master, various work branches)16:30
tristanIt means that if you want a reprotest mode, you have to satisfy reprotest's dependencies conditionally (cause you dont want to include reprotest in your firmware...) or perhaps have elements only build-depend on it16:31
jmacYes, you only need it as a build dependency16:31
tristanWell, it's not a bad thing; but it certainly does not amount to a feature afaics16:31
jmacThis is freedesktop-sdk's nano.bst modified to build with reprotest: https://paste.gnome.org/plukvj04i16:32
jmacThe build will fail if not reproducible, but the produced artifact should be identical to the non-reprotest version16:33
tristanI'm not going to be a stickler for these details though, if we dont have a feature that people can use out of the box, it's not really bad16:33
jmacIt's entirely possible to keep reprotest permanently on for all elements, but it will double the build time16:33
tristanPersonally I dont feel like it's something I want to recommend, conditional statements should hopefully not be very many16:34
jmacpersia: The question of whether BuildStream can build reproducibly is trivial to test; I posted to the list about it on 2018-02-0116:35
tristanWe already expect conditionals in some cases where modules need to be informed of target arch if they can't guess it themselves, or when you build multiple outputs16:35
jmacIndeed, I think at the moment all this will be is a set of instructions and example files for running reprotest inside BuildStream if you want to; it might generate some more feedback on how people want to do this.16:36
tristanI mean, people might want to do this, and it's a bit sad that they have to themselves go to the length of understanding reprotest and integrating it into their build with conditional statements to do it16:36
jmacReally, there's no understanding of reprotest required16:36
persiajmac: Yes, and I've pasted the link to the archives of your post in a number of fora: that's why I think the current problem is "test whether a given source can be built reproducibly", rather than "can buildstream build a reproducible build with bit-for-bit identity"16:36
tristanwell, at least you have to understand it's dependencies right ?16:36
tristanAnd how to invoke it16:37
tristanpersia, yes that's the topic we're on16:37
jmacI'll be providing examples for that16:37
jmacThe question of what you do when something isn't reproducible is a lot harder to explain16:38
persiaFix it?16:38
tristanpersia, we are currently setting up a model buildstream project which implements this on the project side; which will be a burden for any project author to implement themselves; if the randomization it does is trivial, it seems illogical to not provide an actual feature if it's really a desirable thing16:38
jmacpersia: Yes.16:38
persiatristan: You mean, reimplement the reprotest variance injection as something that can be defined in project.conf?16:39
tristanpersia, I'm not sure of the details of what it does; but BuildStream dictates already the build environment, if the build could be run with a --reprotest option, we could run the same builds many times with randomized environment vars and such trickery16:41
persiatristan: https://anonscm.debian.org/git/reproducible/reprotest.git/tree/ if you want a quick glance.16:41
tristanso project maintainers could theoretically get this quite for free, without having the tailor projects to use a special piece of software inside their runtime16:41
jmactristan: That's entirely possible, but it requires extracting all the variation options out of reprotest and reimplementing them. I estimated it'd take a lot longer to do it that way.16:42
jmacThe nature of the variations means the means of doing them is often quite "hacky"16:42
persiaTo me, it looks like reprotest needs coverage, pytest, and rstr, assuming we always use --no-diffoscope16:43
tristanI'm seeing it now yeah, pretty smart stuff, i.e. rational variations of TMPDIR etc16:43
persiaCan we just import it, and use the existing code?16:43
ssam2perhaps we could set up a separate project containing reprotest16:43
persiaAdds to buildstream dependencies, but perhaps not that much16:44
ssam2and recommend people import that with a junction in order to use it in their projects16:44
tristanwhich seems rather tricky to implement (but I'm not sure how reprotest could even implement that; doesnt it need to also ensure that TMPDIR points to a filesystem that implements mmap and is writable ?16:44
tristan)16:44
ssam2it would probably pull in a separate base, but as long as that is only a build-time dep, it wouldn't mess up the actual main project's output16:44
persiassam2: Still requires custom build instructions16:44
ssam2agreed16:44
persiassam2: See https://paste.gnome.org/plukvj04i16:44
ssam2but less confusion about having deps in the main project repo that are only there to satisfy reprotest16:44
persiaMy thought was that we would simply consider reprotest a dependency of BuildStream (and so accept transitive dependencies), to enable the feature.16:45
tristanssam2, you need a reprotest in the runtime that you are actually building against, unless you can provide a stock one and run "chroot" as a part of the build, *under* reprotest somehow16:45
persiaThat limits reimplementation to _main_.py, mostly16:45
tristanpersia, that thought sounds like the least likely of any scenario16:45
ssam2hmm, yeah i guess layering one runtime on top of another isn't going to work16:45
tristanpersia, I'm not sure you can import reprotest python and do something useful with that inside buildstream16:46
tristanwell, I highly doubt it16:46
persiatristan: Why not?16:46
tristanpersia, I'm assuming reprotest sets up it's build environment and sandbox etc16:46
tristansounds like direct collision with buildstream codepaths; hey I could be wrong16:47
tristanbut intuitively it sounds like the least likely16:47
persiatristan: Yes, but my thought was to not use those bits, and instead just use the libary bits that reprotest uses.16:47
tristanI dont know; maybe16:47
*** ernestask has joined #buildstream16:48
persiaI feel fairly strongly that the reprotest upstream folk are more motivated than us to develop new sources of variation, etc.  Having a common library of alterations that can affect the sandbox strikes me as useful, as otherwise there is a lot of copy&paste work.16:48
jmacThat was my thought too; BuildStream does a lot to control the build environment and I thought that would clash with reprotest's attempts to do the same16:49
tristanpersia, well, it's plausible that the reprotest folks will be amenable to making it possible if it's not16:49
persiatristan: They are friendly folk.16:49
tristanpersia, seems more like a database of scenarios we'd want to share than a library16:50
tristanyeah I know, I hang out in #reproducible-builds16:50
persiatristan: Maybe, although as far as I can tell, that database currently only exists as python code.16:50
tristanyeah that's a detail; look, someone has to actually read the code and say how amenable the codebase is of this sharing before we can constructively continue down this avenue16:51
tristancurrently jmac knows most afaict16:51
tristanjmac, how would you like to evaluate that road too ? i.e. see if we can reuse parts of reprotest directly, if it's structured in such a way that it might work ?16:52
persiaFair: I'm happy to pre-decide that the conclusion of the discussion should be "whichever is less work" in terms of reimplementation vs. reuse16:52
tristanI mean, my gut tells me it's purposed for it's own thing, also there is the avenue of collaboration16:52
jmactristan: I'd like to do that. I may need to negotiate to get time to do it, though.16:53
tristanjmac, yeah, well persia, ltu and I have a meeting tomorrow, I think that persia might be able to make a call on whether it's worth looking into, considering what we're already doing16:54
tristanpersia, you said you were under the impression that we were using reprotest as a dependency of BuildStream and implementing a feature in BuildStream with it...16:55
tristanpersia, if that's what is mandated, then I suggest we budget the time hehe16:55
persiaDid I?  I thought I said I thought that made sense as a path to achieve the goal.16:55
tristanpersia, I misread you then, "but my thought was ..."16:56
tristandepends on when "was" happened I guess :D16:56
persiaAnyway, I think we've beaten the horse enough :)16:56
tristanyeah16:57
tristanI'm not personally running after the feature also, just raising a flag that this might not be what we're looking for16:57
*** dominic has quit IRC16:58
skullman:¬/ the ruamel path resolver code doesn't work with code known to work with pyyaml, and the pyyaml resolver gave precedence to implicit resolve rules over path based so wouldn't be useable to selectively choose which nodes should be integers anyway unless we were to start from the base parser17:04
persiaIn that case, the "workaround" of informing ruamel to parse everything as strings, and then doing the integer casts ourselves is probably actually the "fix", rather than just a "workaround".17:06
skullmanthat, or fix the integer parsing to preserve underscores17:11
jmacYou still have the decimal point case17:12
* tristan doesnt understand the desire to not just use the original approach, or has not yet understood that there is a problem with the original approach17:13
* juergbi is also not aware of an issue with that approach17:14
tristanI mean; it's clearly breaking the YAML spec17:14
juergbithat would be the case no matter how we implement the fix17:14
tristanBut that is known; we just cannot expect people to enter stuff like `track: "1.2"`17:14
skullmanI'm not up with how buildstring loads yaml, but 1.2.3 would parse as '1.2.3' so stay as a string17:15
tristanexactly17:15
tristanskullman, 1.2 will load as a number, but this is dangerous17:15
tristanskullman, because floating point conversions from and to string format17:15
skullmanI see your concern now.17:16
persia1.2 isn't such an issue.  Versions for things like tex get awkward.17:16
persia(where an additional digit of a trancendental number is added for each new version, in such a way that rounding rewinds history, if you are lucky)17:17
tristanin any case; the initial approach seems logical, load all normal values as strings nips any such problems at the bud17:17
* persia does a bit of research, and is impressed with tex's average of one release each 4 years, as a statement of correctness of the original implementation17:20
*** valentind has joined #buildstream17:20
skullmanlooking at the ruamel code, a 1.2 will round-trip serialisation to and from yaml correctly, but str(ScalarFloat) may produce something else entirely17:21
juergbialso need to support 1.20 (trailing zeroes)17:22
persiaYes.  1.20 != 1.2 only works with strings.17:22
juergbiwhich might be a good test case17:22
skullman>>> from ruamel import yaml17:27
skullman>>> yaml.round_trip_load('1.20')17:27
skullman1.217:27
skullman>>> yaml.round_trip_dump(yaml.round_trip_load('1.20'))17:27
skullman'1.20\n...\n'17:27
persiaInteresting.17:28
jennis When linting https://gitlab.com/BuildStream/buildstream/blob/master/buildstream/_yaml.py#L324 , the argument `indices=[]` is causing a "dangerous-default-value" error17:35
jennisThere is an easy fix to this: `indices=None` as argument and within the function: `if indices is None:     indices = []`17:35
jennisNow this isn't just a 'best practice' issue, I think it will actually effect the functionality of the code, see: https://stackoverflow.com/questions/26320899/why-is-the-empty-dictionary-a-dangerous-default-value-in-python/2632093817:37
juergbijennis: i don't see an actual issue in this particular case (we don't modify that empty list)17:37
juergbihowever, we should still avoid it17:38
juergbiin this case it might even be sufficient to change the default value to None without even adding anything to the function body17:38
juergbiif i haven't missed anything17:38
jennismhmm it's just line 332 that worries me17:39
persiaThe only issue is if someone called the function with "indices=4" in the arguments, it might not fail as soon without being type-guarded.17:39
*** ssam2 has quit IRC17:40
jennisbecause if you have `indices=None`, surely line 332, `if indices:` won't execute...?17:40
*** Prince781 has quit IRC17:41
juergbijennis: empty list is considered False17:41
juergbiso it won't be executed in that case either17:41
juergbiand if indices is left at the default, we don't want to execute that block17:41
jennisis the argument basically saying, take the list indices and if there is no such list, take an empty list...?17:43
juergbiif the caller doesn't specify an argument for the `indices` parameter at all, the default value will be used, in this case []17:44
juergbi(or None after the fix)17:44
jennisahh ok, so I think the fix is better17:45
jennisbut yes, because we're not actually making any changes to indices in the function, both will work...?17:46
gitlab-br-botbuildstream: merge request (juerg/ci->master: .gitlab-ci.yml: Support test execution in other repositories) #273 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/27317:50
juergbijennis: yes17:51
*** jonathanmaw has quit IRC18:10
gitlab-br-botbuildstream: issue #251 ("CI tests not working in other repositories") changed state ("closed") https://gitlab.com/BuildStream/buildstream/issues/25118:17
gitlab-br-botbuildstream: issue #251 ("CI tests not working in other repositories") changed state ("closed") https://gitlab.com/BuildStream/buildstream/issues/25118:17
gitlab-br-botbuildstream: merge request (juerg/ci->master: .gitlab-ci.yml: Support test execution in other repositories) #273 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/27318:17
*** toscalix has quit IRC19:34
*** tm has quit IRC20:59
*** mcatanzaro has quit IRC21:22
*** ernestask has quit IRC21:37
*** aday has quit IRC22:21
*** valentind has quit IRC22:22
*** Prince781 has joined #buildstream23:22

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