IRC logs for #buildstream for Tuesday, 2020-09-29

*** tristan has joined #buildstream05:15
*** ChanServ sets mode: +o tristan05:15
gitlab-br-bottristanvb approved MR !2026 (tristan/lazy-provenance->master: Refactor: Lazily instantiate ProvenanceInformation objects) on buildstream https://gitlab.com/BuildStream/buildstream/-/merge_requests/202605:51
tristanGrrrr, I think overrides don't accept links for addressing subprojects07:00
*** benschubert has joined #buildstream07:39
*** santi has joined #buildstream08:41
*** tristan has quit IRC08:52
*** hergertme has quit IRC09:05
*** hergertme has joined #buildstream09:13
*** tristan has joined #buildstream09:23
*** ChanServ sets mode: +o tristan09:23
*** SotK has quit IRC09:30
*** SotK has joined #buildstream09:30
*** phildawson has quit IRC11:43
tristanbenschubert, I don't understand this linting error: https://gitlab.com/BuildStream/buildstream/-/jobs/76275573712:07
tristan"Class 'link_target' has no 'as_str' member (no-member)"12:07
tristanIt's not a mypy, it's pylint, so it's basically, the (cython) LoadElement has a member link_target, which is declared as a ScalarNode in the loadelement.pyi (not sure if that counts for anything besides mypy), and ScalarNode has `as_str()` in node.pyi12:09
tristanyet, pylint wants to whine about it, confusing :-S12:09
tristanbenschubert, anyway of course I'll get to the bottom of it, going for dinner now, just poked you as you might happen to be familiar with the subtleties of cython + pylint12:21
benschuberttristan: let me have a look12:42
*** tristan has quit IRC12:44
benschubertugh, that seems weird. I would need more than a few minutes to understand can try tonight12:45
*** tristan has joined #buildstream13:42
*** ChanServ sets mode: +o tristan13:42
*** tristan has quit IRC13:58
*** benschubert has quit IRC13:59
*** benschubert has joined #buildstream13:59
tomazcan't find this on the help, so maybe exists but it's hidden, do we have a `bst check blah.bst` to just verify that there are no errors on the yml definitions and the build graph is correct, no missing elements?14:28
juergbitomaz: no, but `bst show` is not that far off: https://gitlab.com/BuildStream/buildstream/-/issues/63814:31
tomazhm, ok.14:32
gitlab-br-botjuergbi opened MR !2077 (juerg/push->master: Pull missing artifacts in `bst artifact push`) on buildstream https://gitlab.com/BuildStream/buildstream/-/merge_requests/207715:57
*** santi has quit IRC16:51
*** jward has quit IRC17:37
*** benschubert has quit IRC17:37
*** jward has joined #buildstream17:49
*** benschubert has joined #buildstream18:04
benschubertjuergbi: 'stage_source', does it need the _deterministic_umask() still? Or is that handled by casd now? At https://gitlab.com/BuildStream/buildstream/-/blob/master/src/buildstream/element.py#L155318:25
benschubertIf it is not required, it seems to fix my test_pull_access_right test?18:26
benschubert(it is entered concurrently, and thus does: 'save old umask, set new umask, save 'old (but new)' umask, set new umask, set old umask, set 'old (but new)' umask, #crash18:27
benschubertthat's the sequence of events that makes it fail18:27
benschubertI think we can retire _deterministic_umask except when checking out sources?18:28
benschubert(I'm running the whole test suite to validate this hypothesis. If it works I think I'll make a MR just with this change)18:28
tomazwhen I do  a `bst checkout something.bst` that will checkout the entire build for the element, correct? (if I build a library, the library will be in the checkout)18:30
tomazpeople, I need help on a specific library, QtX11Extras, my source is here. gitlab.com/tcanabrava/kde-build-meta.git18:48
tomazthe problem, when I download and compile the source as specified on the elements.bst, locally, it generates the Qt5X11ExtrasConfig.cmake, and the library18:49
tomazwhen I try to use the element on other element, as depends, cmake complains that it can't find Qt5X11ExtrasConfig.cmake18:49
tomazwhen I `bst checkout qt5/qt5x11extras.bst` , it does not gives me the files I'm looking for18:50
tomaz(no library, no cmake) - I'm not sure I did anything wrong, and this element follows the same spec as the other Qt libraries I did, all of the other ones work.18:51
juergbibenschubert: for staging sources as part of the build job, staging will be virtual/cas without storing any permissions (besides executable bit), so umask should not be relevant. source checkout might indeed be the only place where umask is relevant (although ideal behavior may also not be clear)19:50
juergbiI also can't think of a case where we want the host umask to influence any job code, i.e., maybe setting deterministic umask for the whole scheduler run would make sense19:52
juergbitomaz: yes, checkout will checkout the full artifact (and even runtime dependencies by default, can be disabled with --deps none)19:55
juergbido you see the library/cmake files after `bst checkout` but it's missing when used as a dependency?19:56
juergbior are the files missing in both cases?19:56
benschubertjuergbi: I can try setting it for everything too indeed. I'll try this and update my MR then if that works, thanks!19:56
juergbibenschubert: as it's a race condition, do you have a reliable trigger?19:57
benschubertre-running the test 10 times?19:57
benschubertwhich we could do in the test too (pytest.repeat(10))19:58
benschubertjuergbi: we've got quite a few times where umask is actually taken from the host, though I am not sure why any of this is done20:11
benschubertand concerning the utils.deterministic_umask, it's actually used only once for this staging of source20:11
benschubertwhich goes through casd anyways nowadays20:12
benschubertSo, I'll just remove that call20:12
juergbibenschubert: hm, if I'm reading the code correctly, temp_staging_directory is not really used in that method20:14
juergbiit's assigned to import_dir but import_dir is always reassigned before it's used, afaict20:14
benschubertthat's true20:15
juergbiso import_dir is always a cas-based directory, afaict20:15
benschubertSo... it seems to be an artifact of the past. I'll see if removing all of it makes any test unhappy20:15
juergbihowever, vdirectory may be filebased20:15
benschuberthow so? Isn't is always a "virtual" directory and thus going through casd?20:16
juergbivdirectory is a regular local filesystem path for `bst source checkout` and junctions (in the loader, I want to replace this)20:16
benschubertOr am I missing something?20:16
benschubertright20:16
benschubertbut we're never actually creating it there right?20:17
juergbicreating what?20:17
benschubertthe directory?20:18
benschubertIf I understand correctly, it ends up either:20:18
benschubert- cas based20:18
benschubert- using safe_copy, which should preserve permissions anyways, thus ignoring the umask?20:18
benschubert(or safe_link, which does the same)20:19
juergbiI think that's correct for files. umask might be used for subdirectories, though20:20
juergbihowever, if it is, we should fix the inconsistency20:20
juergbiand actually, preserving permissions is probably a bad idea20:21
juergbias the permissions will typically be 0444 for CAS object files20:21
juergbiand for files with executable bit, we explicitly set it to 0755 in _filebaseddirectory.py20:22
juergbiso lots of inconsistencies that we need to fix20:22
benschubert```20:23
benschubert        if os.path.lexists(old_dir):20:23
benschubert            dir_stat = os.lstat(old_dir)20:23
benschubert            mode = dir_stat.st_mode20:23
benschubert            if stat.S_ISDIR(mode) or stat.S_ISLNK(mode):20:23
benschubert                os.makedirs(new_dir)20:23
benschubert                yield (new_dir, mode)20:23
benschubert            else:20:23
benschubert                raise UtilError("Source directory tree has file where " "directory expected: {}".format(old_dir))20:23
benschubert```20:23
benschubertDirectories are also handled there?20:23
benschubertYeah :/ I'm not sure I grasp the full extent of the changes20:23
benschubertWhat would you recommend as way forward? Removing the umask now and have an issue before bst2.0? Untangle that mess before the scheduler changes?20:24
juergbithat's from utils._copy_directories() which we don't use for CAS -> local filesystem20:24
benschubertRight, but then for cas, -> local, isn't cas the one creating the directories?20:25
benschubertSo it would be unaffected by the umask of BuildStream, since already running as a separate process20:25
juergbino, it's using the FileBasedDirectory.import_files() code path, afaict. which is completely handled in Python to support things like file results with conflicts etc. (even though we don't need it there)20:26
juergbiI don't think removing the deterministic umask context manager in that function makes things worse with regards to overall consistency20:26
juergbiso if the tests pass (without remaining race conditions) with that change, I think that's fine for that branch20:27
juergbiwe should definitely open an issue about this, though, if we haven't already20:27
benschubertSo you'd rather not have this as a separate MR? Ok, then I can do that20:27
benschubertLooking for 'umask', I can't see any issues opened20:28
juergbibenschubert: if it's not necessary to get the tests fixed in your MR, you don't have to include it in your MR at all, imo20:28
benschubertah it's necessary for my MR20:28
benschubertso I'll add it there20:28
benschubertwas just wondering if I should separate20:28
benschubertok, so I'll open an issue for us to validate all our umasks and such before 2.0 tomorrow20:29
juergbithe full fix of these inconsistencies definitely make sense as separate MR. but for the minimal fix for the threaded tests, I'm fine either way20:29
benschubertok!20:29
benschubertthanks a lot20:31
tomazjuergbi: the files are missing in both cases.20:45
tomazon my *local* build:20:45
tomaz~/Downloads/qtx11/qtx11extras-everywhere-src-5.15.1 ⌚ 19:42:0620:45
tomaz$ fd | rg libQt5X11Extras.so20:45
tomazlib/libQt5X11Extras.so20:45
juergbimaybe it's not installing into install-root for some reason20:46
tomazon my *checout*:20:46
tomaz/data/coiso2 ⌚ 21:45:4320:46
tomaz$ fd | rg libQt5X1120:46
tomaz- nothing.20:46
juergbiwith 'local' build you mean a manual build outside BuildStream?20:46
tomazyes, same tarball, but outside of buildstream.20:46
juergbitomaz: what about other qt libraries in the same buildstream project? qtbase etc. are fine?20:48
juergbiah, qtbase is not a qmake element20:48
juergbihave you built any other qmake elements and checked those or might it be a general issue with qmake elements?20:49
tomazI haven build all the KDE5 elements on the kf5/ folder, at least one of them depend on qt5wayland, and that works.20:50
tomaz(all of the elements besides 2 that depends on Qt5X11Extras)20:50
tomazthe definition for QtWayland is here: https://gitlab.com/tcanabrava/kde-build-meta/-/blob/master/elements/qt5/qtwayland.bst20:50
tomazthe definition for Qt5X11Extras is here: https://gitlab.com/tcanabrava/kde-build-meta/-/blob/master/elements/qt5/qtx11extras.bst20:51
tomazvirtually identiccal20:51
tomazquestions (because I'm too tired to stay on the computer now) - how do I check (or where do I check) the build inside `bst shell qt5x11extras` - the folder that I go when the command finishes is empty.20:52
juergbitomaz: do you see any files in the qtx11extras checkout (with --deps none)?20:52
tomazsec.20:52
tomazno, empty folder.20:53
juergbiif the artifact is empty, both checkout and shell directory will be empty20:53
juergbithe build log of qtx11extras may provide some insight20:53
juergbiespecially the install part. is it installing into the proper directory?20:53
tomazhow do I get the log? I'm running `bst build qt5/qt5x11extras.bst` again, but it finalizes without errors.20:54
tomaz      cached aad759f8f4484747e56e95d5f2dfbb2bdc6b6a93e6c1c781d10334a517727721 qt5/qtx11extras.bst20:54
tomazbut empty cache20:55
benschubertyou can run bst artifact log qt5/qt5x11extras.bst to get access to the logs20:55
tomazthanks.20:55
juergbiI think that's not available yet in bst 1.x20:55
benschubertah right20:55
benschubertsorry, been too long in 2.0 land20:55
tomazyeah, bst 1.5.1 here.20:55
juergbicheck ~/.cache/buildstream/logs/kde/...20:55
tomazhow can remove the cached artifact (1.5x) in a way that's not grepping for the hash of the artifact in the folder?21:01
tomazbecause the "build" logs are currently misleading: make[1]: Nothing to be done for 'install'.21:02
tomazso I'll try to nuke the build folder, try to build from scratch, perhaps it was a `ctrl + c` on the wrong time that broke things.21:03
juergbiI don't think there is an end user command in 1.x for artifact removal21:03
juergbimaster has it21:03
tomazthere's also not a way for me to `--ignore-cached-files` nor `--force-rebuild`, it seems.21:04
juergbithere is a directory per element for the artifact references21:04
juergbimanually deleting all references of an element is the simplest way to delete an artifact (reference) in 1.x21:05
gitlab-br-botBenjaminSchubert approved MR !2077 (juerg/push->master: Pull missing artifacts in `bst artifact push`) on buildstream https://gitlab.com/BuildStream/buildstream/-/merge_requests/207721:05
juergbias you can just delete that directory21:05
juergbi.cache/buildstream/artifacts/PROJECT/ELEMENT, iirc21:05
tomazyeah, and I have a 5400 rpm disk, just doing find . -name "hash" is taking more than 5 minutes to return21:05
juergbiyou shouldn't need ot search for the hash for this21:06
tomazmy artifacts folder does not have a PROJECT/ELEMENT, it has a cas/ extract/ tmp/21:06
juergbiah, does it have PROJECT/ELEMENT in cas/refs/heads/21:07
juergbi?21:07
juergbiit's been a while since 1.x21:07
tomazyeah, just deleted.21:07
tomazbut deleting it made nothing, running bst build just returned that it was cached21:08
juergbiand it didn't pull the artifact, did it?21:08
tomaz[00:00:06][][] SUCCESS Build21:08
tomazPipeline Summary21:08
tomaz  Total:       21621:09
tomaz  Session:     021:09
tomaz  Pull Queue:  processed 0, skipped 0, failed 021:09
tomaz  Fetch Queue: processed 0, skipped 0, failed 021:09
tomaz  Build Queue: processed 0, skipped 0, failed 021:09
tomazI"m exausted, I'll gather all of the information I can and continue tomorrow.21:09
tomazjuergbi: thanks for trying to help :)21:09
juergbiok. yw21:10
tomaztomorrow I"ll try again.21:10
juergbiit's a bit difficult remembering the bst 1.x details21:10
tomazjuergbi: I understand, the problem is that bst2 is not released yet :)21:10
juergbiindeed21:10
tomazso I can't depend on it for kde-build-meta (nor freedesktop-sdk)21:10
tomazand those missing commands (--refresh-build, --delete) are something that I'm missing.21:11
juergbiunderstandable21:13
benschubertjuergbi: https://gitlab.com/BuildStream/buildstream/-/merge_requests/1982/diffs?commit_id=3ef6795779cd1f8d5c6daef063a81a6a254b525b does that seem correct to you?21:18
benschubertI've ran the test a dozen of time and didn't have any problem21:18
juergbiok, looks reasonable to me21:20
benschubertthanks! I'll tackle the asserts tomorrow/end of week so we might finally get that one in21:25
*** lchlan has quit IRC21:52
*** jjardon has quit IRC21:52
*** jward has quit IRC21:52
*** lchlan has joined #buildstream21:53
*** jjardon has joined #buildstream21:55
*** ChanServ sets mode: +o jjardon21:55
*** jward has joined #buildstream21:55
*** jjardon has quit IRC21:56
*** jjardon has joined #buildstream21:57
*** ChanServ sets mode: +o jjardon21:57

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