-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Revert to long polling in the ServalClientHelper. Fixes #98. #143
Conversation
The only thing we should be allowing this to continue on is timeouts - can you check the status code? Will the exception type be different? If it is another error, we should just rethrow. |
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ddaspit and @Enkidu93)
Yep, my apologies. I can do that. |
Previously, Enkidu93 (Eli C. Lowry) wrote…
|
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Enkidu93)
tests/Serval.E2ETests/ServalClientHelper.cs
line 130 at r2 (raw file):
break; } revision++;
We want to use the revision from the returned build model.
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Enkidu93)
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.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Enkidu93)
163b89f
to
027d4f1
Compare
027d4f1
to
ca8d240
Compare
Previously, johnml1135 (John Lambert) wrote…
Ultimately, this is what is thrown here. Although it's a bit janky, checking based on the message ought to be reliable. Is this OK with you, John? |
Previously, Enkidu93 (Eli C. Lowry) wrote…
The ServalApiException has a StatusCode - can you check that instead? |
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.
Reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @ddaspit)
|
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.
Reviewed 1 of 1 files at r4.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Enkidu93)
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.
Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @johnml1135)
tests/Serval.E2ETests/ServalClientHelper.cs
line 129 at r4 (raw file):
Previously, johnml1135 (John Lambert) wrote…
revision = result.Revision + 1; // look for the next revision, the current one
He is passing revision + 1
to GetBuildAsync
.
…dev/serval into revert_to_long_polling_#98
Previously, johnml1135 (John Lambert) wrote…
I tried that initially, but that's not actually what gets thrown here. There are a few timeouts at play here. As I understand it, this timeout is actually the timeout thrown by the HTTP client itself. I am realizing though that this timeout is configured to only 10 seconds. Should we reconfigure it to be greater than the longpolltimeout option? |
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @johnml1135)
tests/Serval.E2ETests/ServalClientHelper.cs
line 129 at r4 (raw file):
Previously, ddaspit (Damien Daspit) wrote…
He is passing
revision + 1
toGetBuildAsync
.
If it would be clearer to do otherwise, that's fine. But, of course, it has the same effect.
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @johnml1135)
tests/Serval.E2ETests/ServalClientHelper.cs
line 129 at r4 (raw file):
Previously, Enkidu93 (Eli C. Lowry) wrote…
If it would be clearer to do otherwise, that's fine. But, of course, it has the same effect.
I don't have an opinion either way.
Previously, ddaspit (Damien Daspit) wrote…
I didn't see it - it is clear enough. |
Previously, Enkidu93 (Eli C. Lowry) wrote…
Absolutely - we would want it to present itself as a proper message. We could also change it by having the long-poll timeout be under the http timeout, say 9 seconds? @ddaspit what do you think? |
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.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Enkidu93)
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.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Enkidu93)
tests/Serval.E2ETests/ServalClientHelper.cs
line 132 at r1 (raw file):
Previously, johnml1135 (John Lambert) wrote…
Absolutely - we would want it to present itself as a proper message. We could also change it by having the long-poll timeout be under the http timeout, say 9 seconds? @ddaspit what do you think?
Yes, we should set the request timeout for HttpClient to something higher than the long polling timeout. If we want a shorter timeout for other requests, we can control that using the cancellation token.
Previously, ddaspit (Damien Daspit) wrote…
I went ahead and updated the timeout and the catch here. Question though: Is the Task.Delay even necessary at this point? |
Task delay is still necessary if it increments very quickly. I have seen dozens if not, hundreds of requests per second on SMT training. There should be a max rate for updating.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Eli C. Lowry ***@***.***>
Sent: Friday, September 29, 2023 4:14:14 PM
To: sillsdev/serval ***@***.***>
Cc: John Lambert ***@***.***>; Mention ***@***.***>
Subject: Re: [sillsdev/serval] Revert to long polling in the ServalClientHelper. Fixes #98. (PR #143)
tests/Serval.E2ETests/ServalClientHelper.cs line 132 at r1<https://reviewable.io/reviews/sillsdev/serval/143#-NfM2tV97d8QAMr7n14w:-NfXZn6q-aiQ4ZP8BcGh:b-8e2gn> (raw file<https://github.com/sillsdev/serval/blob/e0829dd3952465565df428a6455d4aadd088fbda/tests/Serval.E2ETests/ServalClientHelper.cs#L132>):
Previously, ddaspit (Damien Daspit) wrote…
Yes, we should set the request timeout for HttpClient to something higher than the long polling timeout. If we want a shorter timeout for other requests, we can control that using the cancellation token.
I went ahead and updated the timeout and the catch here. Question though: Is the Task.Delay even necessary at this point?
—
Reply to this email directly, view it on GitHub<#143 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADIY5NFKDXSE3H5VTBHG5DLX44TZNANCNFSM6AAAAAA5IJHRUI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
OK, great! Can you approve this request? Or is there something left to do? |
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.
Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ddaspit)
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ddaspit)
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.
I agree that we update the status too much for SMT training. Do we have an issue for that? We should throttle those updates internally.
Reviewable status: complete! all files reviewed, all discussions resolved
I think this is the intended behavior. The only change I'm realizing I should possibly make is to make the Exception more specific (?).
This change is