Repository navigation
Avoid repeated cache conversion failures for backends - #7768
Conversation
dschult
left a comment
There was a problem hiding this comment.
I've taken a pass at this PR. Seems like a good goal. I have some questions below.
dschult
left a comment
There was a problem hiding this comment.
I approve this PR. I've got a suggestion about a comment -- but its not a blocker. This is ready to go!
|
Thanks @dschult and @rossbar for the reviews! I went ahead and implemented the "possible future work" that Dan and I were discussing the comments above. The change is actually relatively minor, although it did change an indentation level so it looks larger than it is. I tested this locally, and things look great. I'll try to follow up and add a test using the nx_loopback backend, which will require monkey-patching conversion functions to intentionally fail to convert, which is kinda funky, but tests are nice. Feel free to merge if y'all are comfortable, and I'll plan to add a test before 3.5 release. |
dschult
left a comment
There was a problem hiding this comment.
I wanted to take a look at this new change -- it is getting into the parts of the logic that I find tricky. I understand the new parts and they look correct... and the logic in the older parts looks the same. So I'm going to merge this. And I will eventually work to come back and understand this all better. :)
When playing around with a workflow that uses NetworkX, I saw repeated failures when trying to convert to a backend. This doesn't seem ideal.
This PR saves a value to the cache (if present) to indicate that a conversion failed, which then allows us to avoid attempting this exact conversion in the future.
CC @rlratzel