fix: storage plugin install setup and post-delete permissions

apps:destroy was failing in CI because the post-delete trigger called PropertyListWrite, which tried to mkdir /var/lib/dokku/config/storage/<app> as the dokku user but the parent directory had been created by the install trigger as root. The install trigger now calls PropertySetup("storage") so the per-plugin config root has the correct ownership, and post-delete / post-app-clone / post-app-rename short-circuit when the app has no attachments to begin with so they can't fail on a never-touched property tree. The entry registry and migration flag directories also moved out of config/storage (where they would have collided with the property-store path config/storage/<appName>) into a dedicated data/storage-registry tree.
This commit is contained in:
Jose Diaz-Gonzalez
2026-04-29 22:36:00 -04:00
parent b601a626f5
commit 89afd09087
4 changed files with 33 additions and 7 deletions

View File

@@ -14,10 +14,11 @@ import (
// migrationFlagDir contains per-app flag files written after a successful
// per-app migration; presence means the app's legacy -v lines have been
// drained into the attachment store.
// drained into the attachment store. Lives under the registry directory
// so it doesn't collide with the property-store path
// `config/storage/<appName>`.
func migrationFlagDir() string {
root := common.GetenvWithDefault("DOKKU_LIB_ROOT", "/var/lib/dokku")
return filepath.Join(root, "config", "storage", ".migrated")
return filepath.Join(RegistryDirectory(), "migrations")
}
func migrationFlagFile(appName string) string {