/srv/irclogs.ubuntu.com/2020/11/18/#smooth-operator.txt

bthomasmorning08:52
Chipaca👋09:01
bthomasmorning09:02
bthomasChipaca: I am currently patching/mocking the OCI image fetch call for tests. I noticed harness has "add_oci_resource". I tried to use it instead of mocking. I could not get it to work for the use case of just providing a image name that is then injected into a pod spec. Am I misunderstanding its use case ?11:11
Chipacabthomas: maybe https://github.com/canonical/operator/blob/master/test/test_testing.py#L832 helps?11:14
bthomasThanks. Works Now. Had to setup "registrypath", "username", "password".11:19
facubatista¡Muy buenos días a todos!11:20
bthomashola facubatista11:20
bthomasdamm I was trying to race you to good morning11:21
* facubatista downgraded the nvidia driver, tired of rebooting and hangs11:21
facubatistahola bthomas :)11:21
bthomasThis is one reason I only use intel drivers11:21
bthomasChipaca: Is there a recommended way to test for charm logic that defers events ?11:23
Chipacabthomas: no11:24
facubatistabthomas, can I use intel drivers with nvidia hardware? :p12:58
bthomas:-)13:00
Chipacafacubatista: i mean, you can!13:03
Chipaca… good luck?13:04
facubatistaChipaca, ... meeting?13:04
Chipacafacubatista: can we skip this one?13:04
Chipacaknees deep in a review it took me all morning to get into13:04
facubatistaChipaca, yes we can13:04
Chipacathank you13:04
* bthomas -> lunch13:10
bthomasChipaca: After harness.add_relation and harness.add_relation_unit framework.model.get_relation(PEER) returns None in the charm. Is this expected behaviour ?14:04
Chipacabthomas: can i see the code?14:24
bthomasChipaca: https://github.com/canonical/mongodb-operator/blob/master/src/charm.py Please see self.peer_relation initialized in __init__14:25
bthomasI have not yet pushed test code14:25
Chipacabthomas: i can only assume that the arguments to add_relation and/or add_relation_unit are somehow lacking14:27
bthomasThanks will dig a bit further.14:28
Chipacabthomas: what's the first arguemnt to add_relation?14:28
bthomasChipaca: name of peer relation14:28
Chipacabthomas: so, PEER?14:28
bthomasChipaca: Its expansion "cluster"14:29
Chipacabthomas: and did you pass in a metadata.yaml to harness?14:29
Chipacato Harness() i mean14:29
Chipacaor is it picking up the one from the charm itself?14:29
bthomasChipaca: Isn't metadata.yaml argument to harness optional, because it picks it up from parent directory nif not provided14:30
Chipacayes that is what i am asking14:30
bthomasI suspect this may not be a bug but a concequence of when the charm class is constructed during the test. Since my test on does set_leader, add_relation, add_relation_unit, update_relation_data14:30
bthomasmeant "only does"14:31
mupPR operator#453 opened: Basic goal-state exposure <Created by justinmclark> <https://github.com/canonical/operator/pull/453>15:54
bthomasChipaca: Is there a specific way to remove a related unit in the testing harness ? Or is this just a question of triggering a relation departed event with the unit name as event data ?17:44
Chipacabthomas: there is no support for it. Should we add a remove_relation_unit?17:46
Chipacadel_relation_unit?17:47
Chipacain any case there is no support for it today17:47
Chipacain the harness i mean17:47
bthomasChipaca: I think that will be useful. Which ever way seems appropriate.17:48
Chipacabthomas: can you file an issue for it?17:49
bthomasChipaca: doing now17:49
Chipacait might need some care to support add/del/add/del not breaking stuff :)17:49
mupIssue operator#454 opened: Facility to test changes when related units depart <Created by balbirthomas> <https://github.com/canonical/operator/issues/454>17:54
Chipacabthomas: thanks17:54
bthomaswelcome17:55
bthomasChipaca: If feeling better, I will ping jldev tomorrow and see if I can work on this issue in operator framework, at least temporarily. Mongodb is in reasonably good shape and I can return to it soon after.17:57
Chipacabthomas: 👍17:57
Chipacai'm going to EOD, now17:57
Chipacattfn etc 🙂17:57
bthomasMe too. night night all17:58
Chipacatake care17:58
* facubatista bbl18:12
* facubatista is back19:34
* facubatista eods22:47

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