/srv/irclogs.ubuntu.com/2021/05/05/#snappy.txt

mborzeckimorning06:08
pstolowskimorning07:05
mborzeckipstolowski: hey, welcome back07:07
mupPR snapd#10235 opened: asserts: fix errors reported by linter <Created by mardy> <https://github.com/snapcore/snapd/pull/10235>07:20
mborzeckipstolowski: can you take a look at ^^ ?07:43
mupPR snapd#10232 closed: cmd/snap-bootstrap: Fix linter errors <Created by mardy> <Merged by bboozzoo> <https://github.com/snapcore/snapd/pull/10232>07:45
mupPR snapd#10233 closed: cmd/snap-repair: fix linter issues <Created by mardy> <Merged by bboozzoo> <https://github.com/snapcore/snapd/pull/10233>07:45
mborzeckiduh, rpkg segfaults on `rpkg srpm` guess rawhide isn't as stable as they say08:32
pstolowskimhm08:48
mborzeckiwe should probably add fedora 34 to our spread images now08:54
pstolowskimborzecki: do you need any reviews?08:55
mborzeckipstolowski: you can try https://github.com/snapcore/snapd/pull/10082 and give some feedback about the proposed config08:56
mupPR #10082: github: try out golangci-lint <Needs Samuele review> <Simple 😃> <Skip spread> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/10082>08:56
mborzeckipstolowski: there are prebuilt binaries here: https://github.com/golangci/golangci-lint/releases08:58
pstolowskiok08:58
mupPR snapd#10236 opened: spread: add Fedora 34, leave a TODO about dropping Fedora 32 <Simple 😃> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/10236>09:16
mardymborzecki: do you know anything about this? https://github.com/snapcore/snapd/blob/master/bootloader/lkenv/lkenv.go#L53609:28
mardyit's unused, but it's so well commented, that I'm unsure whether I should just remove it09:28
mborzeckimardy: iirc lkenv is a bit special, best leave it and ping ian in the comments09:29
mupPR snapd#10237 opened: client: Fix linter errors <Created by mardy> <https://github.com/snapcore/snapd/pull/10237>09:46
pstolowskipedronis: hi, maybe you have opinion on https://github.com/snapcore/snapd/pull/10215 ?10:03
mupPR #10215: store/store_download.go: make snapd resilient on slow network <Created by fujimotos> <https://github.com/snapcore/snapd/pull/10215>10:03
mvomardy: hey, great to see your PRs :) just looked at 10237 and it looks great. one suggestion for things that just touch things like unit tests or reorder imports, you could use the "skip spread" label here because the risk that any of this breaks the integration testsuite is low. thanks and keep it up!10:25
mupPR snapd#10231 closed: cmd/snap: Fix errors reported by linter <Created by mardy> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/10231>10:36
mardyso, the "daemon" package testing setup is made with many "export_XXX_test.go" files, which export the types needed by the corresponding "XXX_test.go"11:00
mardythe "testpackage" linter does not like that, and would like a single "test_export.go"11:00
mardyshould I (1) delete all these "export_XXX_test.go" files and move their contents to "test_export.go"?11:01
mardyor (2) rename them to ""export_XXX.go", so that the linter won't complain, and import them in the test which uses them?11:01
ijohnsonmardy for now, just ignore the daemon package, it is a bit special and has been refactored recently and may be subject to more refactoring by Samuele so best to chat with him (after the sprint) about what to do for the daemon package11:06
mvomardy: 10237 is green and has two +1 which means you can merge it if you want :) congrats for this11:16
mardyijohnson: ok11:23
mardymvo: done, thanks11:25
mvomardy: congrats :)11:25
mardyijohnson: for the daemon package then I'll just make a PR for the other changes, excluding the test stuff11:25
mupPR snapd#10237 closed: client: Fix linter errors <Skip spread> <Created by mardy> <Merged by mardy> <https://github.com/snapcore/snapd/pull/10237>11:26
mupPR snapd#10238 opened: daemon: fix linter errors <Created by mardy> <https://github.com/snapcore/snapd/pull/10238>11:31
pedronismardy: ijohnson: yes, I have refactoring pendings for that package, the testpackage linter here sounds a bit naive, or mabye it telling us not subtly that the daemon package is too big11:37
ijohnsonyeah maybe we could just disable that specific check for the daemon package11:38
pedronismaybe we just did it wrong all this time (sorry I can't really spend a lot of attention on this atm)11:53
ijohnsonyeah no problem 🙂 like I said we can wait til after the sprint to dive back into what the best thing to do is I think11:54
mupPR snapd#10177 closed: tests: use op.paths tools instead of dirs.sh helper - part 2 <Created by sergiocazzolato> <Merged by sergiocazzolato> <https://github.com/snapcore/snapd/pull/10177>12:06
mupPR snapd#10239 opened: tests: fix tests expecting cgroup v1/hybrid on openSUSE Tumbleweed <Simple 😃> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/10239>12:06
pstolowskihey ijohnson12:26
ijohnsonhey pstolowski12:37
mardymore questions about this testpackage linter: interfaces/connection_test.go uses the Attrer class, and if I change the package in the file to "interfaces_test", then it's not available anymore12:51
mardyso I do "type Attrer interfaces.Attrer" in the test file, and now it complains that the Attrer type was already defined... :-/12:51
pedronisyou need a type alias type Attrer = interfaces.Attrer ? or is that something else12:52
ijohnsonmardy: I think you just need to change `Attrer` to `interfaces.Attrer` since that's exported ?12:52
ijohnsonmardy: this works for me :12:54
ijohnsonhttps://pastebin.ubuntu.com/p/nwS4yxYxb9/12:54
mardyijohnson: indeed! Thanks!12:57
mborzeckicachio: hm i think the github actions behavior is different for external cotributors13:18
mborzeckicachio: in https://github.com/snapcore/snapd/pull/10215 the actions did not run, i had to click on a button to make them run13:19
mupPR #10215: store/store_download.go: make snapd resilient on slow network <Needs Samuele review> <Created by fujimotos> <https://github.com/snapcore/snapd/pull/10215>13:19
ijohnsonbboozzoo that was a change upstream GitHub action  just made13:20
mborzeckiijohnson: cachio: https://github.blog/changelog/2021-04-22-github-actions-maintainers-must-approve-first-time-contributor-workflow-runs/ this one probbaly13:20
mborzeckihm looks like it's for first time contributors only?13:21
ijohnsonyeah13:21
ijohnsonTo prevent crypto currency abuse13:21
ijohnsonAIUI13:21
mupPR snapd#10240 opened: interfaces: fix linter errors <Created by mardy> <https://github.com/snapcore/snapd/pull/10240>13:26
mardynow that I added the package name, I get this error:14:53
mardyoverlord/hookstate/context_test.go:91:39: unknown field `task` in struct literal (typecheck) anotherContext := &hookstate.Context{task: s.task, state: s.task.State(), setup: s.setup}14:53
ijohnsonmardy: probably you need to add a new test-only helper to export_test.go that is something like `func MakeContext(t *state.Task, setup *Setup) { return Context{task: t, state: st, setup: setup} }`14:57
pstolowskimardy: that's because Context's members are private (unexported) so cannot be set from another package14:57
ijohnsonright what pstolowski said14:57
pstolowskimardy: yea, ijohnson 's suggestion is the way to solve it14:57
mardyah-ah, thanks guys!14:59
ijohnsonnp14:59
pedronisijohnson: mardy: this starts to get a bit into weeds from my pov15:22
pedronisI'm not sure I agree with the testpackage imposed goal15:22
ijohnsonpedronis: do you mean about moving a _test.go file which is currently in pkg foo to pkg foo_test ? you don't agree with that goal ?15:24
pedronisijohnson: I agree is good, I'm not is good as an absolute goal, it's a judgement call15:25
pedronis*I'm not sure15:25
ijohnsonI mean as an improvement to the codebase I think it makes sense regardless of whether we want to use this linter or not long term15:25
pedronisijohnson: as I said, taken dogmatically it doesn't make sense15:26
ijohnsonin my view, test files that are not in pkg foo_test and are in pkg foo, are not idiomatic go and so we should try to change them, time and energy allowing, to make it easier for us to maintain our codebase as a whole15:27
pedronisijohnson: even assuming it's really the fundamental goal, we starts to have choices how to do it, and each needs to be judged on its own15:29
pedronisijohnson: there are ways to achieve this that can get very messy15:30
mvoijohnson: let's park this for a bit, we have meeting for a while :)15:30
ijohnsonsure, I agree that if a simple PR from mardy is leading to this much discussion it's probably not an appropriate papercut PR for him to work on, I don't think anyone expected addressing these linter suggestions to lead to this much discussion15:31
ijohnsonanyways meeting now it seems15:31
pedronisijohnson: well I didn't know there was a dogmatic test linter15:32
pedronisinvolved15:32
ijohnsonpedronis: well in my experience most linters are quite dogmatic for better or worse 🙂15:53
pedronisijohnson: remember that I didn't even accept that PR yet, I didn't have time to look into it15:55
pedronisyes, I'm aware that linters tend to be15:56
ijohnsonsorry I think we are debating about the debate now, but anyways I think we should just have @mardy skip over this one and work on addressing different feedback15:56
mupPR snapd#10240 closed: interfaces: fix linter errors <Created by mardy> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/10240>19:12
mupPR snapd#10236 closed: spread: add Fedora 34, leave a TODO about dropping Fedora 32 <Simple 😃> <Created by bboozzoo> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/10236>19:17
mupPR snapd#10238 closed: daemon: fix linter errors <Created by mardy> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/10238>19:22
mupPR snapd#10239 closed: tests: fix tests expecting cgroup v1/hybrid on openSUSE Tumbleweed <Simple 😃> <Created by bboozzoo> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/10239>19:22

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