U4-10034 - Package install may not wait for app domain restart in all cases

Created by Shannon Deminick 19 Jun 2017, 11:21:44 Updated by Sebastiaan Janssen 22 Jun 2017, 09:22:38

Subtask of: U4-9609

When waitChangeNotification and maxWaitChangeNotification are configured there may be a timeout between when a DLL has been added to the /bin and when the appdomain is restarted.

The packager doesn't take this timeout into account and in some cases the AJAX request to install business logic from the package may execute before the appdomain has restarted.

This can result in package actions not being executed or events not being triggered in 3rd party package DLLs during business logic execution.

Comments

Shannon Deminick 19 Jun 2017, 13:45:38

PR: https://github.com/umbraco/Umbraco-CMS/pull/2009

The code changes are:

  • During package install in the back office, we will force restart the appdomain when a package's files are installed
  • We will then poll to check if the app was restarted by checking a flag in the current appdomain
  • When it's restarted it continues the package installation

This logic is now the same for local package files too.

Some logic was updated for the installer when installing a starter kit, before there was no flag that the package file step performed an app restart, but it does so that flag is now set. We also then force an app pool restart when the files are installed.

To test:

  • Add waitChangeNotification="3" maxWaitChangeNotification="10" to the httpRuntime section of your web.config
  • Install a new umbraco installation with a starter kit and ensure it works
  • Install the new 7.6.4 starter kit via the back office and ensure it works and that all content/media is there
  • Install the new 7.6.4 starter kit via the back office using the zip file and ensure it works and that all content/media is there


Niels Hartvig 20 Jun 2017, 08:33:37

Package Actions still doesn't fire


Shannon Deminick 21 Jun 2017, 08:34:47

Ok fixed this time, have pushed changes. Was a problem with a variable name that i changed, doh!


Niels Hartvig 22 Jun 2017, 09:14:48

Tested with version 0.998 of the Starter Kit (from local package) and now it works beautifully - YAY!


Sebastiaan Janssen 22 Jun 2017, 09:22:38

Merged the PR, now it will actually be part of 7.6.4 ;-)


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 7.6.4

Sprint:

Story Points:

Cycle: 2