-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix restic file not build output right location #5949
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: DingRui Yang <[email protected]>
|
/kind changelog-not-required |
Codecov Report
@@ Coverage Diff @@
## main #5949 +/- ##
==========================================
+ Coverage 39.94% 39.98% +0.03%
==========================================
Files 254 254
Lines 22361 22361
==========================================
+ Hits 8932 8940 +8
+ Misses 12773 12766 -7
+ Partials 656 655 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: DingRui Yang <[email protected]>
Signed-off-by: DingRui Yang <[email protected]>
Signed-off-by: DingRui Yang <[email protected]>
| local_resource( | ||
| "restic_binary", | ||
| cmd = 'cd ' + '.' + ';mkdir -p _tiltbuild/restic; BIN=velero GOOS=linux GOARCH=amd64 GOARM="" RESTIC_VERSION=0.13.1 OUTPUT_DIR=_tiltbuild/restic ./hack/build-restic.sh', | ||
| cmd = 'cd ' + '.' + ';rm -rf ../restic; BIN=velero GOOS=linux GOARCH=amd64 GOARM="" RESTIC_VERSION=0.13.1 OUTPUT_DIR=../velero/_tiltbuild/restic ./hack/build-restic.sh', |
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 not sure we'd want to run rm -rf without confirmation.
If your $PWD is /git/velero and you have /git/restic as well wouldn't this command delete restic dir outside of velero repo?
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.
yes, you're right about the concern, I don't think rm -f should be in this file when it removes outside files. Maybe we need to change the restic download shell script and let all the thing under the Velero repo is good.
The origin reason is someone committed ./hack/build-restic.sh, and don't notice the file was also used by tilt up, so broke the restic download behavior in tilt up.
I suggest creating a new hack script for tilt to download the restic file, although there would be some redundant code.
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.
could nest this under Makefile target ./path/to/restic/code:
and then add this path to gitignore.
Thank you for contributing to Velero!
Please add a summary of your change
Unfortunately, I find the tiltfile is broken by the change https://github.com/vmware-tanzu/velero/tree/fc0c4703950452f035788b0831ca2c2fd4968a59, and I find that I should update again in this commit, for fixing the tilefile. But I don't know if have a better way to build restic files by my changes. Welcome any suggestions.
Does your change fix a particular issue?
Fixes #5948
Please indicate you've done the following:
/kind changelog-not-requiredas a comment on this pull request.site/content/docs/main.