You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "nija-at (via GitHub)" <gi...@apache.org> on 2023/09/18 07:15:21 UTC

[GitHub] [spark] nija-at commented on a diff in pull request #42949: [SPARK-45093][CONNECT][PYTHON] Error reporting for addArtifacts query

nija-at commented on code in PR #42949:
URL: https://github.com/apache/spark/pull/42949#discussion_r1328319209


##########
python/pyspark/sql/connect/client/artifact.py:
##########
@@ -243,11 +244,15 @@ def _create_requests(
         self, *path: str, pyfile: bool, archive: bool, file: bool
     ) -> Iterator[proto.AddArtifactsRequest]:
         """Separated for the testing purpose."""
-        return self._add_artifacts(
-            chain(
-                *(self._parse_artifacts(p, pyfile=pyfile, archive=archive, file=file) for p in path)
+        try:
+            yield from self._add_artifacts(
+                chain(
+                    *(self._parse_artifacts(p, pyfile=pyfile, archive=archive, file=file) for p in path)
+                )
             )
-        )
+        except Exception as e:
+            logger.error(f"Failed to submit addArtifact request: {e}")

Review Comment:
   ```suggestion
               logger.error(f"Failed to submit addArtifacts request: {e}")
   ```



-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org