Closed socksy closed 10 months ago
Very nice – I'll close my PR in favor of this one!
Currently failing the tests though:
FAIL in config.bindings/stacktrace-shortening (test/features/config/bindings.feature:110)
the output should not contain
expected: (not (str/includes? (:out m) output))
actual: (not (not true))
Thanks for picking this up, @socksy! I think we can likely merge this after the failing test is fixed on CI. (Strangely, it passes when I run it locally, but I don't have time to dig in further, unfortunately.)
Yeah, it works for me locally when developing, so I figured this must somehow be a CI runner setup? Unfortunately I'm away from the keyboard for at least the next 2 weeks and unable to debug for a while.
Is the CI running a different command than when you test locally? Or is this maybe a Linux/Mac thing?
I also noticed that the CI error has
(Rest of stacktrace elided)
which is explicitly disabled in the tests.edn, for obvious reasons 😅. Can it be that this file is ignored when running the tests in CI?!
@socksy I think that's from within the test of eliding itself, so the stack eliding (elision?) is configured by the test rather than the overall project settings.
My suspicion is that this test might be inheriting a setting from the overall test suite that's only enabled on CI and is causing kaocha.ns
to appear apart from the stacktrace itself because the error is coming from line 110 of the feature test.
Trying to mimic the CI invocation locally didn't reproduce the CI failure. A couple things I tried:
bin/kaocha --reporter documentation integration --plugin cloverage --codecov
bin/kaocha --plugin :kaocha.plugin/profiling --plugin :kaocha.plugin/capture-output --plugin :kaocha.plugin.alpha/info --plugin :kaocha.plugin/cloverage --print-env --reporter kaocha.report/documentation --codecov --focus 'config.bindings/stacktrace-shortening'
This is pretty strange, since the differences should be pretty marginal between my environment and CI if I pass all those flags, especially since I'm running a Linux system. The main difference remaining is that CI is a headless environment, but I'm pretty sure the only part of Kaocha that is affected by that is the notification plugin.
Turns out the missing ingredient was setting the CI
environment variable. (You can also use --profile ci
). I knew Kaocha pays attention to that flag, but I didn't realize any stacktrace stuff was affected by it. I'm not actually sure how to fix it, though. Getting closer, though!
Patch coverage: 100.00%
and project coverage change: +0.04%
:tada:
Comparison is base (
7dcb230
) 75.10% compared to head (8ed006d
) 75.15%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@alysbrooks wdyt? seems to finally pass CI :)
Thanks, @socksy
Released in v1.87.1366
[lambdaisland/kaocha "1.87.1366"] ;; deps.edn
{lambdaisland/kaocha {:mvn/version "1.87.1366"}} ;; project.clj
Resolves #58
This is directly based on @pesterhazy's PR https://github.com/lambdaisland/kaocha/pull/321
What I've added: