You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by rahulsinghaliitd <gi...@git.apache.org> on 2014/04/27 22:26:22 UTC
[GitHub] spark pull request: SPARK-1650: Correctly identify maven project v...
GitHub user rahulsinghaliitd opened a pull request:
https://github.com/apache/spark/pull/572
SPARK-1650: Correctly identify maven project version
Better account for various side-effect outputs while executing
"mvn help:evaluate -Dexpression=project.version"
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/Guavus/spark SPARK-1650
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/572.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #572
----
commit fd6a61118cc788621ab858d9e2675ca9ada35029
Author: Rahul Singhal <ra...@guavus.com>
Date: 2014-04-27T20:10:12Z
SPARK-1650: Correctly identify maven project version
Better account for various side-effect outputs while executing
"mvn help:evaluate -Dexpression=project.version"
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: SPARK-1650: Correctly identify maven project v...
Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:
https://github.com/apache/spark/pull/572#discussion_r12031215
--- Diff: make-distribution.sh ---
@@ -43,7 +43,7 @@
FWDIR="$(cd `dirname $0`; pwd)"
DISTDIR="$FWDIR/dist"
-VERSION=$(mvn help:evaluate -Dexpression=project.version |grep -v "INFO")
+VERSION=$(mvn help:evaluate -Dexpression=project.version | sed -n -e '/\[.*\]/!p' | sed -n -e '/Download/!p' | sed -n -e '/^[0-9]/p;q')
--- End diff --
We could also tighten this up a bit by only asking the version for `core`:
```
VERSION=$(mvn help:evaluate -Dexpression=project.version -pl core | grep -v "INFO" | tail -n 1)
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: SPARK-1650: Correctly identify maven project v...
Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on the pull request:
https://github.com/apache/spark/pull/572#issuecomment-41509741
You can just make another commit and then push it to your branch. When we merge the pull request we actually bundle up all of your commits and squash them into a single commit.
We will deal with cherry-picking at the time of commit, you don't need to do that yourself.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: SPARK-1650: Correctly identify maven project v...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/spark/pull/572
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: SPARK-1650: Correctly identify maven project v...
Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on the pull request:
https://github.com/apache/spark/pull/572#issuecomment-41508548
Good catch on this - made a small suggestion.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: SPARK-1650: Correctly identify maven project v...
Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on the pull request:
https://github.com/apache/spark/pull/572#issuecomment-41511262
@rahulsinghaliitd I actually just merged this and made the suggested change when merging it. Thanks!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: SPARK-1650: Correctly identify maven project v...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:
https://github.com/apache/spark/pull/572#issuecomment-41507930
Can one of the admins verify this patch?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: SPARK-1650: Correctly identify maven project v...
Posted by rahulsinghaliitd <gi...@git.apache.org>.
Github user rahulsinghaliitd commented on the pull request:
https://github.com/apache/spark/pull/572#issuecomment-41522919
Thanks @pwendell , I was waiting because I think there maybe more minor problems
1. The current test to detect if "mvn" is installed or not, is not correct.
2. If maven command fails (due to whatever reason), we would end up picking some random error string as the version.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: SPARK-1650: Correctly identify maven project v...
Posted by rahulsinghaliitd <gi...@git.apache.org>.
Github user rahulsinghaliitd commented on a diff in the pull request:
https://github.com/apache/spark/pull/572#discussion_r12031345
--- Diff: make-distribution.sh ---
@@ -43,7 +43,7 @@
FWDIR="$(cd `dirname $0`; pwd)"
DISTDIR="$FWDIR/dist"
-VERSION=$(mvn help:evaluate -Dexpression=project.version |grep -v "INFO")
+VERSION=$(mvn help:evaluate -Dexpression=project.version | sed -n -e '/\[.*\]/!p' | sed -n -e '/Download/!p' | sed -n -e '/^[0-9]/p;q')
--- End diff --
1. Using "tail -n 1" works for all my error cases, will make the change.
2. Wouldn't using the umbrella project be more accurate (considering the fact that we use a fat jar)?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: SPARK-1650: Correctly identify maven project v...
Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:
https://github.com/apache/spark/pull/572#discussion_r12031211
--- Diff: make-distribution.sh ---
@@ -43,7 +43,7 @@
FWDIR="$(cd `dirname $0`; pwd)"
DISTDIR="$FWDIR/dist"
-VERSION=$(mvn help:evaluate -Dexpression=project.version |grep -v "INFO")
+VERSION=$(mvn help:evaluate -Dexpression=project.version | sed -n -e '/\[.*\]/!p' | sed -n -e '/Download/!p' | sed -n -e '/^[0-9]/p;q')
--- End diff --
Hm - would be it be less brittle to do this?
```
VERSION=$(mvn help:evaluate -Dexpression=project.version | grep -v "INFO" | tail -n 1)
```
That way we don't make any assumptions about the messages that can occur _before_ the version is printed. Otherwise over time we'll have to keep writing rules to match various types of input.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: SPARK-1650: Correctly identify maven project v...
Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:
https://github.com/apache/spark/pull/572#discussion_r12031439
--- Diff: make-distribution.sh ---
@@ -43,7 +43,7 @@
FWDIR="$(cd `dirname $0`; pwd)"
DISTDIR="$FWDIR/dist"
-VERSION=$(mvn help:evaluate -Dexpression=project.version |grep -v "INFO")
+VERSION=$(mvn help:evaluate -Dexpression=project.version | sed -n -e '/\[.*\]/!p' | sed -n -e '/Download/!p' | sed -n -e '/^[0-9]/p;q')
--- End diff --
sure, if you want it's okay to just do the parent. They all have the same version, so it's fine either way.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: SPARK-1650: Correctly identify maven project v...
Posted by rahulsinghaliitd <gi...@git.apache.org>.
Github user rahulsinghaliitd commented on the pull request:
https://github.com/apache/spark/pull/572#issuecomment-41509168
I am noob to GitHub and Spark upstream procedures, so confused about what happens when a pull request is accepted.
1. Is the PR merged or rebased on the destination branch?
2. And as in this cases, a second commit is required. Now should I just push a second commit and the two commits will be squashed when the pull request is accepted, or do I need to squash them? If yes how (create a new PR or force modify this one)
3. Lastly, will I need to cherry-pick the commit to 1.0.0. branch or will the core developer who accepts this PR will do it?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] spark pull request: SPARK-1650: Correctly identify maven project v...
Posted by rahulsinghaliitd <gi...@git.apache.org>.
Github user rahulsinghaliitd commented on the pull request:
https://github.com/apache/spark/pull/572#issuecomment-41508778
Thanks, I had recently used a maven build and encountered this problem. I even had a local commit to add the maven build to make-distribution.sh but you beat me to it. :)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---