-
Notifications
You must be signed in to change notification settings - Fork 8
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
refactor: Start deep refactor of the client part of the project. #208
Draft
wkirschenmann
wants to merge
26
commits into
main
Choose a base branch
from
WK-clean
base: main
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.
Draft
Changes from 20 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
9d58564
refactor: Start deep refactor of the client part of the project.
wkirschenmann 394da0c
Remove retry code and calls to GetResultId.
wkirschenmann 9288898
Merge branch 'main' into WK-clean
wkirschenmann b4dacc0
Apply reformat
wkirschenmann 5d6a805
Merge branch 'wk_clean-csproj' into WK-clean
wkirschenmann d6edac0
Apply reviews
wkirschenmann f694288
Restore language version 10
wkirschenmann b2fcf50
Apply format
wkirschenmann 59f1bab
Add tests about retry management.
wkirschenmann 505065c
Avoids different retry mechanisms to mix each other.
wkirschenmann fa230ac
Correct retry logs
wkirschenmann ff707fd
Handle the case where download returns null.
wkirschenmann 144c2cd
Merge branch 'main' into WK-clean
wkirschenmann 3049c26
Use new version of core.
wkirschenmann 76a87c1
Begin cleaning remaining retries.
wkirschenmann e92c17f
Reverting most retry code
wkirschenmann cff652b
Merge branch 'main' into WK-clean
wkirschenmann d8c22b5
Correct BlockRequest
wkirschenmann 685d2e9
Deactivate legacy retry policies
wkirschenmann 95e77e5
Clean BaseClientSubmitter.cs
wkirschenmann 574a6d8
fix: channelPool lifecycle
wkirschenmann 1627ce7
doc: as per review.
wkirschenmann 812f139
refactor: remove unused class
aneojgurhem 2f80318
Use ObjectPool instead of ChannelPool
wkirschenmann 89a41eb
renamed a file and thrown an exception.
wkirschenmann 01adf36
Clean format
wkirschenmann 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 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 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 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 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 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 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 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 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 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// This file is part of the ArmoniK project | ||
// | ||
// Copyright (C) ANEO, 2021-2023. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License") | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
using System; | ||
using System.Runtime.Serialization; | ||
|
||
using JetBrains.Annotations; | ||
|
||
namespace ArmoniK.DevelopmentKit.Client.Common.Submitter.ApiExt; | ||
|
||
/// <inheritdoc /> | ||
[PublicAPI] | ||
public class ArmoniKException : ApplicationException | ||
{ | ||
/// <inheritdoc /> | ||
public ArmoniKException(string? message, | ||
Exception? innerException) | ||
: base(message, | ||
innerException) | ||
{ | ||
} | ||
|
||
/// <inheritdoc /> | ||
public ArmoniKException(string? message) | ||
: base(message) | ||
{ | ||
} | ||
|
||
/// <inheritdoc /> | ||
public ArmoniKException(SerializationInfo info, | ||
StreamingContext context) | ||
: base(info, | ||
context) | ||
{ | ||
} | ||
} |
This file contains 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// This file is part of the ArmoniK project | ||
// | ||
// Copyright (C) ANEO, 2021-2023. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License") | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
using JetBrains.Annotations; | ||
|
||
namespace ArmoniK.DevelopmentKit.Client.Common.Submitter.ApiExt; | ||
|
||
/// <summary> | ||
/// Enum representing the status of a result | ||
/// </summary> | ||
[PublicAPI] | ||
public enum ArmoniKResultStatus | ||
{ | ||
Unknown, | ||
Available, | ||
NotReady, | ||
Error, | ||
} |
37 changes: 37 additions & 0 deletions
37
Client/src/Common/Submitter/ApiExt/ArmoniKResultStatusExt.cs
This file contains 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// This file is part of the ArmoniK project | ||
// | ||
// Copyright (C) ANEO, 2021-2023. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License") | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
using System; | ||
|
||
using ArmoniK.Api.gRPC.V1; | ||
|
||
namespace ArmoniK.DevelopmentKit.Client.Common.Submitter.ApiExt; | ||
|
||
internal static class ArmoniKResultStatusExt | ||
{ | ||
public static ArmoniKResultStatus ToArmoniKResultStatus(this ResultStatus resultStatus) | ||
=> resultStatus switch | ||
{ | ||
ResultStatus.Unspecified => ArmoniKResultStatus.Unknown, | ||
ResultStatus.Created => ArmoniKResultStatus.NotReady, | ||
ResultStatus.Completed => ArmoniKResultStatus.Available, | ||
ResultStatus.Aborted => ArmoniKResultStatus.Error, | ||
ResultStatus.Notfound => ArmoniKResultStatus.Error, | ||
_ => throw new ArgumentOutOfRangeException(nameof(resultStatus), | ||
resultStatus, | ||
null), | ||
}; | ||
} |
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.