GithubHelp home page GithubHelp logo

yagrc's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ryanrw

yagrc's Issues

Failure in lazy import resolution makes next attempt succeed for case where it should fail, too

Observed while troubleshooting sparky8512/starlink-grpc-tools#36 (although not actually related to the symptom on that issue):

When a call to yagrc.importer.resolve_lazy_imports fails, for example due to a network issue preventing communication with the reflection service, it leaves the yagrc.importer module state such that a later call then succeeds even when it should fail due to the same cause.

This leads to the caller thinking the import resolution is complete, and if it then attempts to use a supposedly resolved symbol, it will encounter the following error:

AttributeError: attribute access on unresolved lazy module: <attr name>

From a quick look at the yagrc code for this, it looks like it is clearing out the lists of modules to be resolved before doing the actual import resolution, so it will leave them empty regardless of success or failure, and subsequent calls to resolve_lazy_imports will find nothing to do and return without error.

Loss of network connectivity during reflection query can lead to permanent hang

This was observed while investigating sparky8512/starlink-grpc-tools#36, and it does appear to be the culprit of the hang behavior on that issue. See sparky8512/starlink-grpc-tools#36 (comment) for more detail, but the summary is that if the gRPC channel connection is successfully opened, but then network connectivity lost before the reflection queries are completed, this can result in a permanent hang. The particular case where this can happen is when the client does not know connectivity has been lost, because it is not waiting for an ACK in the TCP connection, just more data.

The solution here would be to put timeouts on all the gRPC method calls (the actual RPC calls, not all the calls into the grpc Python code).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.