File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -315,13 +315,21 @@ defmodule Livebook.Apps.Manager do
315315 end
316316
317317 defp retry ( state , slug ) do
318- if app_definitely_down? ( slug ) do
319- % { app_spec: app_spec } = state . deployments [ slug ]
318+ % { app_spec: app_spec } = state . deployments [ slug ]
319+
320+ permanent_app_specs = Apps . get_permanent_app_specs ( )
321+
322+ # Check if the app spec has not been retracted or overridden with
323+ # a new version
324+ valid? = Enum . any? ( permanent_app_specs , & ( & 1 . slug == slug and & 1 . version == app_spec . version ) )
325+
326+ if valid? and app_definitely_down? ( slug ) do
320327 ref = deploy ( app_spec )
321328 put_in ( state . deployments [ slug ] . ref , ref )
322329 else
323330 { _ , state } = pop_in ( state . deployments [ slug ] )
324- state
331+ # If there is a new version, we want to deploy it right away
332+ sync_apps ( state )
325333 end
326334 end
327335
You can’t perform that action at this time.
0 commit comments