TheNeuralBit commented on a change in pull request #15638:
URL: https://github.com/apache/beam/pull/15638#discussion_r742413302
##########
File path: sdks/python/apache_beam/transforms/external.py
##########
@@ -652,7 +652,7 @@ class JavaJarExpansionService(object):
"""
def __init__(self, path_to_jar, extra_args=None):
if extra_args is None:
- extra_args = ['{{PORT}}']
+ extra_args = ['{{PORT}}', f'--filesToStage={path_to_jar}']
Review comment:
This is broken when `path_to_jar` is anything but a local file. I
noticed this during 2.34.0RC1 validation, when I usually test xlang SQL by
specifying `--beam_services
'{":sdks:java:extensions:sql:expansion-service:shadowJar":
"http://staged/sql/expansionservice.jar"}'`.
I think it may also be broken for the final release. Won't `path_to_jar` be
`:sdks:java:extensions:sql:expansion-service:shadowJar` in that case?
##########
File path: sdks/python/apache_beam/transforms/external.py
##########
@@ -652,7 +652,7 @@ class JavaJarExpansionService(object):
"""
def __init__(self, path_to_jar, extra_args=None):
if extra_args is None:
- extra_args = ['{{PORT}}']
+ extra_args = ['{{PORT}}', f'--filesToStage={path_to_jar}']
Review comment:
I think we need to add this to extra_args in __enter__, after
self._path_to_jar has been resolved to a local file.
##########
File path: sdks/python/apache_beam/transforms/external.py
##########
@@ -652,7 +652,7 @@ class JavaJarExpansionService(object):
"""
def __init__(self, path_to_jar, extra_args=None):
if extra_args is None:
- extra_args = ['{{PORT}}']
+ extra_args = ['{{PORT}}', f'--filesToStage={path_to_jar}']
Review comment:
Ah actually I think the gradle target will get resolved to a URL (in
`BeamJarExpansionService.__init__`), but we'll pass the URL in filesToStage,
which won't work.
##########
File path: sdks/python/apache_beam/transforms/external.py
##########
@@ -652,7 +652,7 @@ class JavaJarExpansionService(object):
"""
def __init__(self, path_to_jar, extra_args=None):
if extra_args is None:
- extra_args = ['{{PORT}}']
+ extra_args = ['{{PORT}}', f'--filesToStage={path_to_jar}']
Review comment:
I just cerated a fix here: https://github.com/apache/beam/pull/15889
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]