Skip to content

Conversation

@Enkidu93
Copy link
Collaborator

@Enkidu93 Enkidu93 commented Nov 9, 2023

This change is Reviewable

@Enkidu93 Enkidu93 requested a review from ddaspit November 9, 2023 20:06
@codecov-commenter
Copy link

codecov-commenter commented Nov 9, 2023

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Files Coverage Δ
...NetCore/Configuration/IMachineBuilderExtensions.cs 0.00% <0.00%> (ø)
...ine.AspNetCore/Services/CancellationInterceptor.cs 0.00% <0.00%> (ø)

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@ddaspit ddaspit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Enkidu93)


src/SIL.Machine.AspNetCore/Services/CancellationInterceptor.cs line 27 at r1 (raw file):

            {
                _logger.LogInformation(exception: ex, message: null);
                return null;

Does this mean that the gRPC endpoint won't return a CANCELLED status code?

@Enkidu93
Copy link
Collaborator Author

Enkidu93 commented Nov 9, 2023

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Enkidu93)

src/SIL.Machine.AspNetCore/Services/CancellationInterceptor.cs line 27 at r1 (raw file):

            {
                _logger.LogInformation(exception: ex, message: null);
                return null;

Does this mean that the gRPC endpoint won't return a CANCELLED status code?

Before:
image

After:

image

It returns a cancelled status code (which is wasn't before) and gets filtered on the other end. The notable difference is that it is logged as info rather than an failure.

Copy link
Collaborator

@johnml1135 johnml1135 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ddaspit)

Copy link
Contributor

@ddaspit ddaspit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Enkidu93)


src/SIL.Machine.AspNetCore/Services/CancellationInterceptor.cs line 26 at r1 (raw file):

            if (ex is OperationCanceledException)
            {
                _logger.LogInformation(exception: ex, message: null);

Do we need to log this at all?


src/SIL.Machine.AspNetCore/Services/CancellationInterceptor.cs line 27 at r1 (raw file):

Previously, Enkidu93 (Eli C. Lowry) wrote…

Before:
image

After:

image

It returns a cancelled status code (which is wasn't before) and gets filtered on the other end. The notable difference is that it is logged as info rather than an failure.

Ok, good.

@Enkidu93
Copy link
Collaborator Author

Enkidu93 commented Nov 9, 2023

src/SIL.Machine.AspNetCore/Services/CancellationInterceptor.cs line 26 at r1 (raw file):

Previously, ddaspit (Damien Daspit) wrote…

Do we need to log this at all?

@johnml1135 , you're the one who asked for it to be moved to info. Do you want this logged at all? A lower log level than info? Just ignore it?

@johnml1135
Copy link
Collaborator

src/SIL.Machine.AspNetCore/Services/CancellationInterceptor.cs line 26 at r1 (raw file):

Previously, Enkidu93 (Eli C. Lowry) wrote…

@johnml1135 , you're the one who asked for it to be moved to info. Do you want this logged at all? A lower log level than info? Just ignore it?

Probably instead of printing the whole exception, we can just say "this job was cancelled." So we can know that the cancellation signal was successful. Info is fine - I don't need a stack trace though.

@ddaspit ddaspit requested a review from johnml1135 November 10, 2023 14:33
Copy link
Contributor

@ddaspit ddaspit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Enkidu93 and @johnml1135)


src/SIL.Machine.AspNetCore/Services/CancellationInterceptor.cs line 26 at r1 (raw file):

Previously, johnml1135 (John Lambert) wrote…

Probably instead of printing the whole exception, we can just say "this job was cancelled." So we can know that the cancellation signal was successful. Info is fine - I don't need a stack trace though.

Sounds good to me.

@Enkidu93
Copy link
Collaborator Author

src/SIL.Machine.AspNetCore/Services/CancellationInterceptor.cs line 26 at r1 (raw file):

Previously, ddaspit (Damien Daspit) wrote…

Sounds good to me.

Done.

Copy link
Contributor

@ddaspit ddaspit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @johnml1135)

Copy link
Collaborator

@johnml1135 johnml1135 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Enkidu93)

@johnml1135 johnml1135 merged commit 1622608 into master Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants