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/<app>: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`).
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user