-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-35458][BUILD] Use > /dev/null to replace -q in shasum
#32604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
cc @srowen |
|
Kubernetes integration test starting |
build/mvn
Outdated
| # Assuming SHA512 here for now | ||
| echo "Veryfing checksum from ${local_checksum}" 1>&2 | ||
| if ! shasum -a 512 -q -c "${local_checksum}" ; then | ||
| if ! shasum -a 512 -c "${local_checksum}" > /dev/null 2>&1 ; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we remove "2>&1"? So that the error message can be shown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense, just let wrong message print.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update the PR description, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
Kubernetes integration test status success |
|
Test build #138734 has finished for PR 32604 at commit
|
> /dev/null 2>&1 to replace -q in shasum > /dev/null to replace -q in shasum
|
lgtm |
gengliangwang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Weird, I have 6.02 on my Macbook so it works. Yeah seems fine. |
|
@Yikun you don't have to take this on here, but it was also noted that |
I think the -q arg is added in shasum 6.x, but I didn't see any release note about shasum. I also found the ubuntu 18.04 arm is using shasum 5.x, so it raise unsupport message. And my Mac is shasum 5.x is also unsupport. And i found it because the arm ci is breaked, so I thought > /dev/null is a better and safe way to address shasum different version behaviors. |
OK, got it, I'd like to also add a 'command -v shasum' to check the shasum is installed or not, before shasum check. But i still think /dev/null is usefull to make 5.x and 6.x shasum work, and your idea? |
|
I think I have shasum 6.x via |
|
Test build #138749 has finished for PR 32604 at commit
|
If it's not found, the build mvn would be breaked with exit 2. Then, the developer can install the shasum mannually. So, command -v is not very important in here, I prefer to keep current change in here. ( Sorry for typing slowly in mobile phone, and if any other followup, I will address after 12 hours when I back to my dev PC, or you can feel free to help to change this pr. : ) ) |
|
The change here is fine. yes the whole idea would be to not fail outright, but, maybe you're right that we can't let people skip this step. |
|
Jenkins test this please |
|
Kubernetes integration test unable to build dist. exiting with code: 1 |
|
Test build #138761 has finished for PR 32604 at commit
|
## What changes were proposed in this pull request? Use ` > /dev/null` to replace `-q` in shasum validation. ### Why are the changes needed? In PR #32505 , added the shasum check on maven. The `shasum -a 512 -q -c xxx.sha` is used to validate checksum, the `-q` args is for "don't print OK for each successfully verified file", but `-q` arg is introduce in shasum 6.x version. So we got the `Unknown option: q`. ``` ➜ ~ uname -a Darwin MacBook.local 19.6.0 Darwin Kernel Version 19.6.0: Mon Apr 12 20:57:45 PDT 2021; root:xnu-6153.141.28.1~1/RELEASE_X86_64 x86_64 ➜ ~ shasum -v 5.84 ➜ ~ shasum -q Unknown option: q Type shasum -h for help ``` it makes ARM CI failed: [1] https://amplab.cs.berkeley.edu/jenkins/job/spark-master-test-maven-arm/ ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? `shasum -a 512 -c wrong.sha > /dev/null` return code 1 without print `shasum -a 512 -c right.sha > /dev/null` return code 0 without print e2e test: ``` rm -f build/apache-maven-3.6.3-bin.tar.gz rm -r build/apache-maven-3.6.3-bin mvn -v ``` Closes #32604 from Yikun/patch-5. Authored-by: Yikun Jiang <[email protected]> Signed-off-by: Sean Owen <[email protected]> (cherry picked from commit 38fbc0b) Signed-off-by: Sean Owen <[email protected]>
## What changes were proposed in this pull request? Use ` > /dev/null` to replace `-q` in shasum validation. ### Why are the changes needed? In PR #32505 , added the shasum check on maven. The `shasum -a 512 -q -c xxx.sha` is used to validate checksum, the `-q` args is for "don't print OK for each successfully verified file", but `-q` arg is introduce in shasum 6.x version. So we got the `Unknown option: q`. ``` ➜ ~ uname -a Darwin MacBook.local 19.6.0 Darwin Kernel Version 19.6.0: Mon Apr 12 20:57:45 PDT 2021; root:xnu-6153.141.28.1~1/RELEASE_X86_64 x86_64 ➜ ~ shasum -v 5.84 ➜ ~ shasum -q Unknown option: q Type shasum -h for help ``` it makes ARM CI failed: [1] https://amplab.cs.berkeley.edu/jenkins/job/spark-master-test-maven-arm/ ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? `shasum -a 512 -c wrong.sha > /dev/null` return code 1 without print `shasum -a 512 -c right.sha > /dev/null` return code 0 without print e2e test: ``` rm -f build/apache-maven-3.6.3-bin.tar.gz rm -r build/apache-maven-3.6.3-bin mvn -v ``` Closes #32604 from Yikun/patch-5. Authored-by: Yikun Jiang <[email protected]> Signed-off-by: Sean Owen <[email protected]> (cherry picked from commit 38fbc0b) Signed-off-by: Sean Owen <[email protected]>
|
Merged to master/3.1/3.0 |
|
Well, it's the same to me. |
|
@Yikun and @srowen . We cannot enforce to install
If we can ask the users to install additionally, why do we need to download |
|
Yes, this is not related to your issue - this makes it work with shasum 5.x I don't know if I agree with your assessment here - AFAICT almost all distros have shasum, just stripped down ones like AWS Linux, so this is only a new requirements for a few developers (? I think). But I don't disagree with the conclusion, just warn and skip if not found. |
## What changes were proposed in this pull request? Use ` > /dev/null` to replace `-q` in shasum validation. ### Why are the changes needed? In PR apache#32505 , added the shasum check on maven. The `shasum -a 512 -q -c xxx.sha` is used to validate checksum, the `-q` args is for "don't print OK for each successfully verified file", but `-q` arg is introduce in shasum 6.x version. So we got the `Unknown option: q`. ``` ➜ ~ uname -a Darwin MacBook.local 19.6.0 Darwin Kernel Version 19.6.0: Mon Apr 12 20:57:45 PDT 2021; root:xnu-6153.141.28.1~1/RELEASE_X86_64 x86_64 ➜ ~ shasum -v 5.84 ➜ ~ shasum -q Unknown option: q Type shasum -h for help ``` it makes ARM CI failed: [1] https://amplab.cs.berkeley.edu/jenkins/job/spark-master-test-maven-arm/ ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? `shasum -a 512 -c wrong.sha > /dev/null` return code 1 without print `shasum -a 512 -c right.sha > /dev/null` return code 0 without print e2e test: ``` rm -f build/apache-maven-3.6.3-bin.tar.gz rm -r build/apache-maven-3.6.3-bin mvn -v ``` Closes apache#32604 from Yikun/patch-5. Authored-by: Yikun Jiang <[email protected]> Signed-off-by: Sean Owen <[email protected]> (cherry picked from commit 38fbc0b) Signed-off-by: Sean Owen <[email protected]>
What changes were proposed in this pull request?
Use
> /dev/nullto replace-qin shasum validation.Why are the changes needed?
In PR #32505 , added the shasum check on maven. The
shasum -a 512 -q -c xxx.shais used to validate checksum, the-qargs is for "don't print OK for each successfully verified file", but-qarg is introduce in shasum 6.x version.So we got the
Unknown option: q.it makes ARM CI failed:
[1] https://amplab.cs.berkeley.edu/jenkins/job/spark-master-test-maven-arm/
Does this PR introduce any user-facing change?
No
How was this patch tested?
shasum -a 512 -c wrong.sha > /dev/nullreturn code 1 without printshasum -a 512 -c right.sha > /dev/nullreturn code 0 without printe2e test: