Azure / Azure/azure-functions-host
SQL Trigger function breaks Service Bus Trigger bindings
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 36
Description
We are getting the following error in Azure Portal on our function app overview:
> The following Application Settings are referenced in Function bindings but not configured in the Function App. This can cause execution errors
> Function: fiz-azure-functions/SendCustomerVerificationEmail, Binding parameter: json, Application setting: ServiceBusConnectionStringV2
Time: 17-02-2025 10:05:29 UTC
This happens for all service bus trigger functions we have in the function app.
The app settings is present in Environment variables > App settings.
It does not matter if it is in Environment variables > App settings or Environment variables > Connection strings.
This happens only under **these two conditions:**
1. We introduce SQL Trigger function
2. We introduce SQL connection string bindings for the trigger.
When we remove either, **service bus bindings work again** and message errors disappear.
This is how SqlTrigger is defined:
```
public async Task Run([SqlTrigger("[dbo].[Customers]", "SqlServerConnectionString")] IReadOnlyList> changes, FunctionContext context)
```
Environment variables > App settings
```
Key: SqlServerConnectionString
Value: Server=tcp:{azuresql},1433;Initial Catalog=fiz;Persist Security Info=False;User ID=fizfunctions;Password={pass};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
```
We have exactly the same setup in different Azure subscription which works correctly.
The project is using the following packages:
```
```
Contributor guide
Research direction
Start with the SqlTrigger declaration and the listed Worker, ServiceBus, and SQL extension package versions; reproduce the behavior with and without the SQL trigger or connection binding. Done means the SQL trigger remains usable while Service Bus bindings no longer report the configured connection setting as missing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, sql
- Domain
- backend, cloud, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100