-
Notifications
You must be signed in to change notification settings - Fork 8
Stasput/transition to system json #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
oldpande
wants to merge
13
commits into
master
Choose a base branch
from
stasput/transition-to-system-json
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
2b5bc58
transition to System.Text.Json
636ea27
Return yaml file
f0db6cc
remove newtonsoft package, clean nullability
9adfc5a
rollback version
87710a3
fix nullability
6c84a16
back jetbrains annotation
d6b83da
back jetbrains annotations
ec255a0
Fix code style
432c5da
change command for docker compose
432a5e4
Update actions.yml
oldpande c8ff3f1
add convertor for dictionary with tuple keys
d8f6481
code style fix
8ae63d3
fix bugs for monitoring and tests
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
wsl -u root sh -c "service docker status || (service docker start && echo 'artificially waiting 20s for docker to warmup...' && sleep 20s)" | ||
wsl docker-compose -f docker-compose.linux.yaml up -d --build | ||
wsl docker compose -f docker-compose.linux.yaml up -d --build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 26 additions & 27 deletions
53
Cassandra.DistributedTaskQueue.Monitoring/Api/RtqMonitoringSearchRequest.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
using JetBrains.Annotations; | ||
using System.Text.Json.Serialization; | ||
|
||
using Newtonsoft.Json; | ||
using JetBrains.Annotations; | ||
|
||
using SkbKontur.Cassandra.DistributedTaskQueue.Cassandra.Entities; | ||
|
||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api | ||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api; | ||
|
||
public class RtqMonitoringSearchRequest | ||
{ | ||
public class RtqMonitoringSearchRequest | ||
{ | ||
[NotNull] | ||
[JsonProperty("enqueueTimestampRange")] | ||
public TimestampRange EnqueueTimestampRange { get; set; } | ||
|
||
[CanBeNull] | ||
[JsonProperty("queryString")] | ||
public string QueryString { get; set; } | ||
|
||
[CanBeNull] | ||
[JsonProperty("states")] | ||
public TaskState[] States { get; set; } | ||
|
||
[CanBeNull, ItemNotNull] | ||
[JsonProperty("names")] | ||
public string[] Names { get; set; } | ||
|
||
[JsonProperty("offset")] | ||
public int? Offset { get; set; } | ||
|
||
[JsonProperty("count")] | ||
public int? Count { get; set; } | ||
} | ||
[NotNull] | ||
[JsonPropertyName("enqueueTimestampRange")] | ||
public TimestampRange EnqueueTimestampRange { get; set; } | ||
|
||
[CanBeNull] | ||
[JsonPropertyName("queryString")] | ||
public string QueryString { get; set; } | ||
|
||
[CanBeNull] | ||
[JsonPropertyName("states")] | ||
public TaskState[] States { get; set; } | ||
|
||
[CanBeNull, ItemNotNull] | ||
[JsonPropertyName("names")] | ||
public string[] Names { get; set; } | ||
|
||
[JsonPropertyName("offset")] | ||
public int? Offset { get; set; } | ||
|
||
[JsonPropertyName("count")] | ||
public int? Count { get; set; } | ||
} |
21 changes: 10 additions & 11 deletions
21
Cassandra.DistributedTaskQueue.Monitoring/Api/RtqMonitoringSearchResults.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
using JetBrains.Annotations; | ||
using System.Text.Json.Serialization; | ||
|
||
using Newtonsoft.Json; | ||
using JetBrains.Annotations; | ||
|
||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api | ||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api; | ||
|
||
public class RtqMonitoringSearchResults | ||
{ | ||
public class RtqMonitoringSearchResults | ||
{ | ||
[JsonProperty("totalCount")] | ||
public long TotalCount { get; set; } | ||
[JsonPropertyName("totalCount")] | ||
public long TotalCount { get; set; } | ||
|
||
[NotNull, ItemNotNull] | ||
[JsonProperty("taskMetas")] | ||
public RtqMonitoringTaskMeta[] TaskMetas { get; set; } | ||
} | ||
[NotNull, ItemNotNull] | ||
[JsonPropertyName("taskMetas")] | ||
public RtqMonitoringTaskMeta[] TaskMetas { get; set; } = null!; | ||
} |
118 changes: 58 additions & 60 deletions
118
Cassandra.DistributedTaskQueue.Monitoring/Api/RtqMonitoringTaskMeta.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,65 @@ | ||
using JetBrains.Annotations; | ||
using System.Text.Json.Serialization; | ||
|
||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using JetBrains.Annotations; | ||
|
||
using SkbKontur.Cassandra.DistributedTaskQueue.Cassandra.Entities; | ||
using SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Json; | ||
|
||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api | ||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api; | ||
|
||
public class RtqMonitoringTaskMeta | ||
{ | ||
public class RtqMonitoringTaskMeta | ||
{ | ||
[NotNull] | ||
[JsonProperty("name")] | ||
public string Name { get; set; } | ||
|
||
[NotNull] | ||
[JsonProperty("id")] | ||
public string Id { get; set; } | ||
|
||
[JsonProperty("ticks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long Ticks { get; set; } | ||
|
||
[JsonProperty("minimalStartTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long MinimalStartTicks { get; set; } | ||
|
||
[JsonProperty("startExecutingTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? StartExecutingTicks { get; set; } | ||
|
||
[JsonProperty("finishExecutingTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? FinishExecutingTicks { get; set; } | ||
|
||
[JsonProperty("lastModificationTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? LastModificationTicks { get; set; } | ||
|
||
[JsonProperty("expirationTimestampTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? ExpirationTimestampTicks { get; set; } | ||
|
||
[JsonProperty("expirationModificationTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? ExpirationModificationTicks { get; set; } | ||
|
||
[JsonProperty("executionDurationTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? ExecutionDurationTicks { get; set; } | ||
|
||
[JsonProperty("state")] | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public TaskState State { get; set; } | ||
|
||
[CanBeNull] | ||
[JsonProperty("taskActions")] | ||
public TaskActions TaskActions { get; set; } | ||
|
||
[JsonProperty("attempts")] | ||
public int Attempts { get; set; } | ||
|
||
[JsonProperty("parentTaskId")] | ||
public string ParentTaskId { get; set; } | ||
} | ||
[NotNull] | ||
[JsonPropertyName("name")] | ||
public string Name { get; set; } = null!; | ||
|
||
[NotNull] | ||
[JsonPropertyName("id")] | ||
public string Id { get; set; } = null!; | ||
|
||
[JsonPropertyName("ticks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long Ticks { get; set; } | ||
|
||
[JsonPropertyName("minimalStartTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long MinimalStartTicks { get; set; } | ||
|
||
[JsonPropertyName("startExecutingTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? StartExecutingTicks { get; set; } | ||
|
||
[JsonPropertyName("finishExecutingTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? FinishExecutingTicks { get; set; } | ||
|
||
[JsonPropertyName("lastModificationTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? LastModificationTicks { get; set; } | ||
|
||
[JsonPropertyName("expirationTimestampTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? ExpirationTimestampTicks { get; set; } | ||
|
||
[JsonPropertyName("expirationModificationTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? ExpirationModificationTicks { get; set; } | ||
|
||
[JsonPropertyName("executionDurationTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? ExecutionDurationTicks { get; set; } | ||
|
||
[JsonPropertyName("state")] | ||
[JsonConverter(typeof(JsonStringEnumConverter))] | ||
public TaskState State { get; set; } | ||
|
||
[CanBeNull] | ||
[JsonPropertyName("taskActions")] | ||
public TaskActions TaskActions { get; set; } | ||
|
||
[JsonPropertyName("attempts")] | ||
public int Attempts { get; set; } | ||
|
||
[JsonPropertyName("parentTaskId")] | ||
public string ParentTaskId { get; set; } | ||
} |
45 changes: 22 additions & 23 deletions
45
Cassandra.DistributedTaskQueue.Monitoring/Api/RtqMonitoringTaskModel.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,30 @@ | ||
using JetBrains.Annotations; | ||
|
||
using Newtonsoft.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
using SkbKontur.Cassandra.DistributedTaskQueue.Handling; | ||
using SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Json; | ||
|
||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api | ||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api; | ||
|
||
public class RtqMonitoringTaskModel | ||
{ | ||
public class RtqMonitoringTaskModel | ||
{ | ||
public static RtqMonitoringTaskModel Empty => new RtqMonitoringTaskModel(); | ||
|
||
[NotNull] | ||
[JsonProperty("taskMeta")] | ||
public RtqMonitoringTaskMeta TaskMeta { get; set; } | ||
|
||
[NotNull] | ||
[JsonProperty("taskData")] | ||
[JsonConverter(typeof(TaskDataJsonSerializer))] | ||
public IRtqTaskData TaskData { get; set; } | ||
|
||
[NotNull, ItemNotNull] | ||
[JsonProperty("childTaskIds")] | ||
public string[] ChildTaskIds { get; set; } | ||
|
||
[NotNull, ItemNotNull] | ||
[JsonProperty("exceptionInfos")] | ||
public string[] ExceptionInfos { get; set; } | ||
} | ||
public static RtqMonitoringTaskModel Empty => new RtqMonitoringTaskModel(); | ||
|
||
[NotNull] | ||
[JsonPropertyName("taskMeta")] | ||
public RtqMonitoringTaskMeta TaskMeta { get; set; } | ||
|
||
[NotNull] | ||
[JsonPropertyName("taskData")] | ||
[JsonConverter(typeof(TaskDataJsonSerializer))] | ||
public IRtqTaskData TaskData { get; set; } | ||
|
||
[NotNull, ItemNotNull] | ||
[JsonPropertyName("childTaskIds")] | ||
public string[] ChildTaskIds { get; set; } | ||
|
||
[NotNull, ItemNotNull] | ||
[JsonPropertyName("exceptionInfos")] | ||
public string[] ExceptionInfos { get; set; } | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
using Newtonsoft.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api; | ||
|
||
public class TaskActions | ||
{ | ||
[JsonProperty("canCancel")] | ||
[JsonPropertyName("canCancel")] | ||
public bool CanCancel { get; set; } | ||
|
||
[JsonProperty("canRerun")] | ||
[JsonPropertyName("canRerun")] | ||
public bool CanRerun { get; set; } | ||
} |
27 changes: 13 additions & 14 deletions
27
Cassandra.DistributedTaskQueue.Monitoring/Api/TimestampRange.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
using JetBrains.Annotations; | ||
using System.Text.Json.Serialization; | ||
|
||
using Newtonsoft.Json; | ||
using JetBrains.Annotations; | ||
|
||
using SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Json; | ||
using SkbKontur.Cassandra.TimeBasedUuid; | ||
|
||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api | ||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api; | ||
|
||
public class TimestampRange | ||
{ | ||
public class TimestampRange | ||
{ | ||
[NotNull] | ||
[JsonProperty("lowerBound")] | ||
[JsonConverter(typeof(TimestampJsonConverter))] | ||
public Timestamp LowerBound { get; set; } | ||
[NotNull] | ||
[JsonPropertyName("lowerBound")] | ||
[JsonConverter(typeof(TimestampJsonConverter))] | ||
public Timestamp LowerBound { get; set; } = null!; | ||
|
||
[NotNull] | ||
[JsonProperty("upperBound")] | ||
[JsonConverter(typeof(TimestampJsonConverter))] | ||
public Timestamp UpperBound { get; set; } | ||
} | ||
[NotNull] | ||
[JsonPropertyName("upperBound")] | ||
[JsonConverter(typeof(TimestampJsonConverter))] | ||
public Timestamp UpperBound { get; set; } = null!; | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[opt] Может уберем и добавим #nullable enable тут и в остальных файлах?