fix: storage:list reads from attachments, deprecate storage-list trigger

storage:list was calling the storage-list plugn trigger which read -v lines from docker-options. After the install-time migration drains those lines into the attachment store, that source is empty for every migrated app and for any app that only ever used storage:create + storage:mount. The fix moves CommandList to call a new in-process ListAppMountEntries helper that reads attachments directly, surfaces the entry name in JSON output via a new entry_name field, and falls back to the entry name as the host token for k3s entries with no host path so the colon form remains well-formed. The storage-list plugn trigger is kept for back-compat with external callers but emits a deprecation warning and now reads from the same attachment-driven source.
This commit is contained in:
Jose Diaz-Gonzalez
2026-04-29 22:51:50 -04:00
parent 6a5d568944
commit d75228f165
6 changed files with 258 additions and 59 deletions

View File

@@ -251,11 +251,30 @@ teardown() {
echo "status: $status"
assert_success
run /bin/bash -c "dokku storage:list $TEST_APP --format json | jq -r '. | length'"
echo "output: $output"
echo "status: $status"
assert_success
assert_output "2"
run /bin/bash -c "dokku storage:list $TEST_APP --format json | jq -r '.[].entry_name' | sort | xargs"
echo "output: $output"
echo "status: $status"
assert_success
assert_output "rdmtest-cache rdmtest-data"
# cleanup
run /bin/bash -c "dokku storage:unmount $TEST_APP rdmtest-data"
assert_success
run /bin/bash -c "dokku storage:unmount $TEST_APP rdmtest-cache"
assert_success
run /bin/bash -c "dokku storage:list $TEST_APP --format json | jq -r '. | length'"
echo "output: $output"
echo "status: $status"
assert_success
assert_output "0"
run /bin/bash -c "dokku storage:destroy rdmtest-data"
assert_success
run /bin/bash -c "dokku storage:destroy rdmtest-cache"