-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
IAsyncEnumerable support in Dataflow #37876
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
I am not proud of the |
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.
Thanks for your interest in working on this.
I did a quick initial pass through and left some comments to be addressed. I'll do a more in-depth pass subsequently.
src/libraries/System.Threading.Tasks.Dataflow/ref/System.Threading.Tasks.Dataflow.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Threading.Tasks.Dataflow/src/Base/DataflowBlock.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformManyBlock.IAsyncEnumerable.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformManyBlock.IAsyncEnumerable.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformManyBlock.IAsyncEnumerable.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Threading.Tasks.Dataflow/src/Base/DataflowBlock.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformManyBlock.IAsyncEnumerable.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformManyBlock.IAsyncEnumerable.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformManyBlock.IAsyncEnumerable.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformManyBlock.IAsyncEnumerable.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformManyBlock.IAsyncEnumerable.cs
Outdated
Show resolved
Hide resolved
6f9bacf
to
110e3c8
Compare
@stephentoub I have also reworked the test part but there is a test failure on Helix that I do not manage to analyze nor reproduce locally. Can you please help me? |
Tagging subscribers to this area: @tarekgh |
017528e
to
56df80e
Compare
@manandre it looks this PR parked for long time. could you please force the CI rerun on it again just to run against the latest? you can do that by adding any trivial commit to it. Also, what was pending on this change? @stephentoub do you have any more comments on this PR? |
56df80e
to
0bdd14a
Compare
I have rebased on master branch but the build still fails on a unit test failure that I managed to reproduce locally (by running it in loop until failure):
Unfortunately, I do not understand what happens here. I would need some help. |
@stephentoub could you please help @manandre with his question in #37876 (comment)? |
That error suggests that something is causing the continuations in the async iterator to be executed multiple times, likely due to a bug in the implementation of the blocks as part of the changes made in this PR. In the name of moving this PR forward, I suggest scoping it back to the simpler ReceiveAllAsync and project updates, rather than also supporting the much more complicated and problematic new constructors. |
@stephentoub Unfortunately, these random unit test failures only occur with the ReceiveAllAsync* tests, which rely on the already existing |
...stem.Threading.Tasks.Dataflow/tests/Dataflow/DataflowBlockExtensionTests.IAsyncEnumerable.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Threading.Tasks.Dataflow/src/Base/DataflowBlock.IAsyncEnumerable.cs
Outdated
Show resolved
Hide resolved
Can you narrow the PR down to just ReceiveAllAsync, its tests, and the minimal project changes necessary to add the netstandard2.1 configuration? (i.e. leave out the rest of the TransformXx block tests). It's harder to prove that nothing else relevant has changed when there's so much other stuff here. If it still repros after that, it should be easier to diagnose. Thanks. |
PR narrowed down to |
@eerhardt, how should the project changes here interact with the project changes you made to dataflow? |
They are conflicting. I also added a |
src/libraries/System.Threading.Tasks.Dataflow/ref/System.Threading.Tasks.Dataflow.csproj
Outdated
Show resolved
Hide resolved
I see that https://github.com/dotnet/runtime/pull/48667/files#diff-721cfca869eb5f5a10caa48506edc358e2edac219c8b5a2e123855e40fd9fd84R4 excludes it from the package, but that's just about the implementation assembly, and that doesn't matter because it's in box? What should be done for a ref here? EDIT: I see your comment above. So the correct change for this PR is just to add the netstandard2.1 ref assembly? |
I believe the correct change for this PR is to add the You want it in the impl assembly as well, because that goes into the NuGet package. |
Ah, of course. |
c72cea3
to
ab5ddd5
Compare
ab5ddd5
to
cb8aaf3
Compare
Thanks! |
Contributes to #30863
cc @onionhammer @stephentoub