Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using binding expressions of the app settings in the function.json does not work with signalRTrigger #252

Open
anastasios-captureone opened this issue Jun 28, 2021 · 10 comments

Comments

@anastasios-captureone
Copy link

Using these instructions, if the function.json contains any app settings binding expressions, then it doesn't work (seems that the app settings are not being replaced).

So this works:

{
  "type": "signalRTrigger",
  "name": "invocation",
  "category": "connections",
  "event": "connected",
  "direction": "in",
  "hubName": "someHubName", // This works.
  "connectionStringSetting": "SIGNALR_CONNECTION_STRING"
}

So this doesn't work:

{
  "type": "signalRTrigger",
  "name": "invocation",
  "category": "connections",
  "event": "connected",
  "direction": "in",
  "hubName": "%HUB_NAME%", // This doesn't work. HUB_NAME is an application setting.
  "connectionStringSetting": "SIGNALR_CONNECTION_STRING"
}

Am I correct to assume that the SignalRTriggerDispatcher is tricked that there are no SignalRMethodExecutor, at this line, because the %% value is used in the dictionary as the hubName, instead of the actual app setting?

@Y-Sindo
Copy link
Member

Y-Sindo commented Jun 29, 2021

This is a known bug already fixed but not released in bundle 3.x version. Are you using bundle 3.x version? The fix is planned to be released by July 16.

@anastasios-captureone
Copy link
Author

We have been using v2.x of the bundles. Will this get cherrypicked to the v2? AFAIK many of the extensions of the v3.x are in preview, so we would rather not upgrade there yet.

@Y-Sindo
Copy link
Member

Y-Sindo commented Jun 29, 2021

Bundles 2.2.0 contains the newest SignalR version. Do you try the bundles 2.2.0 and still not working?

@anastasios-captureone
Copy link
Author

anastasios-captureone commented Jun 29, 2021

I can confirm I'm still seeing this locally with

  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[2.*, 3.0.0)"
  }

This is is the extensions it downloaded:

[2021-06-29T06:32:02.694Z] Found a matching extension bundle at /home/anastasios/.azure-functions-core-tools/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/2.6.1
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <AzureFunctionsVersion>v3</AzureFunctionsVersion>
    <TargetFramework>netcoreapp3.1</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.CosmosDB" Version="3.0.9" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="2.4.1" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EventGrid" Version="2.1.0" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EventHubs" Version="4.2.0" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Kafka" Version="3.2.1" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.RabbitMQ" Version="1.0.0" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.SendGrid" Version="3.0.2" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="4.2.1" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.SignalRService" Version="1.2.2" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="4.0.4" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Twilio" Version="3.0.2" />
    <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.7" />
    <PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
    <PackageReference Include="System.Security.Principal.Windows" Version="4.3.0" />
  </ItemGroup>
</Project>

@Y-Sindo
Copy link
Member

Y-Sindo commented Jun 29, 2021

       <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.SignalRService" Version="1.2.2" />

This is not the newest SignalR extension version. The newest one is 1.4.2. I can see the bundles 2.2.0 is released from this. But the extension bundles you used is higher than 2.2.0 while still with an old SignalR Service version... Is your azure-functions-core-tools the latest version?

@anastasios-captureone
Copy link
Author

npm outdated -g
Package                      Current    Wanted    Latest  Location
azure-functions-core-tools  3.0.3568  3.0.3568  2.7.3188  global

Wait I'm confused. The link you have points to ExtensionBundle 2.2 as the latest? How come the tools downloaded 2.6.1 ? .azure-functions-core-tools/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/2.6.1

@Y-Sindo
Copy link
Member

Y-Sindo commented Jun 29, 2021

I am also confused, as I am not an expert of Azure Functions. You might want to turn to Azure Functions team. I will also look for help through internal channels.

@Y-Sindo
Copy link
Member

Y-Sindo commented Jun 29, 2021

Just confirm that there is something wrong with the bundle release. Next release should fix this problem. You can get the update ASAP by subscribing to the repo release messages https://github.com/Azure/azure-functions-extension-bundles/ .The next release is supposed to be somewhere between 2-4 weeks.

@anastasios-captureone
Copy link
Author

@Y-Sindo any updates on this? Who should we contact to create a new release on the https://github.com/Azure/azure-functions-extension-bundles/ ?

@Y-Sindo
Copy link
Member

Y-Sindo commented Jul 30, 2021

Still waiting for response from Azure Functions team. You might want to contact naren.soni@microsoft.com for the bundle releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants