/srv/irclogs.ubuntu.com/2021/11/03/#snappy.txt

mborzeckimorning06:14
mupPR snapd#11000 closed: snapstate: add debug message where a snap is mounted <Simple 😃> <Skip spread> <Created by mvo5> <Merged by bboozzoo> <https://github.com/snapcore/snapd/pull/11000>06:49
zyga-mbpgood morning, o07:03
mborzeckizyga-mbp: hey07:28
zyga-mbphey mborzecki 07:29
mardyhi mborzecki, zyga-mbp 07:29
* zyga-mbp waits for covid results :/07:30
zyga-mbpmeanwhile, I'm learning about testing.T and things it has to offer in latest Go07:31
zyga-mbpI've been using check.v1 since I learned Go but perhaps it's time to get back to the roots, at least partially07:32
mardyzyga-mbp: did you fall sick, or is it just a test?07:37
zyga-mbpmardy I feel totally sick07:38
zyga-mbpmardy no smell, no taste, some fever, etc07:38
mborzeckizyga-mbp: hm t.Parallel() and then before check I used to use https://github.com/stretchr/testify08:04
mupPR snapd#10999 closed:  cmd/snap-confine: lazy set up of device cgroup, only when devices were assigned (2.53) <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/10999>08:05
pstolowskimorning08:07
mupPR snapd#11004 opened: tests: give interfaces-udisks2 more time for the loop device to appear <Simple 😃> <Test Robustness> <Created by mvo5> <https://github.com/snapcore/snapd/pull/11004>08:15
mupPR snapd#11002 closed: tests: increase timeout/add debug around nbd0 mounting <Simple 😃> <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/11002>08:20
sil2100Hello everyone o/ So William pointed out to me LP: #194883808:40
mupBug #1948838: Snapd can no longer be imported as a Go module <snapd:New> <Snappy:New> <https://launchpad.net/bugs/1948838>08:40
mardyanyone know how I can run one spread test (ubuntu-core-18-64:tests/core/snapd-refresh-vs-services-reboots) using a custom UC18 image (https://people.ubuntu.com/~slyon/uc18/)?08:52
pstolowskimardy: you can use qemu backend (see our hacking.md and https://github.com/snapcore/spread); then you can pass the individual test name to spread08:59
mardypstolowski: hi! Yes, but it still will load the ubuntu-16.04 image, and install the core as a snap09:00
pstolowskiah hmm09:01
pstolowskimvo: hi, see the issue sil2100 reported ^, not sure what was the state of things re go mod in 2.5309:04
pstolowskijamesh: hi, re https://github.com/snapcore/snapd/pull/10867#discussion_r732705276 should we just not support notifications on 16.04 given that it probably isn't an interesting desktop environment anymore (but maybe this is a wrong assumption)?09:30
mupPR #10867: desktop, usersession: observe notifications <Created by stolowski> <https://github.com/snapcore/snapd/pull/10867>09:30
jameshpstolowski: it should still usually work on 16.04. The problem is that we can't use dependencies to ensure it works.09:35
jameshsince one service is started by systemd and the other by Upstart09:36
pstolowskijamesh: hmm i see. i'm hoping for your suggestion on what to do with that, i'm afraid my understanding of the desktop is limited09:37
jameshpstolowski: when you log into a desktop session on 16.04, both a user mode systemd and upstart instance will be run. The D-Bus session bus is managed by upstart09:43
jameshpstolowski: the snap session agent is started on demand via socket activation. If it is started after the session bus has been started, then we can use the session bus. If it starts afterwards, then not.09:44
jameshs/afterwards/before/ at the end there09:45
pstolowskijamesh: got it. can we get session bus by other means in the latter case (possibly by retrying), or is it game over if DBUS_SESSION_BUS_ADDRESS is not set?10:07
jameshpstolowski: upstart's dbus job writes out the session bus address to a file in $XDG_RUNTIME_DIR. And godbus already had code to check that file (that I didn't even have to write).10:08
jameshhttps://github.com/godbus/dbus/blob/d379abe190d5ca3715642acec248498637629d53/conn_other.go#L5110:09
pstolowskimiguelpires: hi, can you assing https://bugs.launchpad.net/snapd/+bug/1943987 to self (I couldn't find your LP id)10:09
mupBug #1943987: snap disconnect <snapname>: prints a confusing error <snapd:Fix Committed> <https://launchpad.net/bugs/1943987>10:09
pstolowskijamesh: that looks nice, sounds like a retry around that would do?10:10
jameshpstolowski: what's currently in master can potentially crash if (a) session agent gets started before dbus, and (b) the notification REST API gets called10:11
jameshwith your changes, it'd crash with only (a)10:11
miguelpirespstolowski: Yes, thanks for reminding me10:12
jameshi.e. there's already the chance of a problem, but it'd be nice to avoid making it bigger.10:12
pstolowskijamesh: yes10:12
pstolowskijamesh: how about I guard it so it not going to crash, and then propose something around tryDiscoverDbusSessionBusAddress() as a new PR?10:13
jameshpstolowski: my suggestion would be (1) don't create the notification manager if s.bus is nil, and (2) have the REST API return an error if s.notificationMgr is nil10:13
pstolowskijamesh: yes, makes sense10:14
pstolowskimiguelpires: what's your LP id btw, i already needed it before and couldn't find it ;)10:14
jameshpstolowski: Note that that tryDiscoverDbusSessionBusAddress() function is private. But it's already being used in the code to open a session bus connection.10:15
miguelpirespstolowski: miguelpires1 10:16
pstolowskimiguelpires: thanks10:16
pstolowskijamesh: indeed, i need to see how it's used10:17
jameshwith the session agent's exit on idle behaviour, I don't think it's a big deal if we've got a race where notifications might fail for the first 30 seconds of the session. It's just 16.04 after all...10:17
jameshpstolowski: here's the code calling tryDiscover...(): https://github.com/godbus/dbus/blob/master/conn.go#L76-L9810:18
pstolowskijamesh: agreed10:18
pstolowskijamesh: thanks for the pointers10:22
pstolowskijamesh: actually, we are already guarding this with if c.s.bus == nil .. in postPendingRefreshNotification(), and return "cannot connect to the session bus (500)10:30
jameshpstolowski: right. The problem is that you're introducing code that assumes s.bus is non-nil in SessionAgent.Init()10:31
jameshthat's the bit that's the problem.10:31
pstolowskijamesh: good point10:33
mardypstolowski: so, my problem is that I don't understand how these ubuntu-core-* tests are run: in the spread they are declared with a classic distro as base (like ubuntu-16.04), and then somehow the core image is lanched from it. Maybe you know why it is like this?10:55
mborzeckimardy: whcih tests?10:56
jameshmardy: see prepare_ubuntu_core() and setup_reflash_magic() in tests/lib/prepare.sh11:01
jameshin essence it uses a classic Ubuntu system to build an Ubuntu Core image, writes it to /dev/sda, and reboots11:02
pstolowskijamesh: i've updated https://github.com/snapcore/snapd/pull/1086711:21
mupPR #10867: desktop, usersession: observe notifications <Created by stolowski> <https://github.com/snapcore/snapd/pull/10867>11:21
jameshpstolowski: looking11:22
jameshpstolowski: looks good to me11:27
pstolowskijamesh: thank you!11:30
ijohnson[m]mardy probably if you were given a uc18 image and you want to run spread tests on that image specifically, you should launch that image as a VM, then use the external backend to run the spread test you care about against your VM 11:43
ijohnson[m]mardy Sergio (who doesn't seem to be on IRC ATM) can help you with that, or I can show you in a bit, i don't have all the instructions in front of me right now 11:43
mardymborzecki: the test is ubuntu-core-18-64:tests/core/snapd-refresh-vs-services-reboots, more info in LP#194908911:44
mardyjamesh, ijohnson[m]: thanks, I'll give it a try11:45
ijohnson[m]mardy for that rest specifically, i assume foundations built you a custom core18 snap to test, you could hack up the prepare.sh script to download that core18 snap instead of whatever one we normally download11:46
ijohnson[m]*test11:47
ijohnson[m]I still think external backend is simplest though11:47
mardyijohnson[m]: I'm trying with the external backend, if it works I'll submit a PR to make the tests/externa-backend.md document mention this use-case too11:58
mupPR snapd#9839 closed: tests: spread log analyzer that could be used for re execute failed tests <â›” Blocked> <Run failed> <Created by sergiocazzolato> <Closed by sergiocazzolato> <https://github.com/snapcore/snapd/pull/9839>12:01
mardyijohnson[m]: so, I think I'm quite close, but the test's prepare is failing: https://paste.ubuntu.com/p/TzjFRwNCGg/ (I started my UC image with the same command given in https://ubuntu.com/core/docs/testing-with-qemu)12:05
mupPR snapd#10241 closed: tests: set memory limit for snapd <Simple 😃> <Created by bboozzoo> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/10241>12:36
mupPR snapd#11004 closed: tests: give interfaces-udisks2 more time for the loop device to appear <Simple 😃> <Test Robustness> <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/11004>12:46
mupPR snapd#11005 opened: tests: initialize CHANGE_ID in _wait_autorefresh <Test Robustness> <Created by mvo5> <https://github.com/snapcore/snapd/pull/11005>12:46
mupPR snapd#11001 closed: spread.yaml: show `journalctl -e` for all suites on debug <Simple 😃> <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/11001>12:51
mupPR snapd#10706 closed: tests: clean up test tools <Created by sergiocazzolato> <Merged by sergiocazzolato> <https://github.com/snapcore/snapd/pull/10706>13:11
mupPR core20#120 opened: spread: add spread testing for the core20 repository <Created by Meulengracht> <https://github.com/snapcore/core20/pull/120>14:21
juliankI noticed that snapd has a Recommends on gnupg, what does it use that for?15:17
juliankwould it be fine with gpg; or optimally, gpgv?15:18
* juliank is still in progress of reducing duplicate binaries :D15:25
mupPR snapd#11006 opened: sandbox/cgroup: freeze and thaw cgroups related to services and scopes only <Simple 😃> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/11006>15:57
* mvo hugs mborzecki 15:57
mupPR snapd#10850 closed: o/snapstate: improve install/update tests <Skip spread> <Created by MiguelPires> <Merged by pedronis> <https://github.com/snapcore/snapd/pull/10850>16:27
mupPR snapd#11007 opened: o/snapstate: test relink remodel helpers do a proper subset of doInstall and rework the verify*Tasks helpers <Skip spread> <Created by pedronis> <https://github.com/snapcore/snapd/pull/11007>17:37
mupPR snapd#11008 opened: tests: some improvements for the spread log parser <Created by sergiocazzolato> <https://github.com/snapcore/snapd/pull/11008>19:43

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