Skip to content
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

Make klone more atomic #8

Merged
merged 2 commits into from
May 3, 2024

Conversation

inteon
Copy link
Member

@inteon inteon commented May 3, 2024

Don't remove full destination directory at start of sync, instead update the destination in place.

@cert-manager-prow cert-manager-prow bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 3, 2024
@inteon inteon force-pushed the make_klone_more_atomic branch from 46e85aa to 802636e Compare May 3, 2024 07:39
@ThatsMrTalbot
Copy link
Contributor

If the goal is to make it more atomic, how does syncing in place do that? It just means if it fails make will be broken in more subtle ways with files missing / half written. If its breaks now its obvious because the directory is empty,

If we wanted to be atomic, we could leave the actual directories inside .klone directory and just replace symlinks. This would be entirely atomic. It would make it more of a pain to debug problems though as you would need to follow symlinks around.

@inteon
Copy link
Member Author

inteon commented May 3, 2024

The following issues should be solved with this PR:

  • when running klone sync files are removed momentarily even when the destination is up-to-date
  • when running klone sync the git diff explodes for a couple of seconds, causing vscode slow down

@ThatsMrTalbot
Copy link
Contributor

Ah, so its less about atomic changes, its more about reducing churn during sync. If thats the goal then this PR would solve it

/lgtm

@cert-manager-prow cert-manager-prow bot added the lgtm Indicates that a PR is ready to be merged. label May 3, 2024
@inteon
Copy link
Member Author

inteon commented May 3, 2024

/approve

@cert-manager-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: inteon

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 3, 2024
@cert-manager-prow cert-manager-prow bot merged commit 2fbe988 into cert-manager:main May 3, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants