robertwb commented on code in PR #27884:
URL: https://github.com/apache/beam/pull/27884#discussion_r1289176728


##########
sdks/python/apache_beam/yaml/yaml_provider.py:
##########
@@ -141,38 +141,23 @@ def create_external_transform(self, urn, args):
   def provider_from_spec(spec):
     urns = spec['transforms']
     type = spec['type']
-    if spec.get('version', None) == 'BEAM_VERSION':
-      spec['version'] = beam_version
+    config = spec.get('config', {})
+    if config.get('version', None) == 'BEAM_VERSION':
+      config['version'] = beam_version
     if type == 'javaJar':
-      return ExternalJavaProvider(urns, lambda: spec['jar'])
+      return ExternalJavaProvider(urns, **config)
     elif type == 'mavenJar':
       return ExternalJavaProvider(
           urns,
-          lambda: subprocess_server.JavaJarServer.path_to_maven_jar(
-              **{
-                  key: value
-                  for (key, value) in spec.items() if key in [
-                      'artifact_id',
-                      'group_id',
-                      'version',
-                      'repository',
-                      'classifier',
-                      'appendix'
-                  ]
-              }))
+          lambda: subprocess_server.JavaJarServer.path_to_maven_jar(**config))

Review Comment:
   Good point. Fixed it up so the errors will be earlier and cleaner. 



-- 
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]

Reply via email to