Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "dotnet-sdk"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
ignore:
- dependency-name: "*"
update-types:
- "version-update:semver-major"
- "version-update:semver-minor"
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"type": "func",
"dependsOn": "build (AzureFunctionsApp)",
"options": {
"cwd": "${workspaceFolder}/out/samples/bin/Debug/AzureFunctionsApp/net6.0"
"cwd": "${workspaceFolder}/out/samples/bin/Debug/AzureFunctionsApp/net8.0"
},
"command": "host start",
"isBackground": true,
Expand Down
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
<ItemGroup>
<PackageVersion Include="Microsoft.CodeAnalysis" Version="4.9.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.9.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.9.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.9.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" Version="1.1.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="1.1.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" Version="1.1.2" />
Expand Down
6 changes: 3 additions & 3 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"sdk": {
"version": "8.0.100",
"version": "9.0.306",
"rollForward": "latestFeature"
},
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "3.7.0",
"Microsoft.Build.Traversal": "4.1.0"
"Microsoft.Build.NoTargets": "3.7.134",
"Microsoft.Build.Traversal": "4.1.82"
}
}
2 changes: 1 addition & 1 deletion samples/AzureFunctionsApp/AzureFunctionsApp.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion samples/ScheduleWebApp/ScheduleWebApp.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
Expand Down
2 changes: 1 addition & 1 deletion samples/WebAPI/WebAPI.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static IDurableTaskClientBuilder UseBuildTarget<TTarget, TOptions>(this I
where TTarget : DurableTaskClient
where TOptions : DurableTaskClientOptions
{
builder.UseBuildTarget(typeof(TTarget));
builder.UseBuildTarget<TTarget>();
builder.Services.AddOptions<TOptions>(builder.Name)
.PostConfigure<IOptionsMonitor<DurableTaskClientOptions>>((options, baseOptions) =>
{
Expand Down
2 changes: 1 addition & 1 deletion src/Client/Grpc/GrpcDurableTaskClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public override async Task<string> ScheduleNewOrchestrationInstanceAsync(
};

// Add tags to the collection
if (request?.Tags != null && options?.Tags != null)
if (request.Tags != null && options?.Tags != null)
{
foreach (KeyValuePair<string, string> tag in options.Tags)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Generators/DurableTaskSourceGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,11 @@ class DurableTaskSyntaxReceiver : ISyntaxContextReceiver
readonly List<DurableTaskTypeInfo> activities = new();
readonly List<DurableFunction> durableFunctions = new();

#pragma warning disable CA1859 // Use concrete types when possible for performance -- not important here
public IReadOnlyList<DurableTaskTypeInfo> Orchestrators => this.orchestrators;
public IReadOnlyList<DurableTaskTypeInfo> Activities => this.activities;
public IReadOnlyList<DurableFunction> DurableFunctions => this.durableFunctions;
#pragma warning restore CA1859 // Use concrete types when possible for performance -- not important here

public void OnVisitSyntaxNode(GeneratorSyntaxContext context)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Shared/AzureManaged/DurableTaskVersionUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static class DurableTaskUserAgentUtil
/// <summary>
/// The version of the SDK used in the user agent string.
/// </summary>
static readonly string PackageVersion = FileVersionInfo.GetVersionInfo(typeof(DurableTaskUserAgentUtil).Assembly.Location).FileVersion;
static readonly string? PackageVersion = FileVersionInfo.GetVersionInfo(typeof(DurableTaskUserAgentUtil).Assembly.Location).FileVersion;

/// <summary>
/// Generates the user agent string for the Durable Task SDK based on a fixed name, the package version, and the caller type.
Expand All @@ -29,4 +29,4 @@ public static string GetUserAgent(string callerType)
{
return $"{SdkName}/{PackageVersion?.ToString() ?? "unknown"} ({callerType})";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ this.Credential is not null
async (context, metadata) =>
{
metadata.Add("taskhub", taskHubName);

// Add user agent header with durabletask-dotnet and DLL version from util
metadata.Add("x-user-agent", $"{DurableTaskUserAgentUtil.GetUserAgent(nameof(DurableTaskWorker))}");
metadata.Add("workerid", this.WorkerId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static IDurableTaskWorkerBuilder UseBuildTarget<TTarget, TOptions>(this I
where TTarget : DurableTaskWorker
where TOptions : DurableTaskWorkerOptions
{
builder.UseBuildTarget(typeof(TTarget));
builder.UseBuildTarget<TTarget>();
builder.Services.AddOptions<TOptions>(builder.Name)
.PostConfigure<IOptionsMonitor<DurableTaskWorkerOptions>>((options, baseOptions) =>
{
Expand Down
3 changes: 2 additions & 1 deletion src/Worker/Core/DurableTaskWorkerOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ public DataConverter DataConverter
/// </remarks>
internal bool DataConverterExplicitlySet { get; private set; }


/// <summary>
/// Applies these option values to another.
/// </summary>
Expand All @@ -176,7 +175,9 @@ internal void ApplyTo(DurableTaskWorkerOptions other)
other.MaximumTimerInterval = this.MaximumTimerInterval;
other.EnableEntitySupport = this.EnableEntitySupport;
other.Versioning = this.Versioning;
#pragma warning disable CS0618 // Type or member is obsolete
other.OrchestrationFilter = this.OrchestrationFilter;
#pragma warning restore CS0618 // Type or member is obsolete
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Worker/Core/IOrchestrationFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public interface IOrchestrationFilter
/// </summary>
/// <param name="info">The information on the orchestration to validate.</param>
/// <param name="cancellationToken">The cancellation token for the request to timeout.</param>
/// <returns><code>true</code> if the orchestration is valid <code>false</code> otherwise.</returns>
/// <returns><c>true</c> if the orchestration is valid; <c>false</c> otherwise.</returns>
ValueTask<bool> IsOrchestrationValidAsync(OrchestrationFilterParameters info, CancellationToken cancellationToken = default);
}

Expand Down
3 changes: 2 additions & 1 deletion src/Worker/Core/Shims/TaskOrchestrationShim.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ public TaskOrchestrationShim(
// failure details are correctly propagated.
throw new CoreTaskFailedException(e.Message, e.InnerException)
{
FailureDetails = new FailureDetails(e,
FailureDetails = new FailureDetails(
e,
e.FailureDetails.ToCoreFailureDetails(),
properties: e.FailureDetails.Properties),
};
Expand Down
Loading
Loading