You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/09/12 03:23:27 UTC

[GitHub] [dolphinscheduler] zhongjiajie commented on a diff in pull request #11626: [Improvement][Python API] Validate version of Python API and Java gateway at launch

zhongjiajie commented on code in PR #11626:
URL: https://github.com/apache/dolphinscheduler/pull/11626#discussion_r967956982


##########
dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/java_gateway.py:
##########
@@ -75,6 +78,21 @@ def __init__(
         auto_convert: Optional[bool] = True,
     ):
         self.java_gateway = launch_gateway(address, port, auto_convert)
+        gateway_version = self.get_gateway_version()
+        if gateway_version is not None and gateway_version != __version__:
+            logger.critical(
+                f"Using unmatched version of pydolphinscheduler (version {__version__}) "
+                f"and Java gateway (version {gateway_version}) may cause errors. "
+                "We strongly recommend you to find the matched version "
+                "(check: https://pypi.org/project/apache-dolphinscheduler)"
+            )

Review Comment:
   @HeZean Sorry for reply later. we should check whether the version is equal or not in our CI. and also test print critical log in our test too.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org