fix: clean up stale extracted files on deploy

A failed deploy could leave a non-empty extraction directory behind, such as the scheduler-k3s `kustomization` directory, which caused every following deploy to fail. Leftovers from previous deploys are now fully removed, removing a directory such as `config/kustomize` from the repository now removes the stored copy, and openresty includes now persist across restarts.
This commit is contained in:
Jose Diaz-Gonzalez committed 2026-10-23 14:37:49 -04:00
1 parent a73e6b67bc
commit 0690a9b655
12 files changed
+315 -41

No files matched your search

+25
View File
@@ -588,6 +588,31 @@ teardown() {
assert_output_contains "Unable to parse command"
}
@test "(scheduler-docker-local) deploy removes stale CHECKS files" {
local DATA_DIR="/var/lib/dokku/data/scheduler-docker-local/$TEST_APP"
run create_app
echo "output: $output"
echo "status: $status"
assert_success
mkdir -p "$DATA_DIR"
echo "/ python/http.server" >"$DATA_DIR/CHECKS.99999999"
touch "$DATA_DIR/CHECKS.99999998.missing"
chown -R dokku:dokku "$DATA_DIR"
run deploy_app python dokku@$DOKKU_DOMAIN:$TEST_APP
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "find $DATA_DIR -maxdepth 1 -name 'CHECKS.*'"
echo "output: $output"
echo "status: $status"
assert_success
assert_output_not_exists
}
quoted_procfile_callback() {
local APP="$1"
local APP_REPO_DIR="$2"