-
Notifications
You must be signed in to change notification settings - Fork 315
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
[studio] Use system artifact cache dir when running studio as root. #2844
Conversation
Thanks for the pull request! Here is what will happen next:
Thank you for contributing! |
This change was motivated by a bug fix to the artifact caching feature introduced in #2737 but upon closer inspection, a much better refactoring presented itself. The key bit of insight was to remember that on Linux systems where `sudo` will be called, we can set up the appropriate environment variables *before* we become the root user (under the hood we call `exec` with sudo to re-run the program with higher permissions). Now that all the home directory-related logic is run under the non-root user, there are far fewer edge conditions and we no longer need the logic which attempt to determine that original calling user via the `SUDO_USER` environment variable. Signed-off-by: Fletcher Nichol <fnichol@nichol.ca>
87c7345
to
a16daa8
Compare
I rebased against master so hopefully appveyor will pass now |
I'm building locally to test here |
@thesentinels approve |
🤘 I am testing your branch against master before merging it. We do this to ensure that the master branch is never failing tests. |
Travis CI has started testing this PR. |
1 similar comment
Travis CI has started testing this PR. |
💖 Travis CI reports this PR passed. It always makes me feel nice when humans approve of one anothers work. I'm merging this PR now. I just want you and the contributor to answer me one question: |
This change was motivated by a bug fix to the artifact caching feature
introduced in #2737 but upon closer inspection, a much better
refactoring presented itself.
The key bit of insight was to remember that on Linux systems where
sudo
will be called, we can set up the appropriate environmentvariables before we become the root user (under the hood we call
exec
with sudo to re-run the program with higher permissions). Nowthat all the home directory-related logic is run under the non-root
user, there are far fewer edge conditions and we no longer need the
logic which attempt to determine that original calling user via the
SUDO_USER
environment variable.I did to myself and to all of us way back. Tech debt paid down!