/srv/irclogs.ubuntu.com/2020/08/14/#smooth-operator.txt

mupPR operator#375 opened: first pass at getting travis to do a windows run <Created by chipaca> <https://github.com/canonical/operator/pull/375>09:52
facubatista¡Muy buenos días a todos!11:09
ChipacaFACUBATISTA: HELLO FROM WINDOWS11:22
Chipaca:-D11:22
* Chipaca not really in windows11:23
facubatistaChipaca, ah, I was about to ask you if needed to be rescued11:23
Chipacafacubatista: https://travis-ci.org/github/canonical/operator/builds/717875138 tho11:23
facubatistaugh11:25
Chipacafacubatista: :)11:25
facubatistaChipaca, let's talk about terminals? You know way more than I about those, and I need some direction here...11:26
Chipacai just wish i could trigger them directly instead of having to go me → github → travis11:26
Chipacafacubatista: shoot11:26
facubatistaho?11:26
facubatista1:1?11:26
Chipacafacubatista: 1 sec11:29
Chipacafacubatista: 1:111:31
Chipacafacubatista: https://github.com/paramiko/paramiko/blob/master/demos/interactive.py11:50
facubatistaoooohhh11:57
facubatistawow Copyright (C) 2003-200711:57
Chipacafacubatista: the termios stuff is because of the echo issue i mentioned (which was 'details' also)11:58
Chipacafacubatista: but, well, that's probably what we need11:58
* facubatista brb12:21
* facubatista is back13:19
* Chipaca lives13:19
bthomasstandup ?13:30
Chipacanah13:32
Chipaca:-13:32
Chipaca:-p13:32
bthomasChipaca: https://www.scivision.dev/python-calling-python-subprocess/13:58
Chipacabthomas: yep, it's quite likely that's at least part of it13:59
Chipacabthomas: thank you13:59
narinderguptaChipaca, 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:00
mupPR operator#376 opened: Move test_model to use Harness for resource, pod-spec tests <Created by chipaca> <https://github.com/canonical/operator/pull/376>14:24
facubatistajustinclark, Chipaca, I replaced relativise content by doing pathlib.Path(os.path.relpath(dst, src.parent)) and it worked! thanks!14:28
facubatistamy question is if I should leave those tests, or also just remove them14:29
facubatista(and kill relativise itself)14:29
Chipacai don't understand how14:29
Chipacabecause i ran those things and got those results14:29
Chipacahmm14:29
facubatistaChipaca, let's dig and reproduce, it may be some obscure thing that we better find now14:30
Chipacai'm definitely getting ../..... things now14:31
Chipaca¯\_(ツ)_/¯14:31
ChipacaI blame justinclark14:31
Chipacahe changed all the pythons everywhere just to prove his point14:31
Chipacathat's clearly the only reasonable possibility14:32
justinclarkHaha 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
justinclarkI tested with 3.814:33
Chipaca>>> os.path.relpath(str(dst), str(src.parent))14:34
Chipaca'../../baz1/baz2/baz3/dst.txt'14:34
Chipaca^ python 3.514:34
Chipaca(you need to str() the pathlibs, but other than that it works)14:35
facubatistajustinclark, for our case they always have a common ancestor, as they must be inside the projects dir14:35
facubatistaChipaca, that result for which values of dst and parent?14:35
Chipacafacubatista: in linux they'll always have a common ancestor ('/') :)14:36
Chipacawindows might be more fun14:36
Chipacafacubatista: the same ones justinclark used in https://github.com/canonical/charmcraft/pull/118#discussion_r47060433514:36
mupPR charmcraft#118: Some changes in preparation for big "include everything but jujuignored" branch <Created by facundobatista> <https://github.com/canonical/charmcraft/pull/118>14:36
facubatistaChipaca, 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 tests14:39
facubatistapushed14:40
Chipacafacubatista: you mean leave the function but it's just that line?14:40
facubatistayeap14:40
facubatistathe separated function, with the tests, being that function just that ugly line14:41
justinclarkApproved14:42
justinclarkagreed - probably good to be safe and keep the tests for windows..14:44
* Chipaca ⇝ physio15:16
Chipacabbl to carry on porting fake_script to fake_pyscript15:17
Chipacathe windows test suite read like a edgelord greentext17:06
Chipacathey're all REEEEEEE17:06
facubatistajajaja17:16
facubatistaChipaca, justinclark, jam, dstathis, https://github.com/canonical/charmcraft/pull/112 is ready for review17:24
mupPR charmcraft#112: Include everything but what is explicity ignored to Juju <Created by facundobatista> <https://github.com/canonical/charmcraft/pull/112>17:24
facubatista(thanks)17:24
justinclarkTaking 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:35
facubatistajustinclark, exactly! thanks17:39
facubatistaballot, 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 , thanks17:39
facubatistaChipaca, ^17:39
dstathisI'm having some issues with the operator tests17:43
dstathisWhen I run them, I'm getting 18 errors17:43
dstathisactually I think I figured it out17:46
facubatistadstathis, show us in a pastebin how you're running the tests and the errors you get17:46
dstathisall the errors have the message 'yaml does not have libyaml extensions, using slower pure Python yaml' somewhere in them17:47
dstathisso I'm guessing that's the problem17:47
facubatistadstathis, try doing 'apt build-dep python3-yaml'17:51
dstathisI needed to install libyaml-dev which I had already done. The tricky bit was I needed to reinstall pyyaml with --no-cache-dir17:54
justinclarkI noticed that log message in the `ops.main` package ^ https://github.com/canonical/operator/blob/55158e3d1963106702222454c1cb8912c30dd077/ops/main.py#L30217:55
justinclarkIs there actually a "slower pure Python yaml loader" being used somewhere?17:55
facubatistadstathis, looks like this is a good thing to annotate in the README, would you propose a PR for that? thanks17:57
mupPR operator#377 opened: change fake_script so it always creates python scripts <Created by chipaca> <https://github.com/canonical/operator/pull/377>18:01
Chipacasiiiiigh18:02
Chipacajustinclark: 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 slower18:04
Chipacalike 40× slower18:04
Chipacathus the warning18:04
Chipacabut my melancholy sigh is because the fake_script PR is nasty, not because of yaml :)18:05
Chipacabut anyway, I'm at EOW18:05
justinclarkOh I see. Thanks Chipaca18:05
Chipacajustinclark: no probs! have a good one18:06
mupIssue operator#378 opened: Docstyle for `ops` is Google doc style but parsed with Sphinx <Created by justinmclark> <https://github.com/canonical/operator/issues/378>18:14
mupPR operator#379 opened: Assume version 0.0.0 if JUJU_VERSION is not set <Created by dstathis> <https://github.com/canonical/operator/pull/379>18:22
mupPR operator#380 opened: Add info about fixing pyyaml in README.md <Created by dstathis> <https://github.com/canonical/operator/pull/380>18:37
ballotfacubatista: Ack thanks. I didn't know for the docstring vs "pass", TIL !19:47
facubatistaballot, :)19:48
ballotfacubatista: 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
facubatistaballot, ah, yes, in the prehistory it was mandatory19:48
ballotfacubatista: prehistory is actually daily lives on some software, sadly :/19:49
ballotfacubatista: especially when you have to support ... centos 619:49
facubatistaugh19:49
ballotoh well that's behind me now19:49
facubatistaright, charms are py3 only19:49
facubatista>=3.519:49
ballotyup19:49
ballotWill adapt accordingly next time I have to touch the charm19:50
facubatistaballot, thanks!19:54
justinclarkfacubatista: 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
mupPR charmcraft#112: Include everything but what is explicity ignored to Juju <Created by facundobatista> <https://github.com/canonical/charmcraft/pull/112>21:12
facubatistajustinclark, that issue, but note that inside that issue a discourse page is linked21:13
facubatistathat maybe will provide more context21:13
facubatistathe 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:14
justinclarkI 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 saying21:18
justinclarkBut that gives me plenty to work with ^ thanks facubatista21:22
facubatistajustinclark, ah, right, it's linked in the issue, not in the PR21:26
facubatistathere I linked the issue to the PR21:27
* facubatista eods and eows now21:27
facubatistasee you all on Tuesday!21:27
justinclarkHave a good holiday weekend!21:35

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