You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/app-service/tutorial-nodejs-mongodb-app.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ ms.custom:
25
25
26
26
# Tutorial: Deploy a Node.js + MongoDB web app to Azure
27
27
28
-
This tutorial shows how to create a secure Node.js app in [Azure App Service](overview.md) that's connected to an [Azure Cosmos DB for MongoDB](/azure/cosmos-db/mongodb/mongodb-introduction) database. Azure App Service provides a highly scalable, self-patching web hosting service using the Linux operating system. When you're finished, you have an Express.js app running on Azure App Service on Linux.
28
+
This tutorial shows how to create a secure Node.js app in [Azure App Service](overview.md) that's connected to an [Azure DocumentDB](https://learn.microsoft.com/azure/documentdb/) database. Azure App Service provides a highly scalable, self-patching web hosting service using the Linux operating system. When you're finished, you have an Express.js app running on Azure App Service on Linux.
29
29
30
30
:::image type="content" source="./media/tutorial-nodejs-mongodb-app/azure-portal-browse-app-2.png" alt-text="Screenshot of Node.js application storing data in Cosmos DB.":::
31
31
@@ -125,7 +125,7 @@ Having issues? Check the [Troubleshooting section](#troubleshooting).
125
125
126
126
## Create App Service and Azure Cosmos DB
127
127
128
-
In this step, you create the Azure resources. The steps used in this tutorial create a set of secure-by-default resources that include App Service and Azure Cosmos DB for MongoDB. For the creation process, you specify:
128
+
In this step, you create the Azure resources. The steps used in this tutorial create a set of secure-by-default resources that include App Service and Azure DocumentDB. For the creation process, you specify:
129
129
130
130
- The **Name** for the web app. It's part of the DNS name for your app.
131
131
- The **Region** to run the app physically in the world. It's also part of the DNS name for your app.
@@ -171,7 +171,7 @@ Sign in to the [Azure portal](https://portal.azure.com/) and follow these steps
171
171
- **Virtual network**→ Integrated with the App Service app and isolates back-end network traffic.
172
172
- **Private endpoint**→ Access endpoint for the database resource in the virtual network.
173
173
- **Network interface**→ Represents a private IP address for the private endpoint.
174
-
- **Azure Cosmos DB for MongoDB**→ Accessible only from behind the private endpoint. A database and a user are created for you on the server.
174
+
- **Azure DocumentDB**→ Accessible only from behind the private endpoint. A database and a user are created for you on the server.
175
175
- **Private DNS zone**→ Enables DNS resolution of the Azure Cosmos DB server in the virtual network.
Copy file name to clipboardExpand all lines: articles/application-gateway/migrate-v1-v2.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -385,8 +385,8 @@ For the legacy cloning script, version 1.0.11 is the new version of the migratio
385
385
### Public IP retention script
386
386
387
387
After you successfully migrate the configuration and thoroughly test your new V2 gateway, this step focuses on redirecting live traffic.
388
-
389
-
We provide an Azure PowerShell script that *retains the public IP address from V1*. Here are important considerations for the script:
388
+
> [!NOTE]
389
+
> The IP migration script does not support public IP address resources that have name beginning with a numeric character.
390
390
391
391
- The script reserves the Basic public IP from V1, converts it to Standard, and attaches it to the V2 gateway. This action effectively redirects all incoming traffic to the V2 gateway.
392
392
- This IP swap operation typically results in a brief *downtime of approximately one to five minutes*. Plan accordingly.
Copy file name to clipboardExpand all lines: articles/application-gateway/tutorial-ingress-controller-add-on-new.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,27 @@ Deploying a new AKS cluster with the AGIC add-on enabled without specifying an e
57
57
az aks create -n myCluster -g myResourceGroup --network-plugin azure --enable-managed-identity -a ingress-appgw --appgw-name myApplicationGateway --appgw-subnet-cidr "10.225.0.0/16" --generate-ssh-keys
58
58
```
59
59
60
+
## Enable the add-on for the existing AKS cluster
61
+
62
+
You already have an existing AKS cluster and will enable the AGIC add-on. The add-on can be enabled either through the Azure portal or by using the Azure CLI.
63
+
64
+
# [Azure Portal](#tab/azure-portal)
65
+
66
+
In this page in the screenshot, you can create it simply by selecting the checkbox. If you want to specify a subnet prefix, select *Create new* and configure it manually.
67
+
68
+
:::image type="content" source="media/tutorial-ingress-controller-add-on-new/tutorial-ingress-controller-add-on-new.png" alt-text="Screenshot of enabling AGIC addon by Portal." lightbox="media/tutorial-ingress-controller-add-on-new/tutorial-ingress-controller-add-on-new.png":::
69
+
70
+
# [Azure CLI](#tab/azure-cli)
71
+
72
+
You can give the name of the application gateway as well as subnet CIDR by the command.
73
+
appgw-subnet-cidr should be in the address prefixes in your virtual network. Please change *10.0.250.0/24* to your preferred application gateway subnet CIDR. This must always be within the address space range of your virtual network.
74
+
75
+
```azurecli
76
+
$ az aks enable-addons --resource-group ${RG_NAME} --name ${CLUSTER_NAME} --addons ingress-appgw --appgw-subnet-cidr "10.0.250.0/24"
77
+
```
78
+
79
+
In most cases, enabling the add-on automatically assigns the required permissions. However, depending on the environment, the permissions may not be granted automatically. In such cases, you should verify the permissions and assign them manually if necessary.
80
+
60
81
> [!NOTE]
61
82
> Please ensure the identity used by AGIC has the proper permissions. A list of permissions needed by the identity can be found here: [Configure Infrastructure - Permissions](configuration-infrastructure.md#permissions). If a custom role is not defined with the required permissions, you may use the _Network Contributor_ role.
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-functions-error-handling.md
+100-1Lines changed: 100 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,6 +83,9 @@ public static async Task Run(
83
83
> - The exception message typically identifies which activity functions or sub-orchestrations caused the failure. To access more detailed error information, inspect the [`FailureDetails`](/dotnet/api/microsoft.durabletask.taskfailuredetails) property.
84
84
> - By default, `FailureDetails` includes the **error type**, **error message**, **stack trace**, and any **nested inner exceptions** (each represented as a recursive `FailureDetails` object). To include additional exception properties in the failure output, see [Include Custom Exception Properties for FailureDetails (.NET Isolated)](#include-custom-exception-properties-for-failuredetails-net-isolated).
85
85
86
+
> [!IMPORTANT]
87
+
> **Migration note (in-process to isolated):** In the in-process model, `FunctionFailedException.InnerException` contains the original exception object thrown by the activity, which you can cast and inspect directly. In the isolated worker model, `TaskFailedException` does **not** contain the original exception as an `InnerException`. Instead, error details are available only through the [`FailureDetails`](/dotnet/api/microsoft.durabletask.taskfailuredetails) property, which provides string-based properties (`ErrorType`, `ErrorMessage`, `StackTrace`). You can't cast or access the original exception object directly. Use [`FailureDetails.IsCausedBy<T>()`](/dotnet/api/microsoft.durabletask.taskfailuredetails.iscausedby) to check the original exception type.
88
+
86
89
</details>
87
90
<br>
88
91
<details>
@@ -438,6 +441,102 @@ If the **CreditAccount** activity fails, the orchestrator catches the exception
438
441
439
442
::: zone pivot="durable-functions"
440
443
444
+
## Errors with multiple activity calls (fan-out/fan-in)
445
+
446
+
# [C#](#tab/csharp)
447
+
448
+
When you use `Task.WhenAll` to run multiple activity calls in parallel (fan-out/fan-in pattern) and one or more activities fail, `await` throws only the first exception. To access all failures, inspect the `Exception` property on the `Task` returned by `Task.WhenAll`.
449
+
450
+
<details>
451
+
<summary><b>Isolated worker model</b></summary>
452
+
453
+
```csharp
454
+
vartasks=new[]
455
+
{
456
+
context.CallActivityAsync("Activity1", input1),
457
+
context.CallActivityAsync("Activity2", input2),
458
+
context.CallActivityAsync("Activity3", input3),
459
+
};
460
+
461
+
varallTask=Task.WhenAll(tasks);
462
+
try
463
+
{
464
+
awaitallTask;
465
+
}
466
+
catch (TaskFailedException)
467
+
{
468
+
// 'await' rethrows only the first exception. To inspect all failures,
469
+
// check allTask.Exception, which is an AggregateException.
// Use funcFailed.InnerException to access the original exception
514
+
}
515
+
}
516
+
}
517
+
}
518
+
```
519
+
520
+
</details>
521
+
522
+
# [JavaScript](#tab/javascript)
523
+
524
+
In JavaScript, when you use `context.df.Task.all` to run multiple activity calls in parallel, the first failure causes the task to complete with an error. Wrap the call in a try/catch block to handle the error.
525
+
526
+
# [Python](#tab/python)
527
+
528
+
In Python, when you use `context.task_all` to run multiple activity calls in parallel, the first failure causes the task to complete with an error. Wrap the call in a try/except block to handle the error.
529
+
530
+
# [PowerShell](#tab/powershell)
531
+
532
+
In PowerShell, use `Wait-DurableTask` with multiple tasks. If any task fails, the error is raised.
533
+
534
+
# [Java](#tab/java)
535
+
536
+
In Java, when you use `ctx.allOf` to run multiple activity calls in parallel, the first failure causes the task to complete with an error. Use a try/catch block to handle the error.
537
+
538
+
---
539
+
441
540
## Errors in entity functions
442
541
Exception handling in entity functions depends on the Durable Functions hosting model:
> The sample linked in the prerequisites (`samples/precompiled`) uses the in-process model. The following **Isolated model** sections show equivalent code for the .NET isolated worker model.
97
-
98
-
Notice the `await Task.WhenAll(tasks);` line. The code doesn't await the individual calls to `E2_CopyFileToBlob`, so they run in parallel. When the orchestrator passes the task array to `Task.WhenAll`, it returns a task that doesn't complete until all copy operations complete. If you're familiar with the Task Parallel Library (TPL) in .NET, this pattern is familiar. The difference is that these tasks could be running on multiple virtual machines concurrently, and the Durable Functions extension ensures that the end-to-end execution is resilient to process recycling.
99
-
100
-
After the orchestrator awaits `Task.WhenAll`, all function calls are complete and return values. Each call to `E2_CopyFileToBlob` returns the number of bytes uploaded. Calculate the total by adding the return values.
101
-
102
-
<br>
103
-
104
93
<details>
105
94
<summary><b>Isolated model</b></summary>
106
95
@@ -137,6 +126,22 @@ public static class BackupSiteContent
137
126
}
138
127
```
139
128
129
+
Notice the `await Task.WhenAll(tasks);` line. The code doesn't await the individual calls to `E2_CopyFileToBlob`, so they run in parallel. When the orchestrator passes the task array to `Task.WhenAll`, it returns a task that doesn't complete until all copy operations complete. If you're familiar with the Task Parallel Library (TPL) in .NET, this pattern is familiar. The difference is that these tasks could be running on multiple virtual machines concurrently, and the Durable Functions extension ensures that the end-to-end execution is resilient to process recycling.
130
+
131
+
After the orchestrator awaits `Task.WhenAll`, all function calls are complete and return values. Each call to `E2_CopyFileToBlob` returns the number of bytes uploaded. Calculate the total by adding the return values.
> The [in-process model sample](~/samples-durable-functions/samples/precompiled/BackupSiteContent.cs) uses deprecated in-process packages. The preceding code shows the recommended .NET isolated worker model.
144
+
140
145
</details>
141
146
142
147
<br>
@@ -364,10 +369,6 @@ The helper activity functions are regular functions that use the `activityTrigge
> To run the sample code, install the `Microsoft.Azure.WebJobs.Extensions.Storage` NuGet package.
464
-
465
-
The function uses Azure Functions binding features like the [`Binder` parameter](../functions-dotnet-class-library.md#binding-at-runtime). You don't need those details for this walkthrough.
466
-
467
-
<br>
468
-
469
470
<details>
470
471
<summary><b>Isolated model</b></summary>
471
472
473
+
> [!NOTE]
474
+
> To run the sample code, install the `Azure.Storage.Blobs` NuGet package.
475
+
472
476
```csharp
473
477
usingSystem;
474
478
usingSystem.IO;
@@ -518,6 +522,18 @@ public static class BackupSiteContent
> The in-process model sample requires the `Microsoft.Azure.WebJobs.Extensions.Storage` NuGet package and uses Azure Functions binding features like the [`Binder` parameter](../functions-dotnet-class-library.md#binding-at-runtime).
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-functions-http-features.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -194,6 +194,9 @@ public HttpResponseMessage httpStart(
194
194
195
195
---
196
196
197
+
> [!TIP]
198
+
> If you have multiple HTTP-triggered starter functions in the same function app, configure a unique `route` for each function to avoid route conflicts. Using a parameterized route like `orchestrators/{functionName}` (as shown in several of the preceding examples) lets a single HTTP starter function start any orchestrator by name, which is often the simplest approach.
199
+
197
200
Starting an orchestrator function by using the HTTP-trigger functions shown previously can be done using any HTTP client. The following cURL command starts an orchestrator function named `DoWork`:
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-functions-orchestrations.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,9 @@ This article gives you an overview of orchestrator functions and how they can he
24
24
25
25
For information about the types of functions available in a Durable Functions app, see [Durable Task programming model](programming-model-overview.md).
26
26
27
+
> [!TIP]
28
+
> If you use C# with the .NET isolated worker model, you can write orchestrations using either a **function-based** approach (static methods with `[Function]` attributes) or a **class-based** approach (classes that inherit from `TaskOrchestrator<TInput, TOutput>`). The class-based approach requires the [Microsoft.DurableTask.Generators](https://www.nuget.org/packages/Microsoft.DurableTask.Generators) source generator package and provides strongly typed invocations. For more information, see [Class-based activities and orchestrations](durable-functions-dotnet-isolated-overview.md#source-generator-and-class-based-activities-and-orchestrations). The C# code examples in this article show both approaches.
29
+
27
30
::: zone-end
28
31
29
32
::: zone pivot="durable-task-sdks"
@@ -116,6 +119,36 @@ public static async Task<List<string>> Run(
116
119
117
120
<br>
118
121
122
+
<details>
123
+
<summary><b>Class-based model (isolated worker)</b></summary>
124
+
125
+
The class-based approach uses a source generator and requires the [Microsoft.DurableTask.Generators](https://www.nuget.org/packages/Microsoft.DurableTask.Generators) NuGet package.
0 commit comments