-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Don't exclude .git from rsync #117827
Don't exclude .git from rsync #117827
Conversation
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
Actually the performance doesn't feel bad versus build/run.sh before (which was already a bit slow), without measuring it. Just syncing in .git fixes #117821 but I'm still not recalling what it was that depended on excluding it. |
locally this broke a few things with |
@@ -674,7 +674,6 @@ function kube::build::sync_to_container() { | |||
# necessary. | |||
kube::build::rsync \ | |||
--delete \ | |||
--filter='H /.git' \ | |||
--filter='- /_tmp/' \ |
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.
copy_output filters /_temp/
but not /_tmp/
...
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.
We have a lot of thingsd encoded in .gitignore - I wonder if we can figure out how to respect that instead of encoding many of the same things again?
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'd like to focus on eliminating the rsync dance entirely.
... but I also don't think this will work very well unless rsync is taught to read .gitignore files directly, it seems pretty expensive to read .gitignore files recursively compared to the handful of exclusions here?
publishing-bot is the pyyaml thing shellcheck is trying to invoke docker since shellcheck binary isn't available. I wrote a new version of this for registry.k8s.io that doesn't need docker we can backport here. openapi-spec failed on:
which seems like something we should just do automatically instead of asking the user to do it ... golangci-lint failed on:
|
filed kubernetes/publishing-bot#345 for publishing-bot verify |
#117831 for golangci-lint |
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.
Is there any other way to discover the root dir without relying on .git
/ GIT_DISCOVERY_ACROSS_FILESYSTEM
?
I don't know why that's relevant? But yes there's other ways to find the root dir. See #117821, the issue is not GIT_DISCOVERY_ACROSS_FILESYSTEM |
/test all |
Ah, it always worked in CI, the issue is when using Still need to fix:
but only when using Whereas on
So there's no regression here, it should be less broken. (Note: tested on Linux but results should be same on mac) |
cc @thockin this is related to the git worktree work. |
Alternately: git init && git add . && git commit -am "add" |
We could, but I want to avoid load-bearing filtering in rsync anyhow because it's going to block migrating to a simple volume mount for #112862. The remaining broken scripts are not broken by git, they're just broken in the build container for other reasons (assuming the host binary output path, trying to use docker themselves, etc) |
The .git dir can be huge - the point of rsync was to allow remote builds
and make mac's not suck. If you sync that, won't it be as bad as not using
sync?
…On Fri, Jun 16, 2023, 11:08 PM Benjamin Elder ***@***.***> wrote:
Alternately: git init && git add . && git commit -am "add"
We could, but I want to avoid load-bearing filtering in rsync anyhow
because it's going to block migrating to a simple volume mount for #112862
<#112862>.
The remaining broken scripts are not broken by git, they're just broken in
the build container for other reasons (assuming the host binary output
path, trying to use docker themselves, etc)
—
Reply to this email directly, view it on GitHub
<#117827 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKWAVC77HXFUPXGMMLZUCLXLVCWTANCNFSM6AAAAAAXXUD3BY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
We stopped supporting remote builds O(years) ago, that just leaves macOS.
Not necessarily, since you do a full read through once and then everything is in the linux VM, repeated I/O during builds across the VM boundary is still expensive (though I think fast enough these days that a hopefully soon follow-up is to eliminate the sync entirely and just "bind mount"). |
/approve /hold Ben, please remove hold when you feel this is ready to land |
LGTM label has been added. Git tree hash: 3a639fdea38eed0c8e5ca373b740ebbeaed039d0
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: BenTheElder, dims 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 |
What's the impact on build/test loops? I seem to recall trying this and it being bad, even on my Linux desktop |
I recall when I wrote this PR it wasn't bad [on linux] but I'd prefer to confirm hard numbers with the latest changes so ... let me report back later and leave the hold until then ... |
If you're somehow running an extremely trivial command like If you're running subsequent commands this is ~free because you've already synced in .git and it's not really changing. NOTE: Ensuring we're not depending on a load-bearing "don't sync .git" is the first step towards eliminating rsync in favor of a source bind mount. We haven't supported remote rsync/docker hosts for years and mac+docker VFS has gotten faster. Shipping this patch unbreaks a lot of containerized git interactions as well. |
LGTM |
/hold cancel |
What type of PR is this?
What this PR does / why we need it:
See #117821
This would be something of a performance regression, but first I just want to see what breaks. Letting CI identify that with this PR.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: