Skip to content

Commit

Permalink
chore: Update API to 3.19.0 (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemaitre-aneo authored Jul 22, 2024
2 parents 0dbda4f + 0d97d7c commit 2832c98
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Common/src/ArmoniK.Core.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


<ItemGroup>
<PackageReference Include="ArmoniK.Api.Core" Version="3.18.1" />
<PackageReference Include="ArmoniK.Api.Core" Version="3.19.0" />
<PackageReference Include="ArmoniK.Utils.Diagnostics" Version="0.5.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
2 changes: 2 additions & 0 deletions Common/src/gRPC/Convertors/TaskDataHolderExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public static TaskDetailed ToTaskDetailed(this TaskDataHolder taskData)
=> new()
{
SessionId = taskData.SessionId,
PayloadId = taskData.PayloadId,
Status = taskData.Status.ToGrpcStatus(),
Output = taskData.Output is not null
? new TaskDetailed.Types.Output
Expand Down Expand Up @@ -117,6 +118,7 @@ public static TaskSummary ToTaskSummary(this TaskDataHolder taskDataSummary)
=> new()
{
SessionId = taskDataSummary.SessionId,
PayloadId = taskDataSummary.PayloadId,
Status = taskDataSummary.Status.ToGrpcStatus(),
OwnerPodId = taskDataSummary.OwnerPodId,
Options = taskDataSummary.Options?.ToGrpcTaskOptions(),
Expand Down
1 change: 1 addition & 0 deletions Common/src/gRPC/EnumFieldExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public static class EnumFieldExt
{
TaskSummaryEnumField.TaskId => data => data.TaskId,
TaskSummaryEnumField.SessionId => data => data.SessionId,
TaskSummaryEnumField.PayloadId => data => data.PayloadId,
TaskSummaryEnumField.OwnerPodId => data => data.OwnerPodId,
TaskSummaryEnumField.InitialTaskId => data => data.InitialTaskId,
TaskSummaryEnumField.Status => data => data.Status,
Expand Down
4 changes: 3 additions & 1 deletion Common/src/gRPC/Services/GrpcTasksService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public GrpcTasksService(ITaskTable taskTable,
{
TaskDataFields.SessionId,
TaskDataFields.TaskId,
TaskDataFields.PayloadId,
TaskDataFields.Status,
TaskDataFields.InitialTaskId,
TaskDataFields.Output,
Expand Down Expand Up @@ -481,7 +482,8 @@ await TaskLifeCycleHelper.FinalizeTaskCreation(taskTable_,
{
creationRequest.ExpectedOutputKeys,
},
TaskId = creationRequest.TaskId,
TaskId = creationRequest.TaskId,
PayloadId = creationRequest.PayloadId,
}),
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public override ValidationResult Validate(ValidationContext<EventSubscriptionReq
{
case TaskSummaryEnumField.TaskId:
case TaskSummaryEnumField.SessionId:
case TaskSummaryEnumField.PayloadId:
case TaskSummaryEnumField.OwnerPodId:
case TaskSummaryEnumField.InitialTaskId:
case TaskSummaryEnumField.PodHostname:
Expand Down
2 changes: 2 additions & 0 deletions Common/tests/ListTasksRequestExt/ToTaskDataFieldTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ TestCaseData CaseSummary(TaskSummaryEnumField field,
TaskData.TaskId);
yield return CaseSummary(TaskSummaryEnumField.SessionId,
TaskData.SessionId);
yield return CaseSummary(TaskSummaryEnumField.PayloadId,
TaskData.PayloadId);
yield return CaseSummary(TaskSummaryEnumField.Status,
TaskData.Status);
yield return CaseSummary(TaskSummaryEnumField.CreatedAt,
Expand Down
7 changes: 7 additions & 0 deletions Common/tests/ListTasksRequestExt/ToTaskDataFilterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,13 @@ TestCaseData CaseFalse(FilterField filterField)
FilterStringOperator.Equal,
"BadPartitionId"));

yield return CaseTrue(ListTasksHelper.CreateListTasksFilterString(TaskSummaryEnumField.PayloadId,
FilterStringOperator.Equal,
"PayloadId"));
yield return CaseFalse(ListTasksHelper.CreateListTasksFilterString(TaskSummaryEnumField.PayloadId,
FilterStringOperator.Equal,
"BadPayloadId"));

yield return CaseTrue(ListTasksHelper.CreateListTasksFilterStatus(TaskSummaryEnumField.Status,
FilterStatusOperator.Equal,
Api.gRPC.V1.TaskStatus.Completed));
Expand Down
7 changes: 7 additions & 0 deletions Common/tests/TestBase/TaskTableTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1892,6 +1892,13 @@ TestCaseData CaseFalse(Api.gRPC.V1.Tasks.FilterField filterField)
FilterStringOperator.Equal,
"BadSessionId"));

yield return CaseTrue(ListTasksHelper.CreateListTasksFilterString(TaskSummaryEnumField.PayloadId,
FilterStringOperator.Equal,
"PayloadId"));
yield return CaseFalse(ListTasksHelper.CreateListTasksFilterString(TaskSummaryEnumField.PayloadId,
FilterStringOperator.Equal,
"BadPayloadId"));

yield return CaseTrue(ListTasksHelper.CreateListTasksFilterString("key1",
FilterStringOperator.Equal,
"val1"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ TestCaseData CaseFalse(FilterField filterField)
yield return CaseTrue(ListTasksHelper.CreateListTasksFilterString(TaskSummaryEnumField.SessionId,
FilterStringOperator.Equal,
string.Empty));
yield return CaseTrue(ListTasksHelper.CreateListTasksFilterString(TaskSummaryEnumField.PayloadId,
FilterStringOperator.Equal,
string.Empty));
yield return CaseTrue(ListTasksHelper.CreateListTasksFilterString(TaskSummaryEnumField.PodHostname,
FilterStringOperator.Equal,
string.Empty));
Expand Down
2 changes: 1 addition & 1 deletion Tests/Bench/Server/src/ArmoniK.Samples.Bench.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ArmoniK.Api.Worker" Version="3.18.1" />
<PackageReference Include="ArmoniK.Api.Worker" Version="3.19.0" />
<PackageReference Include="ArmoniK.Utils.Diagnostics" Version="0.5.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
2 changes: 1 addition & 1 deletion Tests/Common/Client/src/ArmoniK.Core.Common.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ArmoniK.Api.Client" Version="3.18.1" />
<PackageReference Include="ArmoniK.Api.Client" Version="3.19.0" />
<PackageReference Include="ArmoniK.Utils.Diagnostics" Version="0.5.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ArmoniK.Api.Client" Version="3.18.1" />
<PackageReference Include="ArmoniK.Api.Client" Version="3.19.0" />
<PackageReference Include="ArmoniK.Utils.Diagnostics" Version="0.5.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageReference Include="Serilog.Formatting.Compact" Version="2.0.0" />
<PackageReference Include="ArmoniK.Api.Client" Version="3.18.1" />
<PackageReference Include="ArmoniK.Api.Client" Version="3.19.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ArmoniK.Api.Worker" Version="3.18.1" />
<PackageReference Include="ArmoniK.Api.Worker" Version="3.19.0" />
<PackageReference Include="ArmoniK.Utils.Diagnostics" Version="0.5.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ArmoniK.Api.Worker" Version="3.18.1" />
<PackageReference Include="ArmoniK.Api.Worker" Version="3.19.0" />
<PackageReference Include="ArmoniK.Utils.Diagnostics" Version="0.5.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ArmoniK.Api.Client" Version="3.18.1" />
<PackageReference Include="ArmoniK.Api.Client" Version="3.19.0" />
<PackageReference Include="ArmoniK.Utils.Diagnostics" Version="0.5.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ArmoniK.Api.Worker" Version="3.18.1" />
<PackageReference Include="ArmoniK.Api.Worker" Version="3.19.0" />
<PackageReference Include="ArmoniK.Utils.Diagnostics" Version="0.5.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit 2832c98

Please sign in to comment.