distillery v2.0.8 Mix.Releases.Checks.LoadedOrphanedApps View Source

This check determines whether or not any of the applications in the release satisfy all three of the following conditions:

  • Have a start type of :load or :none
  • Are not included by any other application in the release (orphaned)
  • Are expected to be started by at least one other application in the release, i.e. are present in the dependent application’s :applications list.

Such “loaded-orphaned” applications will result in a release which only partially boots, except in the rare case where the loaded applications are started before :init attempts to boot the dependents. If the loaded applications are not started before this point, the application controller will wait indefinitely for the loaded applications to be started, which will never occur because the thing which might have started them isn’t started itself yet.

In general this should be very rare, but has occurred, and can be very difficult to troubleshoot. This check provides information on how to work around the case where this happens, but the solutions are one of the following:

  • Add these loaded applications, and their dependents, to included_applications in the releasing app. This requires that the releasing app take over the lifecycle of these applications, namely starting them during it’s own start callback, generally by adding them to it’s supervisor tree. Recommended only for those cases where it is absolutely required that the application be started at a particular point in time.
  • Remove the :load start type from the applications which are orphaned, effectively allowing them to be started by :init when needed. This does imply that the application will be started, rather than simply loaded, which may not be desired - in such cases you need to evaluate the dependent applications to see whether they truly need to have the dependency started, or if they can be modified and remove it from their applications list. If neither of those work, you will need to use included_applications.

Link to this section Summary

Functions

Callback implementation for Mix.Releases.Checks.run/1

Link to this section Functions

Callback implementation for Mix.Releases.Checks.run/1.