From 64a5b1517a91475a4dbfaaf84f4dd480be9f2e39 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 25 May 2026 15:30:51 -0400 Subject: [PATCH] fix: stop forwarding deployed tag from config:set restart Reverts the earlier triggerRestart change. Forwarding the numeric tag forces release_and_deploy to look up `dokku/:N` (the bare local name), which was never tagged when image-repo overrides the default. `fn-verify-app-image` then retag-after-pulls and the underlying image ID ends up with two tags, which prevents scheduler-docker-local's image retire path from removing the old numeric tag (it uses unforced `docker image remove`). --- plugins/config/config.go | 4 +--- tests/unit/registry_2.bats | 19 ------------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/plugins/config/config.go b/plugins/config/config.go index cc4fc15a6..5b898370d 100644 --- a/plugins/config/config.go +++ b/plugins/config/config.go @@ -144,12 +144,10 @@ func triggerRestart(appName string) { return } - imageTag, _ := common.GetRunningImageTag(appName, "") - common.LogInfo1(fmt.Sprintf("Restarting app %s", appName)) _, err := common.CallPlugnTrigger(common.PlugnTriggerInput{ Trigger: "release-and-deploy", - Args: []string{appName, imageTag, "config-redeploy"}, + Args: []string{appName, "", "config-redeploy"}, StreamStdio: true, }) if err != nil { diff --git a/tests/unit/registry_2.bats b/tests/unit/registry_2.bats index f6d8e6181..81f87eb26 100644 --- a/tests/unit/registry_2.bats +++ b/tests/unit/registry_2.bats @@ -99,22 +99,3 @@ setup_push_on_release_app() { assert_success } -@test "(registry) [recover] config:set forwards deployed tag to release-and-deploy" { - setup_push_on_release_app - - run /bin/bash -c "dokku config:set $TEST_APP RECOVERY_KEY=value" - echo "output: $output" - echo "status: $status" - assert_success - # triggerRestart forwards the deployed numeric tag (not "latest") to - # release-and-deploy, so the wrapper attempts recovery against ":1" rather - # than skipping recovery for ":latest" which is never pushed. - assert_output_contains "dokku/$TEST_APP:1 not found locally, pulling from registry" - - # The wrapper retags the registry image back to the bare local name so - # subsequent get_app_image_name inspects resolve. - run /bin/bash -c "docker image inspect dokku/$TEST_APP:1" - echo "output: $output" - echo "status: $status" - assert_success -}