You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "MaxGekk (via GitHub)" <gi...@apache.org> on 2023/05/03 09:36:49 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #41015: [CONNECT][DOC] Add information on how to regenerate proto for python client

MaxGekk commented on code in PR #41015:
URL: https://github.com/apache/spark/pull/41015#discussion_r1183457223


##########
connector/connect/README.md:
##########
@@ -21,6 +21,28 @@ user experience across all languages. Please follow the below guidelines:
 
 Python-specific development guidelines are located in [python/docs/source/development/testing.rst](https://github.com/apache/spark/blob/master/python/docs/source/development/testing.rst) that is published at [Development tab](https://spark.apache.org/docs/latest/api/python/development/index.html) in PySpark documentation.
 
+To generate the Python client code from the proto files:
+
+First, make sure to have a Python environment with the installed dependencies.
+Specifically, install `black` and dependencies from the "Spark Connect python proto generation plugin (optional)" section.
+
+
+```
+pip install -r dev/requirements.txt
+```
+
+Install [buf](https://github.com/bufbuild/buf)
+
+```
+brew install bufbuild/buf/buf
+```
+
+Generate the Python files by running:
+
+```
+dev/connect-gen-protos.sh

Review Comment:
   Don't know is it specific to me but this command fails on my site with error:
   ```
   + buf generate --debug -vvv
   ...
   Failure: 403 Forbidden
   ```
   
   A workaround is to fork https://github.com/HyukjinKwon/my-github-actions and run the workflow:
   ![Screen Shot 2023-03-24 at 8 38 18 PM](https://user-images.githubusercontent.com/1580697/235881720-aedf17a5-b14e-4a62-ab21-576a2221fedf.png)
   and download the results:
   ![Screen Shot 2023-03-24 at 8 38 45 PM](https://user-images.githubusercontent.com/1580697/235881807-1a2a8c34-44bd-44cc-9b5c-1ff11d1eebd0.png)
   



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