You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "itholic (via GitHub)" <gi...@apache.org> on 2023/12/07 00:14:13 UTC

[PR] [SPARK-46293][CONNECT][DOCS][PYTHON] Add protobuf to required dependency for Spark Connect [spark]

itholic opened a new pull request, #44221:
URL: https://github.com/apache/spark/pull/44221

   
   
   ### What changes were proposed in this pull request?
   
   This PR proposes to add `protobuf` to required dependency for Spark Connect
   
   
   ### Why are the changes needed?
   
   `protobuf` is required to run PySpark on Spark Connect, but it's not mentioned on documentation.
   
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   No API changes, but the required `protobuf` version will be added to the user-facing documentation.
   
   <img width="727" alt="Screenshot 2023-12-07 at 9 13 41 AM" src="https://github.com/apache/spark/assets/44108233/fb354e29-76a1-4d5b-997a-b5e2f5a8c040">
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   The existing CI should pass
   
   ### Was this patch authored or co-authored using generative AI tooling?
   <!--
   If generative AI tooling has been used in the process of authoring this patch, please include the
   phrase: 'Generated-by: ' followed by the name of the tool and its version.
   If no, write 'No'.
   Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
   -->
   No.


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


Re: [PR] [SPARK-46293][CONNECT][DOCS][PYTHON] Add `protobuf` to required dependency for Spark Connect [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on code in PR #44221:
URL: https://github.com/apache/spark/pull/44221#discussion_r1418159477


##########
python/docs/source/getting_started/install.rst:
##########
@@ -161,6 +161,7 @@ Package                    Supported version Note
 `numpy`                    >=1.21                    Required for pandas API on Spark and MLLib DataFrame-based API; Optional for Spark SQL
 `grpcio`                   >=1.59.3                  Required for Spark Connect
 `grpcio-status`            >=1.59.3                  Required for Spark Connect
+`protobuf`                 ==4.25.1                  Required for Spark Connect

Review Comment:
   I see. Then what about just removing the protobuf from `dev/requirements.txt` as well to avoid confusion?? As you mentioned seems like `grpcio` and `grpcio-status` automatically detect the specific version and install it when even it's not specified in `dev/requirements.txt` as below:
   
   <img width="276" alt="Screenshot 2023-12-07 at 9 32 06 AM" src="https://github.com/apache/spark/assets/44108233/8ee5916b-7c48-4004-954f-0ffbd78b5e9b">
   



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


Re: [PR] [WIP][SPARK-46293][CONNECT][DOCS][PYTHON] Add `protobuf` to required dependency for Spark Connect [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on PR #44221:
URL: https://github.com/apache/spark/pull/44221#issuecomment-1843971025

   Let me mark this PR as draft until CI is done.


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


Re: [PR] [SPARK-46293][CONNECT][DOCS][PYTHON] Add `protobuf` to required dependency for Spark Connect [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on code in PR #44221:
URL: https://github.com/apache/spark/pull/44221#discussion_r1418160419


##########
python/docs/source/getting_started/install.rst:
##########
@@ -161,6 +161,7 @@ Package                    Supported version Note
 `numpy`                    >=1.21                    Required for pandas API on Spark and MLLib DataFrame-based API; Optional for Spark SQL
 `grpcio`                   >=1.59.3                  Required for Spark Connect
 `grpcio-status`            >=1.59.3                  Required for Spark Connect
+`protobuf`                 ==4.25.1                  Required for Spark Connect

Review Comment:
   Otherwise we can just close this ticket.
   
   The one thing I'm worry about is that if the new version of `grpcio`, `grpcio-status` requires a `protobuf` version other than 4.25.1, I think this could be a problem.



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


Re: [PR] [SPARK-46293][CONNECT][DOCS][PYTHON] Add `protobuf` to required dependency for Spark Connect [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on code in PR #44221:
URL: https://github.com/apache/spark/pull/44221#discussion_r1418149054


##########
python/docs/source/getting_started/install.rst:
##########
@@ -161,6 +161,7 @@ Package                    Supported version Note
 `numpy`                    >=1.21                    Required for pandas API on Spark and MLLib DataFrame-based API; Optional for Spark SQL
 `grpcio`                   >=1.59.3                  Required for Spark Connect
 `grpcio-status`            >=1.59.3                  Required for Spark Connect
+`protobuf`                 ==4.25.1                  Required for Spark Connect

Review Comment:
   The required version referred to https://github.com/apache/spark/blob/e013c4e859e5df4fc23592bb77007c5b41c3c72d/dev/requirements.txt#L56



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


Re: [PR] [SPARK-46293][CONNECT][DOCS][PYTHON] Add `protobuf` to required dependency for Spark Connect [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on code in PR #44221:
URL: https://github.com/apache/spark/pull/44221#discussion_r1418160419


##########
python/docs/source/getting_started/install.rst:
##########
@@ -161,6 +161,7 @@ Package                    Supported version Note
 `numpy`                    >=1.21                    Required for pandas API on Spark and MLLib DataFrame-based API; Optional for Spark SQL
 `grpcio`                   >=1.59.3                  Required for Spark Connect
 `grpcio-status`            >=1.59.3                  Required for Spark Connect
+`protobuf`                 ==4.25.1                  Required for Spark Connect

Review Comment:
   Otherwise we can close this ticket, but just one thing I'm worry about is that if the new version of `grpcio`, `grpcio-status` requires a `protobuf` version other than 4.25.1, I think pinning the specific version could be a problem.



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


Re: [PR] [SPARK-46293][CONNECT][DOCS][PYTHON] Add `protobuf` to required dependency for Spark Connect [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on code in PR #44221:
URL: https://github.com/apache/spark/pull/44221#discussion_r1418151306


##########
python/docs/source/getting_started/install.rst:
##########
@@ -161,6 +161,7 @@ Package                    Supported version Note
 `numpy`                    >=1.21                    Required for pandas API on Spark and MLLib DataFrame-based API; Optional for Spark SQL
 `grpcio`                   >=1.59.3                  Required for Spark Connect
 `grpcio-status`            >=1.59.3                  Required for Spark Connect
+`protobuf`                 ==4.25.1                  Required for Spark Connect

Review Comment:
   you should fix https://github.com/apache/spark/blob/master/python/setup.py#L325C13-L331 too. in fact I won't add it for now because `grpcio` and `grpcio-status` requires a specific version of `protobuf`, and I think we won't have to duplicate the maintenance here. It is true that we directly use `protobuf` in few places but not really a lot of places.



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


Re: [PR] [WIP][SPARK-46293][CONNECT][DOCS][PYTHON] Remove `protobuf` from required package. [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on PR #44221:
URL: https://github.com/apache/spark/pull/44221#issuecomment-1845013878

   Okay, seems like we can just remove the dependency. Just updated the PR title & description.
   
   @HyukjinKwon FYI


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


Re: [PR] [SPARK-46293][CONNECT][DOCS][PYTHON] Add `protobuf` to required dependency for Spark Connect [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on code in PR #44221:
URL: https://github.com/apache/spark/pull/44221#discussion_r1418178298


##########
python/docs/source/getting_started/install.rst:
##########
@@ -161,6 +161,7 @@ Package                    Supported version Note
 `numpy`                    >=1.21                    Required for pandas API on Spark and MLLib DataFrame-based API; Optional for Spark SQL
 `grpcio`                   >=1.59.3                  Required for Spark Connect
 `grpcio-status`            >=1.59.3                  Required for Spark Connect
+`protobuf`                 ==4.25.1                  Required for Spark Connect

Review Comment:
   Sure! Sounds reasonable to me.



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


Re: [PR] [SPARK-46293][CONNECT][PYTHON] Use `protobuf` transitive dependency [spark]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #44221:
URL: https://github.com/apache/spark/pull/44221#issuecomment-1845893857

   Merged to master for Apache Spark 4.


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


Re: [PR] [SPARK-46293][CONNECT][DOCS][PYTHON] Add `protobuf` to required dependency for Spark Connect [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on code in PR #44221:
URL: https://github.com/apache/spark/pull/44221#discussion_r1418160419


##########
python/docs/source/getting_started/install.rst:
##########
@@ -161,6 +161,7 @@ Package                    Supported version Note
 `numpy`                    >=1.21                    Required for pandas API on Spark and MLLib DataFrame-based API; Optional for Spark SQL
 `grpcio`                   >=1.59.3                  Required for Spark Connect
 `grpcio-status`            >=1.59.3                  Required for Spark Connect
+`protobuf`                 ==4.25.1                  Required for Spark Connect

Review Comment:
   Otherwise we can close this ticket, but just one thing I'm worry about is that if the new version of `grpcio`, `grpcio-status` requires a `protobuf` version other than 4.25.1, I think pinning the specific `protobuf` could be a problem.



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


Re: [PR] [SPARK-46293][CONNECT][DOCS][PYTHON] Add `protobuf` to required dependency for Spark Connect [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on code in PR #44221:
URL: https://github.com/apache/spark/pull/44221#discussion_r1418163093


##########
python/docs/source/getting_started/install.rst:
##########
@@ -161,6 +161,7 @@ Package                    Supported version Note
 `numpy`                    >=1.21                    Required for pandas API on Spark and MLLib DataFrame-based API; Optional for Spark SQL
 `grpcio`                   >=1.59.3                  Required for Spark Connect
 `grpcio-status`            >=1.59.3                  Required for Spark Connect
+`protobuf`                 ==4.25.1                  Required for Spark Connect

Review Comment:
   Can we check if we can remove protobuf dependency, and CI passes fine? if that works, let's remove.
   If that doesn't work, we should fix the doc here and `setup.py`.



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


Re: [PR] [SPARK-46293][CONNECT][PYTHON] Use `protobuf` transitive dependency [spark]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun closed pull request #44221: [SPARK-46293][CONNECT][PYTHON] Use `protobuf` transitive dependency
URL: https://github.com/apache/spark/pull/44221


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


Re: [PR] [SPARK-46293][CONNECT][DOCS][PYTHON] Add `protobuf` to required dependency for Spark Connect [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on code in PR #44221:
URL: https://github.com/apache/spark/pull/44221#discussion_r1418160419


##########
python/docs/source/getting_started/install.rst:
##########
@@ -161,6 +161,7 @@ Package                    Supported version Note
 `numpy`                    >=1.21                    Required for pandas API on Spark and MLLib DataFrame-based API; Optional for Spark SQL
 `grpcio`                   >=1.59.3                  Required for Spark Connect
 `grpcio-status`            >=1.59.3                  Required for Spark Connect
+`protobuf`                 ==4.25.1                  Required for Spark Connect

Review Comment:
   Otherwise we can just close this ticket.
   
   The one thing I'm worry about is that if the new version of `grpcio`, `grpcio-status` requires a `protobuf` version other than 4.25.1, I think pinning the specific `protobuf` could be a problem.



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


Re: [PR] [SPARK-46293][CONNECT][DOCS][PYTHON] Add `protobuf` to required dependency for Spark Connect [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on code in PR #44221:
URL: https://github.com/apache/spark/pull/44221#discussion_r1418160419


##########
python/docs/source/getting_started/install.rst:
##########
@@ -161,6 +161,7 @@ Package                    Supported version Note
 `numpy`                    >=1.21                    Required for pandas API on Spark and MLLib DataFrame-based API; Optional for Spark SQL
 `grpcio`                   >=1.59.3                  Required for Spark Connect
 `grpcio-status`            >=1.59.3                  Required for Spark Connect
+`protobuf`                 ==4.25.1                  Required for Spark Connect

Review Comment:
   Otherwise we can just close this ticket.



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


Re: [PR] [SPARK-46293][CONNECT][PYTHON] Use `protobuf` transitive dependency [spark]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #44221:
URL: https://github.com/apache/spark/pull/44221#issuecomment-1845892767

   To @itholic and @HyukjinKwon , I revised the PR title because the original PR title is misleading. `protobuf` is still one of the transitive required package although we don't need to mention it in the requirements.txt file.
   ```
   - [SPARK-46293][CONNECT][PYTHON] Remove protobuf from required package.
   + [SPARK-46293][CONNECT][PYTHON] Use `protobuf` transitive dependency
   ```


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


Re: [PR] [SPARK-46293][CONNECT][PYTHON] Use `protobuf` transitive dependency [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on PR #44221:
URL: https://github.com/apache/spark/pull/44221#issuecomment-1846534102

   Makes sense to me. Thanks for revising!


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