Skip to content

[SPARK-34774][BUILD][2.4] Ensure change-scala-version.sh update scala.version in parent POM correctly#31893

Closed
LuciferYang wants to merge 1 commit into
apache:branch-2.4from
LuciferYang:SPARK-34774-24
Closed

[SPARK-34774][BUILD][2.4] Ensure change-scala-version.sh update scala.version in parent POM correctly#31893
LuciferYang wants to merge 1 commit into
apache:branch-2.4from
LuciferYang:SPARK-34774-24

Conversation

@LuciferYang

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

After SPARK-34507, execute change-scala-version.sh script will update scala.version in parent pom, but if we execute the following commands in order:

dev/change-scala-version.sh 2.12
dev/change-scala-version.sh 2.11
git status

there will generate git diff as follow:

diff --git a/pom.xml b/pom.xml
index f4a50dc5c1..89fd7d88af 100644
--- a/pom.xml
+++ b/pom.xml
@@ -155,7 +155,7 @@
     <commons.math3.version>3.4.1</commons.math3.version>
     <!-- managed up from 3.2.1 for SPARK-11652 -->
     <commons.collections.version>3.2.2</commons.collections.version>
-    <scala.version>2.11.12</scala.version>
+    <scala.version>2.12.10</scala.version>
     <scala.binary.version>2.11</scala.binary.version>
     <codehaus.jackson.version>1.9.13</codehaus.jackson.version>
     <fasterxml.jackson.version>2.6.7</fasterxml.jackson.version>

seem 'scala.version' property was not update correctly.

So this pr add an extra 'scala.version' to scala-2.11 profile to ensure change-scala-version.sh can update the public scala.version property correctly.

Why are the changes needed?

Bug fix.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Manual test

Execute the following commands in order:

dev/change-scala-version.sh 2.12
dev/change-scala-version.sh 2.11
git status

Before

diff --git a/pom.xml b/pom.xml
index f4a50dc5c1..89fd7d88af 100644
--- a/pom.xml
+++ b/pom.xml
@@ -155,7 +155,7 @@
     <commons.math3.version>3.4.1</commons.math3.version>
     <!-- managed up from 3.2.1 for SPARK-11652 -->
     <commons.collections.version>3.2.2</commons.collections.version>
-    <scala.version>2.11.12</scala.version>
+    <scala.version>2.12.10</scala.version>
     <scala.binary.version>2.11</scala.binary.version>
     <codehaus.jackson.version>1.9.13</codehaus.jackson.version>
     <fasterxml.jackson.version>2.6.7</fasterxml.jackson.version>

After

No git diff.

@AmplabJenkins

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/40826/

@AmplabJenkins

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/136244/

@dongjoon-hyun

Copy link
Copy Markdown
Member

cc @srowen

@dongjoon-hyun

Copy link
Copy Markdown
Member

Also, cc @viirya since he is the release manager for 2.4.8.

@srowen

srowen commented Mar 19, 2021

Copy link
Copy Markdown
Member

Merged to 2.4

srowen pushed a commit that referenced this pull request Mar 19, 2021
….version in parent POM correctly

### What changes were proposed in this pull request?
After SPARK-34507,  execute` change-scala-version.sh` script will update `scala.version` in parent pom, but if we execute the following commands in order:

```
dev/change-scala-version.sh 2.12
dev/change-scala-version.sh 2.11
git status
```

there will generate git diff as follow:

```
diff --git a/pom.xml b/pom.xml
index f4a50dc..89fd7d88af 100644
--- a/pom.xml
+++ b/pom.xml
 -155,7 +155,7
     <commons.math3.version>3.4.1</commons.math3.version>

     <commons.collections.version>3.2.2</commons.collections.version>
-    <scala.version>2.11.12</scala.version>
+    <scala.version>2.12.10</scala.version>
     <scala.binary.version>2.11</scala.binary.version>
     <codehaus.jackson.version>1.9.13</codehaus.jackson.version>
     <fasterxml.jackson.version>2.6.7</fasterxml.jackson.version>
```

seem 'scala.version' property was not update correctly.

So this pr add an extra 'scala.version' to scala-2.11 profile to ensure change-scala-version.sh can update the public `scala.version` property correctly.

### Why are the changes needed?
Bug fix.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
**Manual test**

Execute the following commands in order:

```
dev/change-scala-version.sh 2.12
dev/change-scala-version.sh 2.11
git status
```

**Before**

```
diff --git a/pom.xml b/pom.xml
index f4a50dc..89fd7d88af 100644
--- a/pom.xml
+++ b/pom.xml
 -155,7 +155,7
     <commons.math3.version>3.4.1</commons.math3.version>

     <commons.collections.version>3.2.2</commons.collections.version>
-    <scala.version>2.11.12</scala.version>
+    <scala.version>2.12.10</scala.version>
     <scala.binary.version>2.11</scala.binary.version>
     <codehaus.jackson.version>1.9.13</codehaus.jackson.version>
     <fasterxml.jackson.version>2.6.7</fasterxml.jackson.version>
```

**After**

No git diff.

Closes #31893 from LuciferYang/SPARK-34774-24.

Authored-by: yangjie01 <yangjie01@baidu.com>
Signed-off-by: Sean Owen <srowen@gmail.com>
@srowen srowen closed this Mar 19, 2021
@LuciferYang

Copy link
Copy Markdown
Contributor Author

thx all ~

@LuciferYang LuciferYang deleted the SPARK-34774-24 branch June 6, 2022 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants