-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Tools: Remove dependencies installed by make tools
#14309
Conversation
Signed-off-by: Prakhar Gurunani <[email protected]>
Signed-off-by: Prakhar Gurunani <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Should this script be added somewhere in the docs? |
I think it makes the most sense to me to have a new rule in the Makefile that calls this script. The same way we have |
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 good to me besides that small potential issue with protoc
's symlink. Thank you for this contribution.
I have tested this on a remote machine with a clean clone of vitess
running make tools
and the new script added by this PR.
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 think that this is a good idea. I'm curious where you get the 9GiB assessment from?
The files are here: https://github.com/vitessio/vitess-resources/releases/
And at least for me:
❯ du -csh "${VTROOT}/dist"
74M /Users/matt/git/vitess/dist
74M total
Do you really see the disk usage go down by ~ 9GiB after running this script? If so, then I agree that it makes it all the more useful 🙂. I'd also triple check, however, that we're not removing things we did not intend to.
make tools
make tools
make tools
make tools
Signed-off-by: Prakhar Gurunani <[email protected]>
Signed-off-by: Prakhar Gurunani <[email protected]>
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.
Nice work on this, @FirePing32 ! I only had a few minor comments. Let me know what you think and I can come back and re-review quickly at any time.
Signed-off-by: Prakhar Gurunani <[email protected]>
Signed-off-by: Prakhar Gurunani <[email protected]>
Signed-off-by: Prakhar Gurunani <[email protected]>
Signed-off-by: Prakhar Gurunani <[email protected]>
@FirePing32 Sorry, one last thing. We should address the shellcheck warnings — these should have been surfaced by the pre-commit hook
If we don't do this then it will show up for other people when modifying related files. |
Signed-off-by: Prakhar Gurunani <[email protected]>
Just one left:
Did you intend to use that |
I guess we don't need that now. |
Signed-off-by: Prakhar Gurunani <[email protected]>
As part of a minimal manual test, I did this:
We cannot use
But then it still fails:
And even when manually sourcing it:
Can you please run some basic manual tests to ensure that this is working as intended? |
For the main issue, you could do this or use
|
Signed-off-by: Prakhar Gurunani <[email protected]>
For the secondary issue:
We're removing a file there that we have not confirmed exists. We can either check that it exists, or using |
Signed-off-by: Prakhar Gurunani <[email protected]>
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.
Thank you for the contribution, @FirePing32 ! I tested it and it all seems to be working as expected. ❤️
I'm going to override and merge because this new code is not part of any tests -- and there are two workflows which are out to pasture with the Expected ... state. The only thing you can do in those cases is push another empty commit but that is not needed in this case. |
Signed-off-by: Prakhar Gurunani [email protected]
Description
The script removes the tools and dependencies installed by
make tools
and also removes the symlinks between them.Related Issue(s)
fixes: #14288
Checklist