-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Load and calculate Destination of files for kustomize localize
#4652
Load and calculate Destination of files for kustomize localize
#4652
Conversation
Hi @annasong20. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
@annasong20: This PR has multiple commits, and the default merge method is: merge. 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. |
/label tide/merge-method-squash |
/ok-to-test |
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.
Looks great! Mostly nits so far. I will do another pass after you update
api/localizer/writer.go
Outdated
inNewDir, _ := filepath.Rel(scope.String(), target.String()) | ||
dst, dstErr := makeAndClean(newDir.Join(inNewDir), fSys) | ||
if dstErr != nil { | ||
return nil, errors.Wrapf(dstErr, "unable to write to newDir") |
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.
return nil, errors.Wrapf(dstErr, "unable to write to newDir") | |
return nil, errors.Wrapf(dstErr, fmt.Sprintf("unable to write to new directory %q", newDir) |
%q will help to print something like unable to write to new directory 'newDir'
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.
I'm leaning towards not printing newDir
's path because it should already be included in dstErr
, but nonetheless the fmt.Sprintf
suggestion was super helpful.
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.
I've re-written almost all of the error messages. Lmk if this is still a problem.
kustomize localize
8d332fd
to
75905b6
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: annasong20, natasha41575 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test all |
Revert due to code freeze issue kubernetes-sigs#4756
Remove code that changes remotes-loading code path, as mandated by kubernetes-sigs#4756
Reinstate #4652 without url-related code
* Address TODO in PR kubernetes-sigs#4652 * Improve readability
Implement
locLoader
, which loads and calculates destination paths of files for new command kustomize localize.