-
Notifications
You must be signed in to change notification settings - Fork 40
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
Add file watching client changes #2660
base: main
Are you sure you want to change the base?
Conversation
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.
❌ Changes requested. Reviewed everything up to bb07b51 in 51 seconds
More details
- Looked at
236
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. modal/sandbox.py:590
- Draft comment:
Thewatch
method should returnAsyncIterator[FileWatchEvent]
instead ofAsyncIterator[bytes]
to match the_FileIO.watch
method. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment suggests a change in the return type based on the assumption that_FileIO.watch
returnsFileWatchEvent
. However, without seeing the implementation of_FileIO.watch
, it's speculative. The current implementation yieldsbytes
, which matches the declared return type. Without strong evidence from the code provided, the comment seems speculative.
I might be missing the actual implementation of_FileIO.watch
, which could indeed returnFileWatchEvent
. However, without this information, the comment remains speculative.
Given the rules, I should only keep comments with strong evidence. Since the evidence is not present in the provided code, the comment should be removed.
Remove the comment as it is speculative and lacks strong evidence from the provided code.
Workflow ID: wflow_HIajFznDcjDgbgmj
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Reviewed everything up to 26ffa5e in 3 minutes and 16 seconds
More details
- Looked at
178
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. modal/sandbox.py:575
- Draft comment:
Thewatch
method should yieldFileWatchEvent
instead ofbytes
to match the return type of_FileIO.watch
. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment is about a change made in this diff, specifically the addition of thewatch
method. However, without seeing the implementation of_FileIO.watch
, it's difficult to verify the correctness of the comment. The comment suggests a specific type mismatch, which could be a valid issue if_FileIO.watch
indeed returnsFileWatchEvent
. Without more context, it's hard to be certain.
I might be missing the implementation details of_FileIO.watch
, which could confirm or refute the comment's claim. Without this information, my assessment is speculative.
Given the lack of visibility into_FileIO.watch
, it's reasonable to be cautious and consider the possibility that the comment is correct. However, without strong evidence, it's safer to err on the side of deletion.
Delete the comment due to lack of strong evidence supporting its correctness. The implementation details of_FileIO.watch
are not visible, making it speculative.
Workflow ID: wflow_EE5EQiXGr71uUl9k
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@ellipsis-dev quiet |
It seems like your comment '@ellipsis-dev quiet' doesn't specify a request. Could you please clarify what you need assistance with? |
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.
👍 Looks good to me! Incremental review on 4996316 in 10 seconds
More details
- Looked at
97
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. test/file_io_test.py:350
- Draft comment:
Consider adding an assertion to verify thatFileIO.watch
is called with the correct parameters. This ensures the method is invoked as expected. - Reason this comment was not posted:
Confidence changes required:50%
The test functiontest_file_watch
is missing an assertion to check if theFileIO.watch
method is called with the correct parameters. This is important to ensure that the method is being invoked as expected.
Workflow ID: wflow_FnXD6PRxPGnL8e8Z
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on f177980 in 1 minute and 4 seconds
More details
- Looked at
2340
lines of code in40
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_djiNdT41139LIM6g
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 0a81a93 in 12 seconds
More details
- Looked at
31
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. test/file_io_test.py:391
- Draft comment:
The assertionassert e.type == se.type
has been updated to useevent.type
instead ofevent.event
. Ensure that this change is consistent with the rest of the codebase and thatevent.type
is the correct attribute to use. - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_AT0omgORV5p1gRUc
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
0a81a93
to
cc1e647
Compare
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.
👍 Looks good to me! Incremental review on cc1e647 in 27 seconds
More details
- Looked at
45
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. test/file_io_test.py:384
- Draft comment:
Thewatch
method is asynchronous and should be awaited.
events = await FileIO.watch("/test.txt", client, "task-123")
- Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_NmLRJNE3vBM6n8yC
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
cc1e647
to
50e32af
Compare
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.
👍 Looks good to me! Incremental review on 50e32af in 23 seconds
More details
- Looked at
47
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. test/file_io_test.py:384
- Draft comment:
Thewatch
method returns anAsyncIterator
, so it should be awaited. Useasync for
to iterate overevents
. - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_QFRUKI2E55AvFhxA
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
if item is None: | ||
break | ||
buffer += item | ||
if buffer.endswith(b"\n\n"): |
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.
When is this not the case?
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.
when a single event is split across multiple items
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.
👍 Looks good to me! Incremental review on b9299fe in 18 seconds
More details
- Looked at
267
lines of code in4
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. modal/io_streams_helper.py:24
- Draft comment:
The parameter name in the docstring should bestream
instead ofstream_generator
. - Reason this comment was not posted:
Confidence changes required:50%
The PR introduces a new helper functionconsume_stream_with_retries
to handle stream consumption with retry logic. This function is used in multiple places, replacing the previous retry logic. However, the docstring forconsume_stream_with_retries
contains an incorrect parameter namestream_generator
which should bestream
. This should be corrected for clarity.
2. modal/file_io.py:449
- Draft comment:
Consider renaming thefilter
parameter to avoid shadowing the built-infilter
function. For example, you could useevent_filter
. - Reason this comment was not posted:
Confidence changes required:50%
The PR introduces a newfilter
parameter in thewatch
method of the_FileIO
class to filter file watch events. However, thefilter
parameter name shadows the built-infilter
function in Python, which can lead to confusion. It's better to use a different name for this parameter.
3. modal/io_streams_helper.py:33
- Draft comment:
Consider adding a timeout or maximum iteration count to handle cases where the stream might be exhausted without encountering a completion item, to prevent potential infinite loops. - Reason this comment was not posted:
Confidence changes required:50%
The PR introduces a newconsume_stream_with_retries
function that is used in multiple places. However, the function does not handle the case where thestream
might be exhausted without encountering a completion item. This could lead to an infinite loop if the stream ends unexpectedly without a completion item. A timeout or maximum iteration count could be added to prevent this.
Workflow ID: wflow_71jrJtps3C5aEnmr
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 081458f in 13 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. modal/io_streams.py:181
- Draft comment:
The checkitem is not None
before decoding is a good practice to avoidNoneType
errors. Ensure similar checks are applied elsewhere in the code where decoding occurs. - Reason this comment was not posted:
Confidence changes required:50%
The change in the PR adds a check foritem is not None
before decoding it. This is a good practice to avoid potentialNoneType
errors when decoding. However, the same check should be applied to other similar instances in the code.
Workflow ID: wflow_iSyE0UZO6xvmLhDi
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
081458f
to
79f2afe
Compare
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.
👍 Looks good to me! Incremental review on 79f2afe in 11 seconds
More details
- Looked at
28
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. modal/io_streams_helper.py:21
- Draft comment:
Themdmd:hidden
tag is not properly closed. It should be"""mdmd:hidden"""
to ensure proper documentation formatting. - Reason this comment was not posted:
Confidence changes required:50%
The docstring for the functionconsume_stream_with_retries
is incorrectly formatted. Themdmd:hidden
tag is not properly closed, which might lead to documentation issues.
Workflow ID: wflow_DcPvqC4AlPcVBLQ9
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Describe your changes
WRK-484
Blockers
Backward/forward compatibility checks
Check these boxes or delete any item (or this section) if not relevant for this PR.
Note on protobuf: protobuf message changes in one place may have impact to
multiple entities (client, server, worker, database). See points above.
Changelog