[SPARK-30312][SQL][FOLLOWUP] Use inequality check instead to be robust#27175
Closed
viirya wants to merge 1 commit intoapache:masterfrom
Closed
[SPARK-30312][SQL][FOLLOWUP] Use inequality check instead to be robust#27175viirya wants to merge 1 commit intoapache:masterfrom
viirya wants to merge 1 commit intoapache:masterfrom
Conversation
Member
Author
viirya
commented
Jan 11, 2020
| val fileStatus2 = fs.getFileStatus(tablePath) | ||
| if (ignore) { | ||
| assert(fileStatus2.getPermission().toString() == "rwxr-xr-x") | ||
| assert(fileStatus2.getPermission().toString() != "rwxrwxrwx") |
Member
Author
There was a problem hiding this comment.
This is a loose condition. I think it is rarely to have default file permission as rwxrwxrwx. Another option is not to check permission when ignore is true.
dongjoon-hyun
approved these changes
Jan 11, 2020
Member
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Thank you for quick follow up.
+1, LGTM as a quick fix on Jenkins environment.
Member
|
The PR builder is not helpful for this because PR builder has only one umask which already passed in the previous test. |
Member
|
I verified this patch manually with a different umask. Merged to master/2.4. |
dongjoon-hyun
pushed a commit
that referenced
this pull request
Jan 11, 2020
### What changes were proposed in this pull request? This is a followup to fix a brittle assert in a test case. ### Why are the changes needed? Original assert assumes that default permission is `rwxr-xr-x`, but in jenkins [env](https://amplab.cs.berkeley.edu/jenkins/view/Spark%20QA%20Test%20(Dashboard)/job/spark-master-test-maven-hadoop-2.7-hive-1.2/6/testReport/junit/org.apache.spark.sql.execution.command/InMemoryCatalogedDDLSuite/SPARK_30312__truncate_table___keep_acl_permission/) it could be `rwxrwxr-x`. ### Does this PR introduce any user-facing change? No ### How was this patch tested? Unit test. Closes #27175 from viirya/hot-fix. Authored-by: Liang-Chi Hsieh <viirya@gmail.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com> (cherry picked from commit b044071) Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
|
Test build #116531 has finished for PR 27175 at commit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This is a followup to fix a brittle assert in a test case.
Why are the changes needed?
Original assert assumes that default permission is
rwxr-xr-x, but in jenkins env it could berwxrwxr-x.Does this PR introduce any user-facing change?
No
How was this patch tested?
Unit test.