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: capture shard failures in the head runtime #5338

Merged
merged 18 commits into from
Nov 8, 2022
Merged

Conversation

girishc13
Copy link
Contributor

@girishc13 girishc13 commented Nov 1, 2022

Goals:

@girishc13 girishc13 self-assigned this Nov 1, 2022
@github-actions github-actions bot added size/M area/core This issue/PR affects the core codebase area/testing This issue/PR affects testing labels Nov 1, 2022
@codecov
Copy link

codecov bot commented Nov 1, 2022

Codecov Report

Merging #5338 (dfc97d7) into master (6eb4e87) will increase coverage by 0.14%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5338      +/-   ##
==========================================
+ Coverage   86.69%   86.83%   +0.14%     
==========================================
  Files          99       99              
  Lines        6470     6494      +24     
==========================================
+ Hits         5609     5639      +30     
+ Misses        861      855       -6     
Flag Coverage Δ
jina 86.83% <100.00%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...untimes/request_handlers/worker_request_handler.py 97.50% <ø> (ø)
jina/serve/networking.py 88.73% <100.00%> (+1.69%) ⬆️
...ina/serve/runtimes/gateway/graph/topology_graph.py 99.47% <100.00%> (+0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@JoanFM JoanFM left a comment

Choose a reason for hiding this comment

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

Let's print some debug information or put some information on the Request when not all shards have responded? So the client can see it?

@girishc13
Copy link
Contributor Author

Let's print some debug information or put some information on the Request when not all shards have responded? So the client can see it?

Is there a reason why the gRPC metadata from the Gateway (for example) not returned to the Client as headers or as metadata?

@girishc13 girishc13 marked this pull request as ready for review November 3, 2022 13:52
jina/serve/networking.py Show resolved Hide resolved
jina/serve/runtimes/head/__init__.py Outdated Show resolved Hide resolved
@JohannesMessner
Copy link
Contributor

Let's print some debug information or put some information on the Request when not all shards have responded? So the client can see it?

Is there a reason why the gRPC metadata from the Gateway (for example) not returned to the Client as headers or as metadata?

If there is one I don't know it

JoanFM
JoanFM previously approved these changes Nov 3, 2022
jina/serve/runtimes/gateway/graph/topology_graph.py Outdated Show resolved Hide resolved
jina/serve/networking.py Show resolved Hide resolved
jina/serve/networking.py Show resolved Hide resolved
jina/serve/runtimes/head/__init__.py Show resolved Hide resolved
jina/serve/runtimes/head/__init__.py Show resolved Hide resolved
jina/serve/runtimes/head/__init__.py Outdated Show resolved Hide resolved
jina/serve/runtimes/head/__init__.py Outdated Show resolved Hide resolved
JohannesMessner
JohannesMessner previously approved these changes Nov 3, 2022
JoanFM
JoanFM previously approved these changes Nov 3, 2022
@girishc13
Copy link
Contributor Author

This failing test is another example of incompatibility issues with macOS. This doesn't fail in my machine.

python -c 'from jina import Executor,requests'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/jina/jina/__init__.py", line 207, in <module>
    from jina.orchestrate.flow.asyncio import AsyncFlow
  File "/jina/jina/orchestrate/flow/asyncio.py", line 2, in <module>
    from jina.orchestrate.flow.base import Flow
  File "/jina/jina/orchestrate/flow/base.py", line 69, in <module>
    from jina.orchestrate.deployments import Deployment
  File "/jina/jina/orchestrate/deployments/__init__.py", line 26, in <module>
    from jina.orchestrate.pods.factory import PodFactory
  File "/jina/jina/orchestrate/pods/__init__.py", line 16, in <module>
    from jina.serve.runtimes.asyncio import AsyncNewLoopRuntime
  File "/jina/jina/serve/runtimes/asyncio.py", line 15, in <module>
    from jina.serve.networking import GrpcConnectionPool
  File "/jina/jina/serve/networking.py", line 287, in <module>
    class GrpcConnectionPool:
  File "/jina/jina/serve/networking.py", line 975, in GrpcConnectionPool
    ) -> asyncio.Task[Union[Tuple, AioRpcError, InternalNetworkError]]:
TypeError: 'type' object is not subscriptable

@girishc13 girishc13 dismissed stale reviews from JoanFM and JohannesMessner via 8602b20 November 3, 2022 15:51
@JoanFM
Copy link
Member

JoanFM commented Nov 3, 2022

This failing test is another example of incompatibility issues with macOS. This doesn't fail in my machine.

python -c 'from jina import Executor,requests'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/jina/jina/__init__.py", line 207, in <module>
    from jina.orchestrate.flow.asyncio import AsyncFlow
  File "/jina/jina/orchestrate/flow/asyncio.py", line 2, in <module>
    from jina.orchestrate.flow.base import Flow
  File "/jina/jina/orchestrate/flow/base.py", line 69, in <module>
    from jina.orchestrate.deployments import Deployment
  File "/jina/jina/orchestrate/deployments/__init__.py", line 26, in <module>
    from jina.orchestrate.pods.factory import PodFactory
  File "/jina/jina/orchestrate/pods/__init__.py", line 16, in <module>
    from jina.serve.runtimes.asyncio import AsyncNewLoopRuntime
  File "/jina/jina/serve/runtimes/asyncio.py", line 15, in <module>
    from jina.serve.networking import GrpcConnectionPool
  File "/jina/jina/serve/networking.py", line 287, in <module>
    class GrpcConnectionPool:
  File "/jina/jina/serve/networking.py", line 975, in GrpcConnectionPool
    ) -> asyncio.Task[Union[Tuple, AioRpcError, InternalNetworkError]]:
TypeError: 'type' object is not subscriptable

I think this may be a problem of Python version, u can also add this with quotes 'asyncio.Task[Union[Tuple, AioRpcError, InternalNetworkError]]' so that noone will complain

jina/serve/networking.py Outdated Show resolved Hide resolved
Copy link
Member

@JoanFM JoanFM left a comment

Choose a reason for hiding this comment

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

Please make sure @girishc13 that we have a ticket for the tasks that need to follow up

@girishc13
Copy link
Contributor Author

Please make sure @girishc13 that we have a ticket for the tasks that need to follow up

Follow up ticket has already been created and added to the current PR description.

@JoanFM JoanFM merged commit db1c406 into master Nov 8, 2022
@JoanFM JoanFM deleted the feat-serve-5336 branch November 8, 2022 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core This issue/PR affects the core codebase area/testing This issue/PR affects testing size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: gather search results from available/on-line shards
4 participants