Skip to content

ci: ensure namespace is always deleted

Administrator requested to merge dt/cleanup_ns into main

Created by: davejrt

This test has been leaving resources on the CI cluster because the cluster_capture_state function will exit immediately if any of the commands do not return 0. This means the script will exit and the namespace, and resources in it are never cleaned up.

It's possible we are still not allowing enough time but this runs "most" of the time without issue so I suspect there is some other flake here that might need looking into. The kubectl describe command exiting 1 and not finding resources indicates sourcegraph hasn't been deployed correctly, or at all but then it leaves resources around after.

I'll follow that up.

The following builds all left the namespace and some or all resources.

https://buildkite.com/sourcegraph/sourcegraph/builds/170432 https://buildkite.com/sourcegraph/sourcegraph/builds/170413 https://buildkite.com/sourcegraph/sourcegraph/builds/170402 https://buildkite.com/sourcegraph/sourcegraph/builds/170400 https://buildkite.com/sourcegraph/sourcegraph/builds/170383 https://buildkite.com/sourcegraph/sourcegraph/builds/170383 https://buildkite.com/sourcegraph/sourcegraph/builds/170369 https://buildkite.com/sourcegraph/sourcegraph/builds/170368 https://buildkite.com/sourcegraph/sourcegraph/builds/170364 https://buildkite.com/sourcegraph/sourcegraph/builds/169467 https://buildkite.com/sourcegraph/sourcegraph/builds/168180 https://buildkite.com/sourcegraph/sourcegraph/builds/168173 https://buildkite.com/sourcegraph/sourcegraph/builds/168044 https://buildkite.com/sourcegraph/sourcegraph/builds/168042 https://buildkite.com/sourcegraph/sourcegraph/builds/168023

Test plan

Always returns true, so this won't stop any other functionality.

Merge request reports

Loading