Skip to content

Commit

Permalink
Ensure we can deploy new Elm app versions
Browse files Browse the repository at this point in the history
Despite compilation of the previously deployed version failing.
  • Loading branch information
Viir committed Mar 22, 2024
1 parent 79be5d3 commit 9503622
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion implement/elm-time/Platform/WebService/StartupAdminInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,22 @@ IHost buildWebHost(
}
}

startPublicApp();
try
{
/*
* Attempt to start the public app immediately, but don't crash the admin interface if it fails.
* The 'startPublicApp' can fail for example if the Elm app fails to compile.
* The Elm app failing to compile can happen when a package author renamed their GitHub account.
* A recent example of such a rename that caused an outage was discussed at <https://discourse.elm-lang.org/t/ryannhg-packages-renamed-to-ryan-haskell/9705>
*
* By keeping the admin interface running despite such failures, we can deploy an adapted version of the Elm app to fix the issue.
* */
startPublicApp();
}
catch (Exception e)
{
logger.LogError(e, "Failed to start the public app.");
}

app.Run(
AdminInterfaceRun(
Expand Down

0 comments on commit 9503622

Please sign in to comment.