projectkudu / kudu

Kudu is the engine behind git/hg deployments, WebJobs, and various other features in Azure Web Sites. It can also run outside of Azure.
Apache License 2.0
3.12k stars 652 forks source link

SiteExtension: Avoid restart when install to WebRoot only #1501

Closed shrimpy closed 9 years ago

shrimpy commented 9 years ago

need to handle case that two different installation request, one is install to webroot, one is normal site extension installation. in this case we will still need to return restart header to trigger restart.

davidebbo commented 9 years ago

While it's not needed for the main site, you still need the restart for the scm (used for micro-RP scenario).

shrimpy commented 9 years ago

can we assume that in "Micro-RP" scenario, package will always come with its own XDT?

if that is the case, we can do some smart handling when install to webroot. if package has XDT, we will trigger restart.

davidebbo commented 9 years ago

Good question. Though if we assume that, then we wouldn't need to create an XDT at all, right?

If we make this a requirement, then we know when we need to restart.

shrimpy commented 9 years ago

i think we will still need to create XDT file, since install to webroot will have two scenario if i understand correctly:

scenario 1: package do not has XDT, purely want to put content to wwwroot in this case we will need to generate XDT file to map request to wwwroot

scenario 2: package has XDT, at the same time want to put content to wwwroot in this case we do not generate XDT, instead we use the XDT file come with package (and i thought this is Micro-RP scenario)

shrimpy commented 9 years ago

chat with David, we will remove the logic that we generate XDT file when there isn`t one come with package.

in this case when there is no XDT file, we do not need to restart the whole site.