Skip to content

Conversation

@WolverineJiang
Copy link

@WolverineJiang WolverineJiang commented Dec 12, 2022

What changes were proposed in this pull request?

This PR unify the environment variable of *_PROTOC_EXEC_PATH to support that users can use the same environment variable to build and test core, connect, protobuf module by use profile named -Puser-defined-protoc with specifying custom protoc executables.

Why are the changes needed?

As described in SPARK-41485, at present, there are 3 similar environment variable of *_PROTOC_EXEC_PATH, but they use the same pb version. Because they are consistent in compilation, so I unify the environment variable names to simplify.

Does this PR introduce any user-facing change?

No, the way to using official pre-release protoc binary files is activated by default.

How was this patch tested?

  • Pass GitHub Actions
  • Manual test on CentOS6u3 and CentOS7u4
export SPARK_PROTOC_EXEC_PATH=/path-to-protoc-exe
./build/mvn clean install -pl core -Puser-defined-protoc -am -DskipTests -DskipDefaultProtoc
./build/mvn clean install -pl connector/connect/common -Puser-defined-protoc -am -DskipTests
./build/mvn clean install -pl connector/protobuf -Puser-defined-protoc -am -DskipTests
./build/mvn clean test -pl core -Puser-defined-protoc -DskipDefaultProtoc
./build/mvn clean test -pl connector/connect/common -Puser-defined-protoc
./build/mvn clean test -pl connector/protobuf -Puser-defined-protoc

and

export SPARK_PROTOC_EXEC_PATH=/path-to-protoc-exe
./build/sbt clean "core/compile" -Puser-defined-protoc
./build/sbt clean "connect-common/compile" -Puser-defined-protoc
./build/sbt clean "protobuf/compile" -Puser-defined-protoc
./build/sbt "core/test" -Puser-defined-protoc
./build/sbt  "connect-common/test" -Puser-defined-protoc
./build/sbt  "protobuf/test" -Puser-defined-protoc

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, cc @LuciferYang

Copy link
Contributor

@LuciferYang LuciferYang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM

@HyukjinKwon
Copy link
Member

Merged to master.

@WolverineJiang
Copy link
Author

Thanks @HyukjinKwon @LuciferYang ~

beliefer pushed a commit to beliefer/spark that referenced this pull request Dec 18, 2022
…ariable of *_PROTOC_EXEC_PATH

### What changes were proposed in this pull request?
This PR unify the environment variable of `*_PROTOC_EXEC_PATH` to support that users can use the same environment variable to build and test `core`, `connect`, `protobuf` module by use profile named `-Puser-defined-protoc` with specifying custom `protoc` executables.

### Why are the changes needed?
As described in [SPARK-41485](https://issues.apache.org/jira/browse/SPARK-41485), at present, there are 3 similar environment variable of `*_PROTOC_EXEC_PATH`, but they use the same `pb` version. Because they are consistent in compilation, so I unify the environment variable names to simplify.

### Does this PR introduce _any_ user-facing change?
No, the way to using official pre-release `protoc` binary files is activated by default.

### How was this patch tested?
- Pass GitHub Actions
- Manual test on CentOS6u3 and CentOS7u4
```bash
export SPARK_PROTOC_EXEC_PATH=/path-to-protoc-exe
./build/mvn clean install -pl core -Puser-defined-protoc -am -DskipTests -DskipDefaultProtoc
./build/mvn clean install -pl connector/connect/common -Puser-defined-protoc -am -DskipTests
./build/mvn clean install -pl connector/protobuf -Puser-defined-protoc -am -DskipTests
./build/mvn clean test -pl core -Puser-defined-protoc -DskipDefaultProtoc
./build/mvn clean test -pl connector/connect/common -Puser-defined-protoc
./build/mvn clean test -pl connector/protobuf -Puser-defined-protoc
```
and
```bash
export SPARK_PROTOC_EXEC_PATH=/path-to-protoc-exe
./build/sbt clean "core/compile" -Puser-defined-protoc
./build/sbt clean "connect-common/compile" -Puser-defined-protoc
./build/sbt clean "protobuf/compile" -Puser-defined-protoc
./build/sbt "core/test" -Puser-defined-protoc
./build/sbt  "connect-common/test" -Puser-defined-protoc
./build/sbt  "protobuf/test" -Puser-defined-protoc
```

Closes apache#39036 from WolverineJiang/master.

Authored-by: jianghaonan <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
@LuciferYang
Copy link
Contributor

The correct jira should be SPARK-41485 rather than SPARK-41461, please correct the pr title on this page, although the commit message cannot be changed. @WolverineJiang

@WolverineJiang WolverineJiang changed the title [SPARK-41461][BUILD][CORE][CONNECT][PROTOBUF] Unify the environment variable of *_PROTOC_EXEC_PATH. [SPARK-41485][BUILD][CORE][CONNECT][PROTOBUF] Unify the environment variable of *_PROTOC_EXEC_PATH. Jan 18, 2023
@WolverineJiang
Copy link
Author

The correct jira should be SPARK-41485 rather than SPARK-41461, please correct the pr title on this page, although the commit message cannot be changed. @WolverineJiang

Done. I'll pay attention next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants