-
Notifications
You must be signed in to change notification settings - Fork 469
Description
Uploading private assembly to Azure Function /bin works, but subsequent updates don't take effect until the I kill the service process in Kudo. Restarting the app service in the Azure portal has no effect - service process must be killed. The symptom is that related changes in the Azure function will build after the assembly has been updated, such as accessing a new property in the assembly from the function, however the function will fail during runtime.
Repro steps
- create new function app
- create new event hubs trigger function
- create an assembly with a public class with at least one property
3.a upload the assembly to function_name/bin and setup the reference in the function
3.b the string passed to the function will be json from event hubs
3.c use newtonsoft to deserialize the object
3.d output the value of the property to the log - create a console app that references the assembly from step 3
4.a console app - instantiate the class and set the property with a value that will be logged by the event hub function
4.b console app - write the object to event hubs - the function will trigger, newtonsoft will decode the object, and the log will output the property value
- change the name of the property, update the assembly version, rebuild the assembly, upload the new version to the function_name/bin folder
- update the function with the new property name
- the function will compile
- run the console app
- the function will trigger and will error with something like this:
2016-11-18T22:27:09.720 Exception while executing function: Functions.EventHubTriggerCSharp1. mscorlib: Exception has been thrown by the target of an invocation. EventHubTriggerCSharp1: Method not found: 'System.String AzureFunctionTest.DatagramMetadata.get_NewProperty()'.
10.a try restarting the app service
10.b no effect - open kudo, kill all the processes
- wait a while for everything to restart
- run the console app
- the function triggers and runs as expected - logs output of renamed property
same behavior for .config files, except that changes to .config files never take effect, even after killing the service processes.
Expected behavior
I would expect any update to any file in the bin folder to be reflected in the behavior of the function.
Actual behavior
See repro steps
Known workarounds
Kill app service processes from Kudo.
Related information
Much more info and some sample code here:
http://stackoverflow.com/questions/40687108/azure-function-app-private-assembly-gets-cached-updating-file-has-no-effect
- Programming language used
C# - Links to source
See StackOverflow link about