From 4b4c56d40683eb13c7338132e6978076cf395037 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Wed, 1 Oct 2025 21:13:18 +0200 Subject: [PATCH] fix: skip borked tags on `app list` See https://git.coopcloud.tech/toolshed/abra/issues/656 --- cli/app/list.go | 5 +++++ tests/integration/app_list.bats | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/cli/app/list.go b/cli/app/list.go index 63e47358..26b58711 100644 --- a/cli/app/list.go +++ b/cli/app/list.go @@ -165,6 +165,11 @@ Use "--status/-S" flag to query all servers for the live deployment status.`), } for _, update := range updates { + if ok := tagcmp.IsParsable(update); !ok { + log.Debug(i18n.G("unable to parse %s, skipping as upgrade option", update)) + continue + } + parsedUpdate, err := tagcmp.Parse(update) if err != nil { log.Fatal(err) diff --git a/tests/integration/app_list.bats b/tests/integration/app_list.bats index fd82623b..21aaf3f6 100644 --- a/tests/integration/app_list.bats +++ b/tests/integration/app_list.bats @@ -15,6 +15,7 @@ teardown_file(){ _undeploy_app _rm_app _rm_server + _reset_recipe if [[ -d "$ABRA_DIR/servers/foo" ]]; then run rm -rf "$ABRA_DIR/servers/foo" @@ -193,3 +194,16 @@ teardown(){ <(jq -S "." <(echo '{}')) assert_success } + +# bats test_tags=slow +@test "list ignores borked tags" { + run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" tag \ + -a "2.4.8_1" -m "feat: completely borked tag" + assert_success + + _deploy_app + + run $ABRA app ls --status --debug + assert_success + assert_output --partial "unable to parse 2.4.8_1" +}