Skip to content

Commit f81d966

Browse files
authored
Merge branch 'main' into wangbill/atag
2 parents 6c41917 + 6c4d41a commit f81d966

29 files changed

+892
-461
lines changed

DurableTask.sln

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Correlation.Samples", "samp
5959
EndProject
6060
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D02EF5EF-3D7E-4223-B256-439BAF0C8853}"
6161
ProjectSection(SolutionItems) = preProject
62-
azure-pipelines-build.yml = azure-pipelines-build.yml
63-
azure-pipelines-release.yml = azure-pipelines-release.yml
6462
Directory.Build.targets = Directory.Build.targets
6563
Directory.Packages.props = Directory.Packages.props
6664
EndProjectSection
@@ -79,6 +77,22 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManagedIdentity.AzStorageV1
7977
EndProject
8078
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManagedIdentity.AzStorageV2", "samples\ManagedIdentitySample\DTFx.AzureStorage v2.x\ManagedIdentity.AzStorageV2.csproj", "{87CA84DE-A0FE-443C-8B2B-AB89F5DF5C24}"
8179
EndProject
80+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "eng", "eng", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
81+
EndProject
82+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ci", "ci", "{8123FF5E-A7B6-4649-BF5C-C2C69F2D67D3}"
83+
ProjectSection(SolutionItems) = preProject
84+
eng\ci\code-mirror.yml = eng\ci\code-mirror.yml
85+
eng\ci\official-build.yml = eng\ci\official-build.yml
86+
eng\ci\public-build.yml = eng\ci\public-build.yml
87+
EndProjectSection
88+
EndProject
89+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "templates", "templates", "{BF34A9C8-20CA-44B9-BC72-AB905AB27F69}"
90+
ProjectSection(SolutionItems) = preProject
91+
eng\templates\build-steps.yml = eng\templates\build-steps.yml
92+
eng\templates\build.yml = eng\templates\build.yml
93+
eng\templates\test.yml = eng\templates\test.yml
94+
EndProjectSection
95+
EndProject
8296
Global
8397
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8498
Debug|Any CPU = Debug|Any CPU
@@ -302,6 +316,8 @@ Global
302316
{8B797A00-0F43-46F9-8F1A-C945FD4F304F} = {AF4E71A6-B16E-4488-B22D-2761101A601A}
303317
{CFFC5AD7-5B82-48CF-879D-295D327B5CA6} = {8B797A00-0F43-46F9-8F1A-C945FD4F304F}
304318
{87CA84DE-A0FE-443C-8B2B-AB89F5DF5C24} = {8B797A00-0F43-46F9-8F1A-C945FD4F304F}
319+
{8123FF5E-A7B6-4649-BF5C-C2C69F2D67D3} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
320+
{BF34A9C8-20CA-44B9-BC72-AB905AB27F69} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
305321
EndGlobalSection
306322
GlobalSection(ExtensibilityGlobals) = postSolution
307323
EnterpriseLibraryConfigurationToolBinariesPath = packages\TransientFaultHandling.Core.5.1.1209.1\lib\NET4
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// ----------------------------------------------------------------------------------
2+
// Copyright Microsoft Corporation
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
// http://www.apache.org/licenses/LICENSE-2.0
7+
// Unless required by applicable law or agreed to in writing, software
8+
// distributed under the License is distributed on an "AS IS" BASIS,
9+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
// See the License for the specific language governing permissions and
11+
// limitations under the License.
12+
// ----------------------------------------------------------------------------------
13+
14+
using DurableTask.Core.Settings;
15+
using Microsoft.VisualStudio.TestTools.UnitTesting;
16+
17+
namespace DurableTask.Core.Tests
18+
{
19+
[TestClass]
20+
public class VersionSettingsTests
21+
{
22+
[TestMethod]
23+
[DataRow("1.0.0", "1.0.0", 0)]
24+
[DataRow("1.1.0", "1.0.0", 1)]
25+
[DataRow("1.0.0", "1.1.0", -1)]
26+
[DataRow("1", "1", 0)]
27+
[DataRow("2", "1", 1)]
28+
[DataRow("1", "2", -1)]
29+
[DataRow("", "1", -1)]
30+
[DataRow("1", "", 1)]
31+
[DataRow("", "", 0)]
32+
public void TestVersionComparison(string orchVersion, string settingVersion, int expectedComparison)
33+
{
34+
int result = VersioningSettings.CompareVersions(orchVersion, settingVersion);
35+
36+
if (expectedComparison == 0)
37+
{
38+
Assert.AreEqual(0, result, $"Expected {orchVersion} to be equal to {settingVersion}");
39+
}
40+
else if (expectedComparison < 0)
41+
{
42+
Assert.IsTrue(result < 0, $"Expected {orchVersion} to be less than {settingVersion}");
43+
}
44+
else
45+
{
46+
Assert.IsTrue(result > 0, $"Expected {orchVersion} to be greater than {settingVersion}");
47+
}
48+
}
49+
}
50+
}

azure-pipelines-release.yml

Lines changed: 0 additions & 218 deletions
This file was deleted.

src/DurableTask.ApplicationInsights/DurableTask.ApplicationInsights.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<!-- Version Info -->
1212
<PropertyGroup>
1313
<MajorVersion>0</MajorVersion>
14-
<MinorVersion>2</MinorVersion>
14+
<MinorVersion>3</MinorVersion>
1515
<PatchVersion>0</PatchVersion>
1616
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
1717
<FileVersion>$(VersionPrefix).0</FileVersion>

src/DurableTask.AzureStorage/AzureStorageOrchestrationServiceSettings.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ public class AzureStorageOrchestrationServiceSettings
170170
/// </remarks>
171171
public bool AllowReplayingTerminalInstances { get; set; } = false;
172172

173+
/// <summary>
174+
/// Specifies the timeout (in seconds) for read and write operations on the partition table in partition manager V3 (table partition manager).
175+
/// This helps detect and recover from potential silent hangs caused by Azure Storage client's internal retries.
176+
/// If the operation exceeds the timeout, a PartitionManagerWarning is logged and the operation is retried.
177+
/// The default time is 2 seconds.
178+
/// </summary>
179+
public TimeSpan PartitionTableOperationTimeout { get; set; } = TimeSpan.FromSeconds(2);
180+
173181
/// <summary>
174182
/// If UseAppLease is true, gets or sets the AppLeaseOptions used for acquiring the lease to start the application.
175183
/// </summary>

src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
<!-- Version Info -->
2222
<PropertyGroup>
2323
<MajorVersion>2</MajorVersion>
24-
<MinorVersion>0</MinorVersion>
25-
<PatchVersion>2</PatchVersion>
24+
<MinorVersion>1</MinorVersion>
25+
<PatchVersion>0</PatchVersion>
2626
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
2727
<FileVersion>$(VersionPrefix).0</FileVersion>
2828
<!-- FileVersionRevision is expected to be set by the CI. This is useful for distinguishing between multiple builds of the same version. -->

src/DurableTask.AzureStorage/MessageManager.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ private async Task<string> DownloadAndDecompressAsBytesAsync(Blob blob, Cancella
255255

256256
public string GetBlobUrl(string blobName)
257257
{
258-
return Uri.UnescapeDataString(this.blobContainer.GetBlobReference(blobName).Uri.AbsoluteUri);
258+
string baseUri = this.blobContainer.GetBlobContainerUri().ToString();
259+
260+
return $"{baseUri}/{EscapeBlobNamePreservingSlashes(blobName)}";
259261
}
260262

261263
public MessageFormatFlags GetMessageFormatFlags(MessageData messageData)
@@ -304,6 +306,12 @@ public async Task<int> DeleteLargeMessageBlobs(string sanitizedInstanceId, Cance
304306

305307
return storageOperationCount;
306308
}
309+
310+
/// Escapes a blob name for safe inclusion in a URI while preserving path structure.
311+
static string EscapeBlobNamePreservingSlashes(string blobName)
312+
{
313+
return string.Join("/", blobName.Split('/').Select(Uri.EscapeDataString));
314+
}
307315
}
308316

309317
#if NETSTANDARD2_0

0 commit comments

Comments
 (0)