-
Notifications
You must be signed in to change notification settings - Fork 1.2k
🐛 Fallback on temp directory if user cache directory has issues #1849
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
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: hanlins The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This comment was marked as outdated.
This comment was marked as outdated.
2 similar comments
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
f79e8cb to
0fbadc7
Compare
This comment was marked as outdated.
This comment was marked as outdated.
1 similar comment
|
/test pull-controller-runtime-test-master |
Signed-off-by: Hanlin Shi <[email protected]>
0fbadc7 to
5d67204
Compare
|
/assign controller-runtime-maintainers |
|
@hanlins: GitHub didn't allow me to assign the following users: controller-runtime-maintainers. Note that only kubernetes-sigs members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/assign @vincepri |
|
This was fixed in #1800 |
The original logic is if we can get the user cache directory(i.e.
os.UserCacheDir()), then create the cache directory under that user cache directory. Otherwise, create the cache directory under the temp directory.Basically
os.UserCacheDircould return a path that the current user doesn't have permission for (typically in container environment).os.UserCacheDirtypically returns the$HOME. If$HOMEis set but the user doesn't have permission to create directories in$HOME, it will panic. This is somewhat confusing since it could also fallback on the temp directory.The update logic will simply attempt to create directory under
os.UserCacheDir(). Ifos.UserCacheDirreturns error or user encounters error creating directories under it, it will fallback onto temp directory and retry.Here's the manual verification:
Fixes #1845