Repository: Parsl/parsl

Issue:
HTEX interchange check python version mismatch to the micro level
Currently HTEX interchange check python version mismatch between worker and interchange to a micro level: e.g., `3.6.6 != 3.6.8`. I think it should be enough to only check the minor level.

https://github.com/Parsl/parsl/blob/2bc571c0a51ff04632548605d44314be7a97c8d0/parsl/executors/high_throughput/interchange.py#L358


Discussion:
@ZhuozhaoLi have you encountered a real life situation where this affects you?

> @ZhuozhaoLi have you encountered a real life situation where this affects you?

Yes. This happened when I used kubernetes provider. Each deployment/pod has different python version from python 3.6.6 to 3.6.8. This is a bit weird because I think all the container images were built from python 3.6  base image.
If you look at `kubectl get pods --output=yaml`, you should see for each pod pairs `image` and `imageID` - the first probably a text name and the second something like an SHA hash.

Are these both the same for all of your pods?

Sorry. I think I did not make it clear. 
This is used in DLHub - a machine learning serving platform. Each executor corresponds to one deployment and one ML model. Each deployment uses different image. But they should be built from python 3.6 base image. I am confused because the deployments have different python versions from 3.6.6 to 3.6.8, and this prevents us from using HTEX. Hope its clearer

Resolving patch:
diff --git a/parsl/executors/high_throughput/interchange.py b/parsl/executors/high_throughput/interchange.py
--- a/parsl/executors/high_throughput/interchange.py
+++ b/parsl/executors/high_throughput/interchange.py
@@ -357,7 +357,7 @@ def start(self, poll_period=None):
                         self._ready_manager_queue[manager].update(msg)
                         logger.info("[MAIN] Registration info for manager {}: {}".format(manager, msg))
 
-                        if (msg['python_v'] != self.current_platform['python_v'] or
+                        if (msg['python_v'].rsplit(".", 1)[0] != self.current_platform['python_v'].rsplit(".", 1)[0] or
                             msg['parsl_v'] != self.current_platform['parsl_v']):
                             logger.warn("[MAIN] Manager {} has incompatible version info with the interchange".format(manager))
 
@@ -371,7 +371,10 @@ def start(self, poll_period=None):
                                 logger.warning("[MAIN] Sent failure reports, unregistering manager")
                             else:
                                 logger.debug("[MAIN] Suppressing shutdown due to version incompatibility")
-
+                        else:
+                            logger.info("[MAIN] Manager {} has compatible Parsl version {}".format(manager, msg['parsl_v']))
+                            logger.info("[MAIN] Manager {} has compatible Python version {}".format(manager,
+                                                                                                    msg['python_v'].rsplit(".", 1)[0]))
                     else:
                         # Registration has failed.
                         if self.suppress_failure is False:


Test patch: