[08:52] morning [09:01] 👋 [09:02] morning [11:11] Chipaca: 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:14] bthomas: maybe https://github.com/canonical/operator/blob/master/test/test_testing.py#L832 helps? [11:19] Thanks. Works Now. Had to setup "registrypath", "username", "password". [11:20] ¡Muy buenos días a todos! [11:20] hola facubatista [11:21] damm I was trying to race you to good morning [11:21] * facubatista downgraded the nvidia driver, tired of rebooting and hangs [11:21] hola bthomas :) [11:21] This is one reason I only use intel drivers [11:23] Chipaca: Is there a recommended way to test for charm logic that defers events ? [11:24] bthomas: no [12:58] bthomas, can I use intel drivers with nvidia hardware? :p [13:00] :-) [13:03] facubatista: i mean, you can! [13:04] … good luck? [13:04] Chipaca, ... meeting? [13:04] facubatista: can we skip this one? [13:04] knees deep in a review it took me all morning to get into [13:04] Chipaca, yes we can [13:04] thank you [13:10] * bthomas -> lunch [14:04] Chipaca: After harness.add_relation and harness.add_relation_unit framework.model.get_relation(PEER) returns None in the charm. Is this expected behaviour ? [14:24] bthomas: can i see the code? [14:25] Chipaca: https://github.com/canonical/mongodb-operator/blob/master/src/charm.py Please see self.peer_relation initialized in __init__ [14:25] I have not yet pushed test code [14:27] bthomas: i can only assume that the arguments to add_relation and/or add_relation_unit are somehow lacking [14:28] Thanks will dig a bit further. [14:28] bthomas: what's the first arguemnt to add_relation? [14:28] Chipaca: name of peer relation [14:28] bthomas: so, PEER? [14:29] Chipaca: Its expansion "cluster" [14:29] bthomas: and did you pass in a metadata.yaml to harness? [14:29] to Harness() i mean [14:29] or is it picking up the one from the charm itself? [14:30] Chipaca: Isn't metadata.yaml argument to harness optional, because it picks it up from parent directory nif not provided [14:30] yes that is what i am asking [14:30] I 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_data [14:31] meant "only does" [15:54] PR operator#453 opened: Basic goal-state exposure [17:44] Chipaca: 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:46] bthomas: there is no support for it. Should we add a remove_relation_unit? [17:47] del_relation_unit? [17:47] in any case there is no support for it today [17:47] in the harness i mean [17:48] Chipaca: I think that will be useful. Which ever way seems appropriate. [17:49] bthomas: can you file an issue for it? [17:49] Chipaca: doing now [17:49] it might need some care to support add/del/add/del not breaking stuff :) [17:54] Issue operator#454 opened: Facility to test changes when related units depart [17:54] bthomas: thanks [17:55] welcome [17:57] Chipaca: 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] bthomas: 👍 [17:57] i'm going to EOD, now [17:57] ttfn etc 🙂 [17:58] Me too. night night all [17:58] take care [18:12] * facubatista bbl [19:34] * facubatista is back [22:47] * facubatista eods