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