-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-4137] [EC2] Don't change working dir on user #2988
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
|
Test build #22420 has started for PR 2988 at commit
|
|
Test build #22420 has finished for PR 2988 at commit
|
|
Test PASSed. |
|
Phantom new classes again? 😠 I'll look into this tomorrow. Thought it was a resolved issue... |
|
Test build #22464 has started for PR 2988 at commit
|
|
Test build #22465 has started for PR 2988 at commit
|
|
Test build #22464 has finished for PR 2988 at commit
|
|
Test PASSed. |
|
@nchammas does the template replacement code still work correctly ? I am referring to the "deploy.generic" dir that we pass from https://github.com/apache/spark/blob/master/ec2/spark_ec2.py#L589 to https://github.com/apache/spark/blob/master/ec2/spark_ec2.py#L726 |
|
Test build #22465 has finished for PR 2988 at commit
|
|
Test PASSed. |
|
@shivaram Oh. Glad I pinged you. :) In my brief testing I didn't allow Will update this PR with an alternate approach that lets the CWD be |
|
Actually, we have a few options here for
Comments:
So far, I see that any code that handles the following files would be affected if we go with either Option 2 or 3: This turned out to be a bit more involved than I expected... @shivaram What would you recommend? |
|
Thanks for taking a closer look ! I don't know much python, but can't we get the directory that the script is in using something like From what I can see there are two kinds of paths we have -- the first are paths supplied by the user (like the SSH identity file) where we can preserve the working directory and not change the path The second are files relative to spark_ec2.py 's location (like deploy.generic). Making these absolute paths seems like a good idea to me. |
|
So basically you're saying go with option 2, right? From what I can see, In any case, I'll give it a shot and report back. |
|
Test build #22501 has started for PR 2988 at commit
|
|
Test build #22501 has finished for PR 2988 at commit
|
|
Test PASSed. |
|
@shivaram I took your suggestion and tested to make sure This is ready for another review. |
ec2/spark_ec2.py
Outdated
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.
Should we change this style given that other functions in this file have comments on top ? Any thoughts @JoshRosen ?
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.
Yeah, I thought I'd make this the first change toward having all the function descriptions be in docstrings, but for consistency's sake you're right--it should be a comment on top.
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.
@JoshRosen Any comments on this? I'd be more than happy to convert it back to being 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.
@pwendell Perhaps you can comment on this. It's a minor issue, and I think we should be able to get this PR merged in for 1.2.
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.
My suggestion would be to revert to the existing style for now and open a separate patch for the style fix (similar to the PEP-8 patches ?).
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.
No problem. Will do.
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.
@shivaram Done.
|
Functionality LGTM. I left a minor style question for @JoshRosen |
|
Test build #22977 has started for PR 2988 at commit
|
|
Test build #22977 has finished for PR 2988 at commit
|
|
Test FAILed. |
|
Test build #22981 has started for PR 2988 at commit
|
|
Test build #22981 has finished for PR 2988 at commit
|
|
Test PASSed. |
|
Thanks @nchammas -- Merged this and backported to 1.2 |
This issue was uncovered after [this discussion](https://issues.apache.org/jira/browse/SPARK-3398?focusedCommentId=14187471&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14187471). Don't change the working directory on the user. This breaks relative paths the user may pass in, e.g., for the SSH identity file. ``` ./ec2/spark-ec2 -i ../my.pem ``` This patch will preserve the user's current working directory and allow calls like the one above to work. Author: Nicholas Chammas <[email protected]> Closes #2988 from nchammas/spark-ec2-cwd and squashes the following commits: f3850b5 [Nicholas Chammas] pep8 fix fbc20c7 [Nicholas Chammas] revert to old commenting style 752f958 [Nicholas Chammas] specify deploy.generic path absolutely bcdf6a5 [Nicholas Chammas] fix typo 77871a2 [Nicholas Chammas] add clarifying comment ce071fc [Nicholas Chammas] don't change working dir (cherry picked from commit db45f5a) Signed-off-by: Shivaram Venkataraman <[email protected]>
This issue was uncovered after this discussion.
Don't change the working directory on the user. This breaks relative paths the user may pass in, e.g., for the SSH identity file.
This patch will preserve the user's current working directory and allow calls like the one above to work.