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

feat: bi-directional streaming map #197

Merged
merged 8 commits into from
Oct 31, 2024
Merged

feat: bi-directional streaming map #197

merged 8 commits into from
Oct 31, 2024

Conversation

kohlisid
Copy link
Contributor

Kindly explain what this PR does.

Signed-off-by: Sidhant Kohli <[email protected]>
Signed-off-by: Sidhant Kohli <[email protected]>
@kohlisid kohlisid changed the title [WIP]: chore: streaming map [WIP]: chore: bi-directional streaming map Oct 22, 2024
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 95.79832% with 5 lines in your changes missing coverage. Please review.

Project coverage is 94.20%. Comparing base (a1d3eb5) to head (e627427).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pynumaflow/mapper/_servicer/_sync_servicer.py 94.82% 3 Missing ⚠️
pynumaflow/mapper/_servicer/_async_servicer.py 96.49% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #197      +/-   ##
==========================================
- Coverage   94.24%   94.20%   -0.04%     
==========================================
  Files          56       55       -1     
  Lines        2259     2314      +55     
  Branches      145      154       +9     
==========================================
+ Hits         2129     2180      +51     
- Misses         96       98       +2     
- Partials       34       36       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kohlisid kohlisid changed the title [WIP]: chore: bi-directional streaming map feat: bi-directional streaming map Oct 23, 2024
Signed-off-by: Sidhant Kohli <[email protected]>
Signed-off-by: Sidhant Kohli <[email protected]>
@kohlisid kohlisid marked this pull request as ready for review October 24, 2024 22:17
@kohlisid kohlisid marked this pull request as draft October 29, 2024 13:28
pynumaflow/mapper/_servicer/_async_servicer.py Outdated Show resolved Hide resolved
# If the message is an exception, we raise the exception
if isinstance(msg, BaseException):
await handle_async_error(context, msg)
return
Copy link
Member

Choose a reason for hiding this comment

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

We are not really returning anything right? But it should ideally be AsyncIterable[map_pb2.MapResponse] correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, but the error handler would have sent a context error back, hence empty return for exit here.

pynumaflow/mapper/_servicer/_sync_servicer.py Outdated Show resolved Hide resolved
Comment on lines +101 to +107
d = Datum(
keys=list(request.request.keys),
value=request.request.value,
event_time=request.request.event_time.ToDatetime(),
watermark=request.request.watermark.ToDatetime(),
headers=dict(request.request.headers),
)
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to have this part inside the try except?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If there is a type issue, good to catch that mostly

Signed-off-by: Sidhant Kohli <[email protected]>
@kohlisid kohlisid requested a review from ab93 October 30, 2024 17:01
Signed-off-by: Sidhant Kohli <[email protected]>
@kohlisid
Copy link
Contributor Author

E2E test

--- PASS: TestMapSuite (172.10s)
    --- PASS: TestMapSuite/TestUDFunctionAndSink (137.64s)
PASS
ok      github.com/numaproj/numaflow/test/map-e2e       172.819s

@kohlisid kohlisid marked this pull request as ready for review October 30, 2024 17:19
@kohlisid kohlisid merged commit 4788627 into numaproj:main Oct 31, 2024
11 checks passed
@kohlisid kohlisid deleted the ss-map branch October 31, 2024 14:51
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.

3 participants