Open shreyas-gopalakrishna opened 2 years ago
This probably needs some further looking into, but we get the script_file from the worker when we do a metadata request, and we handle the response here.
We set the value of script_file based on what we get, so if we didn't get this information during GetFunctionMetadata
request, we set to empty:
ScriptFile = metadata.ScriptFile ?? string.Empty,
Can you confirm if the java worker is sending the correct information over in FunctionMetadataResponse
? If it is, then there might be a bug somewhere potentially introduced during some of the refactoring for multi-language support cc: @soninaren
The Java worker is currently not handling FunctionsMetadataRequest or FunctionMetadataResponse. I have added a work item in the Java worker for it. Any idea how this works without the FunctionsMetadataRequest?
We'd get the value from the function.json. But there's some processing that occurs, for example: https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script/Host/HostFunctionMetadataProvider.cs#L150.
So we need to try to narrow down where that could possibly be turning into an empty string, assuming the function.json is correct.
Sharing the function.json here and here is the link for the Java app and the zip file being used.
{
"scriptFile" : "../HttpTrigger-1.0-SNAPSHOT.jar",
"entryPoint" : "com.function.Function.run",
"bindings" : [ {
"type" : "httpTrigger",
"direction" : "in",
"name" : "req",
"methods" : [ "GET", "POST" ],
"authLevel" : "FUNCTION"
}, {
"type" : "http",
"direction" : "out",
"name" : "$return"
} ]
}
Investigative information
Exception observed in Functions logs
This happens when RpcFunctionMetadata has empty script_file being passed to the Java worker.
IcM - https://portal.microsofticm.com/imp/v3/incidents/details/316217064/home
Please provide the following:
Repro steps
Provide the steps required to reproduce the problem: Do not know repro steps. Host to send empty script file can be a way to repro
Expected behavior
Jar location must be passed in the script_file and Java worker must execute the function
Actual behavior
Jar location passed is empty as the script_file is empty so the Java worker is not initialized correctly but host is sending further requests.
Host versions where this issue is seen 3.8.2.0 3.10.2.0 3.11.0.0 2.0.15229.0 3.7.1.0 3.12.0.0 3.12.1.