Skip to content
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

removed argument requestId from loopbackserver.cs #58678

Merged
merged 21 commits into from
Nov 23, 2021

Conversation

AnudeepGunukula
Copy link
Contributor

Closes #58239

i had removed the requestId arguement from the loopbackserver.cs
i removed at the places where argument is not necessary.

This pr will solve the above issue.

@ManickaP
Copy link
Member

ManickaP commented Sep 6, 2021

Thanks for the contribution!
I see that there are some compilation issues. You can see them if you look at the CI pipelines. Could you please make sure everything compiles?

@AnudeepGunukula
Copy link
Contributor Author

i will remove the argument requestId in the abstract methods in GenericLoopbackServer.cs
and will make a new commit. so that errors will be not there.

Copy link
Member

@karelz karelz left a comment

Choose a reason for hiding this comment

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

All inherited classes need similar changes.

…er.cs

Co-authored-by: Karel Zikmund <karelz@microsoft.com>
@AnudeepGunukula
Copy link
Contributor Author

AnudeepGunukula commented Sep 7, 2021

ok @karelz . i will make similar changes in all inherited classes and then test locally and will make a commit soon
Thankyou for your inputs

@karelz karelz self-assigned this Sep 14, 2021
@karelz
Copy link
Member

karelz commented Sep 14, 2021

@AnudeepGunukula just curious if you were able to make further progress, or if you got stuck somewhere ...

@AnudeepGunukula
Copy link
Contributor Author

AnudeepGunukula commented Sep 14, 2021

Hi @karelz i am working on it and will make commit as soon as possible
Thankyou for asking i will post here if i got any doubt

@AnudeepGunukula
Copy link
Contributor Author

hi @karelz . i had removed requestId argument from all the Inherited classes
kindly let me know why some checks are failing .

@ManickaP ManickaP assigned ManickaP and unassigned karelz Sep 21, 2021
@AnudeepGunukula
Copy link
Contributor Author

Hi @ManickaP
kindly review the code and please let me know the changes.

@ManickaP
Copy link
Member

Hi @AnudeepGunukula,

I see in the checks that there are failing tests due to the change:
https://dev.azure.com/dnceng/public/_build/results?buildId=1371361&view=ms.vss-test-web.build-test-results-tab&runId=40011952&resultId=155973&paneView=debug

System.Net.Http.HttpRequestException : An error occurred while sending the request.
---- System.IO.IOException : The request was aborted.
-------- System.Net.Http.Http2ConnectionException : The HTTP/2 server sent invalid data on the connection. HTTP/2 error code 'PROTOCOL_ERROR' (0x1).

They need to be resolved as well.

You can run the tests for System.Net.Http locally like this: https://github.com/dotnet/runtime/blob/main/docs/workflow/testing/libraries/testing.md#running-tests-for-a-single-library

From the quick look, it seems like the change in HttpClientHandlerTest.Http2.cs is not correct. Since the test is not reading request via ReadRequestDataAsync, _lastStreamId won't get updated and the response data are thus probably sent with stream id 0.

In this particular case, you need to somehow pass the stream id to the loopback connection.

@ManickaP
Copy link
Member

Hi @AnudeepGunukula,
will you be able to fix the issues? Or do you want us to take over and finish it instead?

@AnudeepGunukula
Copy link
Contributor Author

Hi @ManickaP
I will complete this in this week.

@AnudeepGunukula
Copy link
Contributor Author

Hi @ManickaP . I had created new function in http2 but still some checks are failing.
Kindly let me know why some checks are failing

@karelz
Copy link
Member

karelz commented Nov 4, 2021

@AnudeepGunukula did you look at all the failed legs?

From a cursory look at couple of failed legs are failing on test System.Net.Http.Functional.Tests.SocketsHttpHandlerTest_Http2.Http2SendAsync_LargeHeaders_CorrectlyWritten:

    System.Net.Http.Functional.Tests.SocketsHttpHandlerTest_Http2.Http2SendAsync_LargeHeaders_CorrectlyWritten(continuationCount: 0) [FAIL]
      System.Net.Http.HttpRequestException : An error occurred while sending the request.
      ---- System.IO.IOException : The request was aborted.
      -------- System.Net.Http.Http2ConnectionException : The HTTP/2 server sent invalid data on the connection. HTTP/2 error code 'PROTOCOL_ERROR' (0x1).
      Stack Trace:
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs(1974,0): at System.Net.Http.Http2Connection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs(975,0): at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RedirectHandler.cs(30,0): at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs(527,0): at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
        /_/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs(3330,0): at System.Net.Http.Functional.Tests.HttpClientHandlerTest_Http2.<>c__DisplayClass99_0.<<Http2SendAsync_LargeHeaders_CorrectlyWritten>b__0>d.MoveNext()
        --- End of stack trace from previous location ---
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
        --- End of stack trace from previous location ---
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(90,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(55,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout)
        /_/src/libraries/Common/tests/System/Net/Http/Http2LoopbackServer.cs(173,0): at System.Net.Test.Common.Http2LoopbackServer.CreateClientAndServerAsync(Func`2 clientFunc, Func`2 serverFunc, Http2Options http2Options, Int32 timeout)
        /_/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs(3321,0): at System.Net.Http.Functional.Tests.HttpClientHandlerTest_Http2.Http2SendAsync_LargeHeaders_CorrectlyWritten(Int32 continuationCount)
        --- End of stack trace from previous location ---
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs(2081,0): at System.Net.Http.Http2Connection.ThrowRequestAborted(Exception innerException)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs(954,0): at System.Net.Http.Http2Connection.Http2Stream.CheckResponseBodyState()
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs(969,0): at System.Net.Http.Http2Connection.Http2Stream.TryEnsureHeaders()
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs(1006,0): at System.Net.Http.Http2Connection.Http2Stream.ReadResponseHeadersAsync(CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs(1963,0): at System.Net.Http.Http2Connection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        ----- Inner Stack Trace -----
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs(2089,0): at System.Net.Http.Http2Connection.ThrowProtocolError(Http2ProtocolErrorCode errorCode)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs(2085,0): at System.Net.Http.Http2Connection.ThrowProtocolError()
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs(582,0): at System.Net.Http.Http2Connection.GetStream(Int32 streamId)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs(604,0): at System.Net.Http.Http2Connection.ProcessHeadersFrame(FrameHeader frameHeader)
        /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs(523,0): at System.Net.Http.Http2Connection.ProcessIncomingFramesAsync()

Did you try to reproduce the failure on your machine and debug it?

Copy link
Contributor

@greenEkatherine greenEkatherine left a comment

Choose a reason for hiding this comment

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

please try to revert the line where _lastStreamId was passed before

…tion.cs

Co-authored-by: Katya Sokolova <esokolov@microsoft.com>
Copy link
Member

@karelz karelz left a comment

Choose a reason for hiding this comment

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

Looks like we are almost done with the change. I added 2 nits with extra space and 1 deduplication of code.

@karelz karelz added this to the 7.0.0 milestone Nov 23, 2021
AnudeepGunukula and others added 3 commits November 23, 2021 16:23
…tion.cs

Co-authored-by: Karel Zikmund <karelz@microsoft.com>
…tion.cs

Co-authored-by: Karel Zikmund <karelz@microsoft.com>
…tion.cs

Co-authored-by: Karel Zikmund <karelz@microsoft.com>
@AnudeepGunukula
Copy link
Contributor Author

Hi , i had commited the suggested changes .
Thankyou for reviewing.

@karelz
Copy link
Member

karelz commented Nov 23, 2021

@AnudeepGunukula I think you missed my comment to remove 'async' from the method: #58678 (comment)

@greenEkatherine can you please help here to move this further? Thank you!

@karelz karelz assigned greenEkatherine and unassigned ManickaP Nov 23, 2021
@greenEkatherine
Copy link
Contributor

@AnudeepGunukula thank you for your contribution! Kindly let me take over this PR and add the necessary change

@greenEkatherine greenEkatherine merged commit 8b67772 into dotnet:main Nov 23, 2021
@karelz
Copy link
Member

karelz commented Nov 23, 2021

Thanks @AnudeepGunukula for your contribution!
Thanks @greenEkatherine for helping to finish it here!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove "requestId" arguments from HTTP tests loopback server API
4 participants