/srv/irclogs.ubuntu.com/2020/01/17/#juju.txt

lucidoneHow would I log from a k8s charm using the operator framework? (So that the logs show up in the pod logs e.g kubectl -n test-k8s logs -f test-charm-operator-0)00:53
lucidoneIs that something debugf in ops/main.py will handle (function definition is currently just 'pass')00:55
lucidoneAh scratch that, looks like print() does show up in logs - a separate issue meant that chunk of code wasn't getting hit :)01:02
thumperHere is a relatively boring PR for someone: https://github.com/juju/juju/pull/1112402:10
thumperlucidone: oh, I don't know if we have any way to write into the pod logs02:11
thumperwallyworld, kelvinliu: do you know?02:11
thumperlucidone: we have a juju-log command that has things show up in the juju debug-log02:11
thumperbut I don't know if there is a specific one for the pod log02:11
wallyworldyou can also use kubectl log02:11
thumperwallyworld: from the charm?02:11
wallyworldnot really02:11
wallyworldkubectl is for outside the cluster02:12
thumperwallyworld: do you think that we should have juju-log commands for k8s models go into the pod log?02:12
evhanI think just writing to stdout does the right thing.02:12
wallyworldthey do go to pod log02:12
wallyworldthe juju logs to go both the k8s log and the juju log02:13
kelvinliudidn't find a juju-log helper method, but you can do this https://github.com/canonical/operator/blob/dd2a0d4537ff9ef2f19354a3fd7a9598e4b4c076/ops/model.py#L60502:15
evhanlucidone: For debug-log you can use charmhelpers.core.hookenv.log from https://pypi.org/project/charmhelpers/, works fine with operator.02:30
evhanIn case it hasn't been reported elsewhere, https://discourse.jujucharms.com is down from here.02:30
wallyworldseems to be back now02:45
tlmlast job!!!!02:46
wallyworldwhoot02:47
tlmi have run them all seperate wallyworld like we discussed to avoid the wait02:48
wallyworldtlm: i'm still seeing red dots?02:49
tlmyeah that was the job from this morning02:49
tlmif you click through you can see the latests ones02:49
tlmno way to re run something in jenkins and have latest result trickle up02:50
wallyworldah, didn't realise that02:50
tlmbut02:50
tlm2.7.1 is released02:50
tlmI think02:50
wallyworldtlm: snap store thinks so!02:51
wallyworldi'll check simplestreams also02:51
tlmparty time02:51
wallyworldand we should check the ppa manually too02:51
wallyworldusing apt query blah02:51
tlmok i'll jump on one of my ubuntu boxes02:51
wallyworldtlm: seem to be missing released simple streams http://streams.canonical.com/juju/tools/streams/v1/02:53
wallyworldmetadata is in proposed but not released02:53
wallyworldmaybe there's one more job still to run02:54
tlmit's all green when I check02:55
wallyworldmaybe it takes a few minutes to wash through02:56
wallyworldneeds to have a job run on jerff02:56
tlmah that guy. It passed02:56
tlmhttps://jenkins.juju.canonical.com/job/release-juju-request-streams-update/120/02:57
=== degville_ is now known as degville
nammn_demanadart: so i created the initial mocking for apiserver/spaces test https://github.com/juju/juju/pull/11088/  your comment https://github.com/juju/juju/pull/11088#discussion_r367868986 I could not 100% realize. I cannot remove all of my changes from StubNetwork, because it needs to implement Backing so I just left it there. Which can be fixed16:05
nammn_delater when we move more and more tests from stubs to gomock16:05
manadartnammn_de: I think we could wrap the StubNetwork with with empty stubs for those methods, and remove them. They won't be called from the old tests.16:15
manadartRemove them from StubNetwork that is.16:16
nammn_demanadart:  how would you do that?  My initial idea would be to just remove all of the code I added and just add those 2 stub methods :16:18
nammn_deAllEndpointBindings  AllMachines without any logic and just return16:18
manadartnammn_de: Yes.16:18
nammn_demanadart: the other "problem: i've encountered was: because we already have a test lying in spaces_test package I could either: put the new test based on macks in a newfolder or let it be in spaces for now, I put it in spaces for now16:22
manadartnammn_de: In the spaces package is OK. As long as it is suffixed with _test.go, it will only be built for tests. We do this in other places.16:24
manadartspaces_mock_test.go would follow the convention.16:24
manadartThat's the mock. The tests can stay in spaces_test and import the mock.16:26
nammn_demanadart: what i found out from looking at the other packages is the following: mocks are under ../mocks/ and follow the naming of <interface/topic>_mock.go and the test itself is under <api>_test.go, but as we have both (stub and mock tests) I need to choose a new name. This would lead to spaces_mock_test.go, right?16:30
nammn_deand later when we have moved all from spaces_test, spaces_mock_test will be spaces_test16:31

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