kube
kube copied to clipboard
Upgrade tarpaulin for new features
Want to use a less ancient version of tarpaulin and get new features.
- [ ] Bump to latest (currently 0.25.0) from our pin at 0.18.5 from Nov 2021
- [ ] Find a better GH Action approach (see below for the issues with actions-rs/tarpaulin)
- [ ] Try the proc macro coverage so that we can get credit for tests in
kube-derive
(currently it looks bad but it is tested) - [ ] Do an
all-features
build in coverage (to ensure numbers are the most accurate and the most tests run) - [ ] Try to include one or two examples if it can be done quickly (like we do for unit tests atm)
A lot of this can be attempted locally by simply running cargo install cargo-tarpaulin
then running just coverage
inside the root of this repo (with a local k3d
/ non-important kubernetes cluster at your context).
Some of this has been attempted before. #1143 most recently. But it's annoying because: a) changes have surprising results, b) iteration cycles are slow, and c) we never got around many of the problems.
Problems encountered
- Upgrade from 0.18.5 to two tested versions (0.22 and 0.25 locally) both drops
13%
code coverage because it fails to include everything and it seems to fail to exclude tests (ignore_tests = true
). This needs to be fixed / worked around. - actions-rs/tarpaulin will be deprecated and is otherwise not well maintained (breaks after 0.22.0 after which their asset resolution fails => we can only bump up to 0.22.0 from Oct 2022 using this action)
- Tarpaulin's GHA recommendation is to run their image in docker which seems to clash with the k3d action (a no-go because we rely on integration tests being run with tarpaulin) so we probably need a bin install (there's probably a good example available in GH search)
- The runtime-macros lib that can give us macro-expansion coverage had maintenance issues and as a result has an unmergeable fork
It is possible that there is a lot more work to be done upstream before we need to really do anything here - in particular, see the master issue about Misses in coverage. So in the interest of having a place to resume from down the line, I am stashing knowledge here for a potentially ambitious future me, or anyone who wants to play with this.
It's a minor nice-to-have CI issue (tarpaulin and the actions are already great helpers!) and it's not really costing us anything real by lagging behind for another year or three. At least as long as the nodejs 12 deprecation issue on CI from the action becomes breaking.