Currently, the PowerShell worker has two dependency installations modes:
- Required – this is when there are no dependencies installed for the function app
- Optional – this takes place when there are dependencies already installed for the app. In this case, the PowerShell worker downloads a new set of dependencies and checks if these dependencies are newer that the ones currently installed. If they are newer, the snapshot gets promoted to the be latest
For (1), purge happens every 7 days (the frequency is determined by this MDMaxBackgroundUpgradePeriod app setting)
For (2), purge happens before the worker installs the dependencies as well as in 7 days
We should consider purging for (1) as well.