[09:52] PR operator#375 opened: first pass at getting travis to do a windows run [11:09] ¡Muy buenos días a todos! [11:22] FACUBATISTA: HELLO FROM WINDOWS [11:22] :-D [11:23] * Chipaca not really in windows [11:23] Chipaca, ah, I was about to ask you if needed to be rescued [11:23] facubatista: https://travis-ci.org/github/canonical/operator/builds/717875138 tho [11:25] ugh [11:25] facubatista: :) [11:26] Chipaca, let's talk about terminals? You know way more than I about those, and I need some direction here... [11:26] i just wish i could trigger them directly instead of having to go me → github → travis [11:26] facubatista: shoot [11:26] ho? [11:26] 1:1? [11:29] facubatista: 1 sec [11:31] facubatista: 1:1 [11:50] facubatista: https://github.com/paramiko/paramiko/blob/master/demos/interactive.py [11:57] oooohhh [11:57] wow Copyright (C) 2003-2007 [11:58] facubatista: the termios stuff is because of the echo issue i mentioned (which was 'details' also) [11:58] facubatista: but, well, that's probably what we need [12:21] * facubatista brb [13:19] * facubatista is back [13:19] * Chipaca lives [13:30] standup ? [13:32] nah [13:32] :- [13:32] :-p [13:58] Chipaca: https://www.scivision.dev/python-calling-python-subprocess/ [13:59] bthomas: yep, it's quite likely that's at least part of it [13:59] bthomas: thank you [14:00] Chipaca, I am looking for method to get IP address o pod . I am trying this one self.model.get_binding("").network.ingress_address but there is no binding exist in the kubernetes and it complains ops.model.ModelError: b'ERROR no binding name specified\n' [14:24] PR operator#376 opened: Move test_model to use Harness for resource, pod-spec tests [14:28] justinclark, Chipaca, I replaced relativise content by doing pathlib.Path(os.path.relpath(dst, src.parent)) and it worked! thanks! [14:29] my question is if I should leave those tests, or also just remove them [14:29] (and kill relativise itself) [14:29] i don't understand how [14:29] because i ran those things and got those results [14:29] hmm [14:30] Chipaca, let's dig and reproduce, it may be some obscure thing that we better find now [14:31] i'm definitely getting ../..... things now [14:31] ¯\_(ツ)_/¯ [14:31] I blame justinclark [14:31] he changed all the pythons everywhere just to prove his point [14:32] that's clearly the only reasonable possibility [14:33] Haha it could have been a python version thing? I'm also not sure what happens if two paths don't contain a common ancestor. [14:33] I tested with 3.8 [14:34] >>> os.path.relpath(str(dst), str(src.parent)) [14:34] '../../baz1/baz2/baz3/dst.txt' [14:34] ^ python 3.5 [14:35] (you need to str() the pathlibs, but other than that it works) [14:35] justinclark, for our case they always have a common ancestor, as they must be inside the projects dir [14:35] Chipaca, that result for which values of dst and parent? [14:36] facubatista: in linux they'll always have a common ancestor ('/') :) [14:36] windows might be more fun [14:36] facubatista: the same ones justinclark used in https://github.com/canonical/charmcraft/pull/118#discussion_r470604335 [14:36] PR charmcraft#118: Some changes in preparation for big "include everything but jujuignored" branch [14:39] Chipaca, justinclark, considering that in windows this can be tougher, and that the line it's not super small (`pathlib.Path(os.path.relpath(str(dst), str(src.parent)))`) I'll leave the 'relativise' function with the tests [14:40] pushed [14:40] facubatista: you mean leave the function but it's just that line? [14:40] yeap [14:41] the separated function, with the tests, being that function just that ugly line [14:42] Approved [14:44] agreed - probably good to be safe and keep the tests for windows.. [15:16] * Chipaca ⇝ physio [15:17] bbl to carry on porting fake_script to fake_pyscript [17:06] the windows test suite read like a edgelord greentext [17:06] they're all REEEEEEE [17:16] jajaja [17:24] Chipaca, justinclark, jam, dstathis, https://github.com/canonical/charmcraft/pull/112 is ready for review [17:24] PR charmcraft#112: Include everything but what is explicity ignored to Juju [17:24] (thanks) [17:35] Taking a look facubatista. This one will take a bit longer for me to wrap my head around. Even if someone beats me to it, I'm sure it'll still be a good exercise. [17:39] justinclark, exactly! thanks [17:39] ballot, I just annotated a couple of minor details in https://code.launchpad.net/~ballot/charm-k8s-mm-pd-bot/+git/charm-k8s-mm-pd-bot/+merge/388497 , thanks [17:39] Chipaca, ^ [17:43] I'm having some issues with the operator tests [17:43] When I run them, I'm getting 18 errors [17:46] actually I think I figured it out [17:46] dstathis, show us in a pastebin how you're running the tests and the errors you get [17:47] all the errors have the message 'yaml does not have libyaml extensions, using slower pure Python yaml' somewhere in them [17:47] so I'm guessing that's the problem [17:51] dstathis, try doing 'apt build-dep python3-yaml' [17:54] I needed to install libyaml-dev which I had already done. The tricky bit was I needed to reinstall pyyaml with --no-cache-dir [17:55] I noticed that log message in the `ops.main` package ^ https://github.com/canonical/operator/blob/55158e3d1963106702222454c1cb8912c30dd077/ops/main.py#L302 [17:55] Is there actually a "slower pure Python yaml loader" being used somewhere? [17:57] dstathis, looks like this is a good thing to annotate in the README, would you propose a PR for that? thanks [18:01] PR operator#377 opened: change fake_script so it always creates python scripts [18:02] siiiiigh [18:04] justinclark: if you 'pip install yaml' (as opposed to apt install), and don't have the libyaml bits, you'll use a pure-python one which can be significantly slower [18:04] like 40× slower [18:04] thus the warning [18:05] but my melancholy sigh is because the fake_script PR is nasty, not because of yaml :) [18:05] but anyway, I'm at EOW [18:05] Oh I see. Thanks Chipaca [18:06] justinclark: no probs! have a good one [18:14] Issue operator#378 opened: Docstyle for `ops` is Google doc style but parsed with Sphinx [18:22] PR operator#379 opened: Assume version 0.0.0 if JUJU_VERSION is not set [18:37] PR operator#380 opened: Add info about fixing pyyaml in README.md [19:47] facubatista: Ack thanks. I didn't know for the docstring vs "pass", TIL ! [19:48] ballot, :) [19:48] facubatista: for the index in fir format style, that's a rule from job -1. It was really really really frowned upon to NOT use index there because we had to support python 2.6 and I guess the habit stuck with me :) [19:48] ballot, ah, yes, in the prehistory it was mandatory [19:49] facubatista: prehistory is actually daily lives on some software, sadly :/ [19:49] facubatista: especially when you have to support ... centos 6 [19:49] ugh [19:49] oh well that's behind me now [19:49] right, charms are py3 only [19:49] >=3.5 [19:49] yup [19:50] Will adapt accordingly next time I have to touch the charm [19:54] ballot, thanks! [21:12] facubatista: is there an issue or discussion somewhere that gives context to https://github.com/canonical/charmcraft/pull/112? I think that would help me understand what's going on. [21:12] PR charmcraft#112: Include everything but what is explicity ignored to Juju [21:13] justinclark, that issue, but note that inside that issue a discourse page is linked [21:13] that maybe will provide more context [21:14] the bottom line is: what should go inside a charm? we started nickpicking some specific parts (the charm, metadata.yaml, etc), but experience proved that people want more stuff in... so, what should we include? we ended up deciding "everything that is not being ignored by juju" [21:18] I might be blind.. Is there a linked issue in that PR? I see https://github.com/canonical/charmcraft/issues/39 which seems related to what you're saying [21:22] But that gives me plenty to work with ^ thanks facubatista [21:26] justinclark, ah, right, it's linked in the issue, not in the PR [21:27] there I linked the issue to the PR [21:27] * facubatista eods and eows now [21:27] see you all on Tuesday! [21:35] Have a good holiday weekend!