microk8s integ tests
# 💻|contributing
c
I spent like an hour trying to get microk8s to work to debug the failing integ tests but it's just not functioning for me with an multipass issue I don't feel like debugging. Would anybody else care to install microk8s and see if the test failures are locally reproducible?
@quaint-dress-831 threads
p
I have a VM up and running via microK8s too, can run commands in dirs as suggested by you
q
Yeah just let me know what I should do once I have MicroK8s inside Multipass up
Can test on Windows for extra coverage
Otherwise Manjaro Linux
c
You'd need to compile the latest core and then run 1.
yarn run integ-local -- --timeout 20000 -g "ensureBuildkit"
2.
yarn run integ-local -- --timeout 20000 -g "should run a basic Run and emit log events"
And see if you get the same results as our failing pipelines https://app.circleci.com/pipelines/github/garden-io/garden/17859/workflows/69bf2bb2-0617-4fa3-aa16-a59658881c34/jobs/311020
q
yarn dist
to compile latest?
p
yarn install
and
yarn build
from the latest main is what I'm using
these tests have to be run from
core/
dir
@calm-family-29323 how do I set the kube-context for these tests so they can be run against the microk8s cluster on my local machine?
c
these tests will use your default context for local providers
p
Copy code
0 passing (20s)
  1 failing

  1) ensureBuildkit
       "before all" hook in "ensureBuildkit":
     Error: Timeout of 20000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/srihas/Documents/off/codebase/garden/core/build/test/integ/src/plugins/kubernetes/container/build/buildkit.js)
      at listOnTimeout (node:internal/timers:564:17)
      at processTimers (node:internal/timers:507:7)
This is same as the error in the CI
The other is a different error than the one in the CI
Copy code
0 passing (28s)
  1 failing

  1) runContainerTask
       should run a basic Run and emit log events:
     Error: Timeout of 20000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/srihas/Documents/off/codebase/garden/core/build/test/integ/src/plugins/kubernetes/container/run.js)
      at listOnTimeout (node:internal/timers:564:17)
      at processTimers (node:internal/timers:507:7)
I set the MicroK8s config as the KUBECONFIG env var and run these tests
c
well this is good news, it means these are actual reproducible real issues rather some CI odd behaviour. This also means our users might be facing the same issues.
p
I'd love to pair with you and run them once more to be sure
c
the
runContainerTask
one is definitely supposed to work. @freezing-pharmacist-34446 is Buildkit supported on microk8s?
f
It seems not to be the case. Our docs state "Note that in-cluster building is currently not supported with microk8s clusters."