Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gateway manager retry kernel updates (#1256)
* Double check if a Gateway kernel was culled. The GatewayMappingKernelManager keeps an internal record of all the remote kernels, and periodically syncs it with the Gateway server. When it finds that a kernel it previously knew about is no longer in the Gateway server's list of kernels, it has to decide how to reconcile that. Previously, it was assuming that the kernel was probably culled by the Gateway server, and thus removed it from its internal records. However, it is conceivable that the list from the upstream Gateway server might have been incomplete due to any combination of bugs, race conditions, or transient network connectivity issues, etc. If one of those such scenarios occurred, then the previous logic would have declared the kernel as lost. This change makes the GatewayMappingKernelManager more resilient to such issues by double checking whether or not the kernel was actually removed in the upstream Gateway server. It does this by attempting to update the GatewayKernelManager instance's model before deciding that the kernel has been culled. * GatewayClient test for missing kernel list entries This change extends the test_gateway.py suite to simulate kernels being transiently missing from kernel list responses. The new test fails without the update to the GatewayMappingKernelManager to double check if kernels have been culled, and passes with it. * Fix a lint error from a missing type annotation.
- Loading branch information