Open
Description
I am experiencing issues with using func kubernetes deploy
for dotnet-isolated on mac
func kubernetes deploy --name testdurfuncapp --image-name myregistry.com/testdurfunc
error is
Invalid property identifier character: {. Path 'functionsJson.testDurableFunc_HttpStart', line 34, position 2.
when taking a close look it sounds like print-functions.sh does not create functions.json from functions.metadata properly and hence it breaks the subsequent deserialization logics
sed -nzE 's/^\[(.+\n {4}"name": "([^"]+)".+)\]$/"\2": \1/p' functions.metadata
Here is how this bash script convert the functions.metadata to functions.json:
functions.metadata
[
{
"name": "testDurableFunc",
"scriptFile": "func-iso-dur-test.dll",
"entryPoint": "func_iso_dur_test.testDurableFunc.RunOrchestrator",
"language": "dotnet-isolated",
"properties": {
"IsCodeless": false
},
"bindings": [
{
"name": "context",
"direction": "In",
"type": "orchestrationTrigger",
"properties": {}
}
]
},
{
"name": "SayHello",
"scriptFile": "func-iso-dur-test.dll",
"entryPoint": "func_iso_dur_test.testDurableFunc.SayHello",
"language": "dotnet-isolated",
"properties": {
"IsCodeless": false
},
"bindings": [
{
"name": "name",
"direction": "In",
"type": "activityTrigger",
"dataType": "String",
"properties": {}
}
]
},
{
"name": "testDurableFunc_HttpStart",
"scriptFile": "func-iso-dur-test.dll",
"entryPoint": "func_iso_dur_test.testDurableFunc.HttpStart",
"language": "dotnet-isolated",
"properties": {
"IsCodeless": false
},
"bindings": [
{
"name": "req",
"direction": "In",
"type": "httpTrigger",
"authLevel": "Anonymous",
"methods": [
"get",
"post"
],
"properties": {}
},
{
"name": "client",
"direction": "In",
"type": "durableClient",
"properties": {}
},
{
"name": "$return",
"type": "http",
"direction": "Out"
}
]
}
]
result of print-functions.sh, note "functionsJson": {"testDurableFunc_HttpStart":
{
"hostJson":
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
},
"enableLiveMetricsFilters": true
}
}
},
"functionsJson": {
"testDurableFunc_HttpStart":
{
"name": "testDurableFunc",
"scriptFile": "func-iso-dur-test.dll",
"entryPoint": "func_iso_dur_test.testDurableFunc.RunOrchestrator",
"language": "dotnet-isolated",
"properties": {
"IsCodeless": false
},
"bindings": [
{
"name": "context",
"direction": "In",
"type": "orchestrationTrigger",
"properties": {}
}
]
},
{
"name": "SayHello",
"scriptFile": "func-iso-dur-test.dll",
"entryPoint": "func_iso_dur_test.testDurableFunc.SayHello",
"language": "dotnet-isolated",
"properties": {
"IsCodeless": false
},
"bindings": [
{
"name": "name",
"direction": "In",
"type": "activityTrigger",
"dataType": "String",
"properties": {}
}
]
},
{
"name": "testDurableFunc_HttpStart",
"scriptFile": "func-iso-dur-test.dll",
"entryPoint": "func_iso_dur_test.testDurableFunc.HttpStart",
"language": "dotnet-isolated",
"properties": {
"IsCodeless": false
},
"bindings": [
{
"name": "req",
"direction": "In",
"type": "httpTrigger",
"authLevel": "Anonymous",
"methods": [
"get",
"post"
],
"properties": {}
},
{
"name": "client",
"direction": "In",
"type": "durableClient",
"properties": {}
},
{
"name": "$return",
"type": "http",
"direction": "Out"
}
]
}
}
}
how to reproduce the issue
func init --docker # choose c#-isolated
func new --template "DurableFunctionsOrchestration"
func kubernetes deploy --name testdurfuncapp --image-name myregistry.com/testdurfunc
Noticed the code change was introduced to address this other issue #2825
Any body else is running to this issue? any thoughts on this?